STM32L486xx HAL User Manual
Data Structures | Defines | Functions
stm32l4xx_ll_swpmi.h File Reference

Header file of SWPMI LL module. More...

#include "stm32l4xx.h"

Go to the source code of this file.

Data Structures

struct  LL_SWPMI_InitTypeDef
 SWPMI Init structures definition. More...

Defines

#define LL_SWPMI_ICR_CRXBFF   SWPMI_ICR_CRXBFF
#define LL_SWPMI_ICR_CTXBEF   SWPMI_ICR_CTXBEF
#define LL_SWPMI_ICR_CRXBERF   SWPMI_ICR_CRXBERF
#define LL_SWPMI_ICR_CRXOVRF   SWPMI_ICR_CRXOVRF
#define LL_SWPMI_ICR_CTXUNRF   SWPMI_ICR_CTXUNRF
#define LL_SWPMI_ICR_CTCF   SWPMI_ICR_CTCF
#define LL_SWPMI_ICR_CSRF   SWPMI_ICR_CSRF
#define LL_SWPMI_ISR_RXBFF   SWPMI_ISR_RXBFF
#define LL_SWPMI_ISR_TXBEF   SWPMI_ISR_TXBEF
#define LL_SWPMI_ISR_RXBERF   SWPMI_ISR_RXBERF
#define LL_SWPMI_ISR_RXOVRF   SWPMI_ISR_RXOVRF
#define LL_SWPMI_ISR_TXUNRF   SWPMI_ISR_TXUNRF
#define LL_SWPMI_ISR_RXNE   SWPMI_ISR_RXNE
#define LL_SWPMI_ISR_TXE   SWPMI_ISR_TXE
#define LL_SWPMI_ISR_TCF   SWPMI_ISR_TCF
#define LL_SWPMI_ISR_SRF   SWPMI_ISR_SRF
#define LL_SWPMI_ISR_SUSP   SWPMI_ISR_SUSP
#define LL_SWPMI_ISR_DEACTF   SWPMI_ISR_DEACTF
#define LL_SWPMI_IER_SRIE   SWPMI_IER_SRIE
#define LL_SWPMI_IER_TCIE   SWPMI_IER_TCIE
#define LL_SWPMI_IER_TIE   SWPMI_IER_TIE
#define LL_SWPMI_IER_RIE   SWPMI_IER_RIE
#define LL_SWPMI_IER_TXUNRIE   SWPMI_IER_TXUNRIE
#define LL_SWPMI_IER_RXOVRIE   SWPMI_IER_RXOVRIE
#define LL_SWPMI_IER_RXBERIE   SWPMI_IER_RXBERIE
#define LL_SWPMI_IER_TXBEIE   SWPMI_IER_TXBEIE
#define LL_SWPMI_IER_RXBFIE   SWPMI_IER_RXBFIE
#define LL_SWPMI_SW_BUFFER_RX_SINGLE   ((uint32_t)0x00000000)
#define LL_SWPMI_SW_BUFFER_RX_MULTI   SWPMI_CR_RXMODE
#define LL_SWPMI_SW_BUFFER_TX_SINGLE   ((uint32_t)0x00000000)
#define LL_SWPMI_SW_BUFFER_TX_MULTI   SWPMI_CR_TXMODE
#define LL_SWPMI_VOLTAGE_CLASS_C   ((uint32_t)0x00000000)
#define LL_SWPMI_VOLTAGE_CLASS_B   SWPMI_OR_CLASS
#define LL_SWPMI_DMA_REG_DATA_TRANSMIT   (uint32_t)0
#define LL_SWPMI_DMA_REG_DATA_RECEIVE   (uint32_t)1
#define LL_SWPMI_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
 Write a value in SWPMI register.
#define LL_SWPMI_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in SWPMI register.
#define __LL_SWPMI_CALC_BITRATE_PRESCALER(__FSWP__, __FSWPCLK__)   ((uint32_t)(((__FSWPCLK__) / ((__FSWP__) * 4)) - 1))
 Helper macro to calculate bit rate value to set in BRR register (LL_SWPMI_SetBitRatePrescaler function)

Functions

__STATIC_INLINE void LL_SWPMI_SetReceptionMode (SWPMI_TypeDef *SWPMIx, uint32_t RxBufferingMode)
 Set Reception buffering mode.
__STATIC_INLINE uint32_t LL_SWPMI_GetReceptionMode (SWPMI_TypeDef *SWPMIx)
 Get Reception buffering mode.
__STATIC_INLINE void LL_SWPMI_SetTransmissionMode (SWPMI_TypeDef *SWPMIx, uint32_t TxBufferingMode)
 Set Transmission buffering mode.
__STATIC_INLINE uint32_t LL_SWPMI_GetTransmissionMode (SWPMI_TypeDef *SWPMIx)
 Get Transmission buffering mode.
__STATIC_INLINE void LL_SWPMI_EnableLoopback (SWPMI_TypeDef *SWPMIx)
 Enable loopback mode.
__STATIC_INLINE void LL_SWPMI_DisableLoopback (SWPMI_TypeDef *SWPMIx)
 Disable loopback mode.
__STATIC_INLINE void LL_SWPMI_Activate (SWPMI_TypeDef *SWPMIx)
 Activate Single wire protocol bus (SUSPENDED or ACTIVATED state)
__STATIC_INLINE uint32_t LL_SWPMI_IsActivated (SWPMI_TypeDef *SWPMIx)
 Check if Single wire protocol bus is in ACTIVATED state.
__STATIC_INLINE void LL_SWPMI_Deactivate (SWPMI_TypeDef *SWPMIx)
 Deactivate immediately Single wire protocol bus (immediate transition to DEACTIVATED state)
__STATIC_INLINE void LL_SWPMI_RequestDeactivation (SWPMI_TypeDef *SWPMIx)
 Request a deactivation of Single wire protocol bus (request to go in DEACTIVATED state if no resume from slave)
__STATIC_INLINE void LL_SWPMI_SetBitRatePrescaler (SWPMI_TypeDef *SWPMIx, uint32_t BitRatePrescaler)
 Set Bitrate prescaler SWPMI_freq = SWPMI_clk / (((BitRate) + 1) * 4)
__STATIC_INLINE uint32_t LL_SWPMI_GetBitRatePrescaler (SWPMI_TypeDef *SWPMIx)
 Get Bitrate prescaler.
__STATIC_INLINE void LL_SWPMI_SetVoltageClass (SWPMI_TypeDef *SWPMIx, uint32_t VoltageClass)
 Set SWP Voltage Class.
__STATIC_INLINE uint32_t LL_SWPMI_GetVoltageClass (SWPMI_TypeDef *SWPMIx)
 Get SWP Voltage Class.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_RXBF (SWPMI_TypeDef *SWPMIx)
 Check if the last word of the frame under reception has arrived in SWPMI_RDR.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_TXBE (SWPMI_TypeDef *SWPMIx)
 Check if Frame transmission buffer has been emptied.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_RXBER (SWPMI_TypeDef *SWPMIx)
 Check if CRC error in reception has been detected.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_RXOVR (SWPMI_TypeDef *SWPMIx)
 Check if Overrun in reception has been detected.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_TXUNR (SWPMI_TypeDef *SWPMIx)
 Check if underrun error in transmission has been detected.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_RXNE (SWPMI_TypeDef *SWPMIx)
 Check if Receive data register not empty (it means that Received data is ready to be read in the SWPMI_RDR register)
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_TXE (SWPMI_TypeDef *SWPMIx)
 Check if Transmit data register is empty (it means that Data written in transmit data register SWPMI_TDR has been transmitted and SWPMI_TDR can be written to again)
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_TC (SWPMI_TypeDef *SWPMIx)
 Check if Both transmission and reception are completed and SWP is switched to the SUSPENDED state.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_SR (SWPMI_TypeDef *SWPMIx)
 Check if a Resume by slave state has been detected during the SWP bus SUSPENDED state.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_SUSP (SWPMI_TypeDef *SWPMIx)
 Check if SWP bus is in SUSPENDED or DEACTIVATED state.
__STATIC_INLINE uint32_t LL_SWPMI_IsActiveFlag_DEACT (SWPMI_TypeDef *SWPMIx)
 Check if SWP bus is in DEACTIVATED state.
__STATIC_INLINE void LL_SWPMI_ClearFlag_RXBF (SWPMI_TypeDef *SWPMIx)
 Clear receive buffer full flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_TXBE (SWPMI_TypeDef *SWPMIx)
 Clear transmit buffer empty flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_RXBER (SWPMI_TypeDef *SWPMIx)
 Clear receive CRC error flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_RXOVR (SWPMI_TypeDef *SWPMIx)
 Clear receive overrun error flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_TXUNR (SWPMI_TypeDef *SWPMIx)
 Clear transmit underrun error flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_TC (SWPMI_TypeDef *SWPMIx)
 Clear transfer complete flag.
__STATIC_INLINE void LL_SWPMI_ClearFlag_SR (SWPMI_TypeDef *SWPMIx)
 Clear slave resume flag.
__STATIC_INLINE void LL_SWPMI_EnableIT_SR (SWPMI_TypeDef *SWPMIx)
 Enable Slave resume interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_TC (SWPMI_TypeDef *SWPMIx)
 Enable Transmit complete interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_TX (SWPMI_TypeDef *SWPMIx)
 Enable Transmit interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_RX (SWPMI_TypeDef *SWPMIx)
 Enable Receive interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_TXUNR (SWPMI_TypeDef *SWPMIx)
 Enable Transmit underrun error interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_RXOVR (SWPMI_TypeDef *SWPMIx)
 Enable Receive overrun error interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_RXBER (SWPMI_TypeDef *SWPMIx)
 Enable Receive CRC error interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_TXBE (SWPMI_TypeDef *SWPMIx)
 Enable Transmit buffer empty interrupt.
__STATIC_INLINE void LL_SWPMI_EnableIT_RXBF (SWPMI_TypeDef *SWPMIx)
 Enable Receive buffer full interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_SR (SWPMI_TypeDef *SWPMIx)
 Disable Slave resume interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_TC (SWPMI_TypeDef *SWPMIx)
 Disable Transmit complete interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_TX (SWPMI_TypeDef *SWPMIx)
 Disable Transmit interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_RX (SWPMI_TypeDef *SWPMIx)
 Disable Receive interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_TXUNR (SWPMI_TypeDef *SWPMIx)
 Disable Transmit underrun error interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_RXOVR (SWPMI_TypeDef *SWPMIx)
 Disable Receive overrun error interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_RXBER (SWPMI_TypeDef *SWPMIx)
 Disable Receive CRC error interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_TXBE (SWPMI_TypeDef *SWPMIx)
 Disable Transmit buffer empty interrupt.
__STATIC_INLINE void LL_SWPMI_DisableIT_RXBF (SWPMI_TypeDef *SWPMIx)
 Disable Receive buffer full interrupt.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_SR (SWPMI_TypeDef *SWPMIx)
 Check if Slave resume interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_TC (SWPMI_TypeDef *SWPMIx)
 Check if Transmit complete interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_TX (SWPMI_TypeDef *SWPMIx)
 Check if Transmit interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_RX (SWPMI_TypeDef *SWPMIx)
 Check if Receive interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_TXUNR (SWPMI_TypeDef *SWPMIx)
 Check if Transmit underrun error interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_RXOVR (SWPMI_TypeDef *SWPMIx)
 Check if Receive overrun error interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_RXBER (SWPMI_TypeDef *SWPMIx)
 Check if Receive CRC error interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_TXBE (SWPMI_TypeDef *SWPMIx)
 Check if Transmit buffer empty interrupt is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledIT_RXBF (SWPMI_TypeDef *SWPMIx)
 Check if Receive buffer full interrupt is enabled.
__STATIC_INLINE void LL_SWPMI_EnableDMAReq_RX (SWPMI_TypeDef *SWPMIx)
 Enable DMA mode for reception.
__STATIC_INLINE void LL_SWPMI_DisableDMAReq_RX (SWPMI_TypeDef *SWPMIx)
 Disable DMA mode for reception.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledDMAReq_RX (SWPMI_TypeDef *SWPMIx)
 Check if DMA mode for reception is enabled.
__STATIC_INLINE void LL_SWPMI_EnableDMAReq_TX (SWPMI_TypeDef *SWPMIx)
 Enable DMA mode for transmission.
__STATIC_INLINE void LL_SWPMI_DisableDMAReq_TX (SWPMI_TypeDef *SWPMIx)
 Disable DMA mode for transmission.
__STATIC_INLINE uint32_t LL_SWPMI_IsEnabledDMAReq_TX (SWPMI_TypeDef *SWPMIx)
 Check if DMA mode for transmission is enabled.
__STATIC_INLINE uint32_t LL_SWPMI_DMA_GetRegAddr (SWPMI_TypeDef *SWPMIx, uint32_t Direction)
 Get the data register address used for DMA transfer.
__STATIC_INLINE uint32_t LL_SWPMI_GetReceiveFrameLength (SWPMI_TypeDef *SWPMIx)
 Retrieve number of data bytes present in payload of received frame.
__STATIC_INLINE void LL_SWPMI_TransmitData32 (SWPMI_TypeDef *SWPMIx, uint32_t TxData)
 Transmit Data Register.
__STATIC_INLINE uint32_t LL_SWPMI_ReceiveData32 (SWPMI_TypeDef *SWPMIx)
 Receive Data Register.
__STATIC_INLINE void LL_SWPMI_EnableTXBypass (SWPMI_TypeDef *SWPMIx)
 Enable SWP Transceiver Bypass.
__STATIC_INLINE void LL_SWPMI_DisableTXBypass (SWPMI_TypeDef *SWPMIx)
 Disable SWP Transceiver Bypass.
ErrorStatus LL_SWPMI_DeInit (SWPMI_TypeDef *SWPMIx)
 De-initialize the SWPMI peripheral registers to their default reset values.
ErrorStatus LL_SWPMI_Init (SWPMI_TypeDef *SWPMIx, LL_SWPMI_InitTypeDef *SWPMI_InitStruct)
 Initialize the SWPMI peripheral according to the specified parameters in the SWPMI_InitStruct.
void LL_SWPMI_StructInit (LL_SWPMI_InitTypeDef *SWPMI_InitStruct)
 Set each LL_SWPMI_InitTypeDef field to default value.

Detailed Description

Header file of SWPMI LL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_ll_swpmi.h.