version13
version 11/12 auch noch
This commit is contained in:
@ -55,53 +55,66 @@ typedef struct
|
||||
uint32_t TransferDirection; /*!< Specifies the SPI unidirectional or bidirectional data mode.
|
||||
This parameter can be a value of @ref SPI_LL_EC_TRANSFER_MODE.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetTransferDirection().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetTransferDirection().*/
|
||||
|
||||
uint32_t Mode; /*!< Specifies the SPI mode (Master/Slave).
|
||||
This parameter can be a value of @ref SPI_LL_EC_MODE.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetMode().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetMode().*/
|
||||
|
||||
uint32_t DataWidth; /*!< Specifies the SPI data width.
|
||||
This parameter can be a value of @ref SPI_LL_EC_DATAWIDTH.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetDataWidth().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetDataWidth().*/
|
||||
|
||||
uint32_t ClockPolarity; /*!< Specifies the serial clock steady state.
|
||||
This parameter can be a value of @ref SPI_LL_EC_POLARITY.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetClockPolarity().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetClockPolarity().*/
|
||||
|
||||
uint32_t ClockPhase; /*!< Specifies the clock active edge for the bit capture.
|
||||
This parameter can be a value of @ref SPI_LL_EC_PHASE.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetClockPhase().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetClockPhase().*/
|
||||
|
||||
uint32_t NSS; /*!< Specifies whether the NSS signal is managed by hardware (NSS pin) or by software using the SSI bit.
|
||||
uint32_t NSS; /*!< Specifies whether the NSS signal is managed by hardware (NSS pin)
|
||||
or by software using the SSI bit.
|
||||
This parameter can be a value of @ref SPI_LL_EC_NSS_MODE.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetNSSMode().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetNSSMode().*/
|
||||
|
||||
uint32_t BaudRate; /*!< Specifies the BaudRate prescaler value which will be used to configure the transmit and receive SCK clock.
|
||||
uint32_t BaudRate; /*!< Specifies the BaudRate prescaler value which will be used
|
||||
to configure the transmit and receive SCK clock.
|
||||
This parameter can be a value of @ref SPI_LL_EC_BAUDRATEPRESCALER.
|
||||
@note The communication clock is derived from the master clock. The slave clock does not need to be set.
|
||||
@note The communication clock is derived from the master clock.
|
||||
The slave clock does not need to be set.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetBaudRatePrescaler().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetBaudRatePrescaler().*/
|
||||
|
||||
uint32_t BitOrder; /*!< Specifies whether data transfers start from MSB or LSB bit.
|
||||
This parameter can be a value of @ref SPI_LL_EC_BIT_ORDER.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetTransferBitOrder().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetTransferBitOrder().*/
|
||||
|
||||
uint32_t CRCCalculation; /*!< Specifies if the CRC calculation is enabled or not.
|
||||
This parameter can be a value of @ref SPI_LL_EC_CRC_CALCULATION.
|
||||
|
||||
This feature can be modified afterwards using unitary functions @ref LL_SPI_EnableCRC() and @ref LL_SPI_DisableCRC().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
functions @ref LL_SPI_EnableCRC() and @ref LL_SPI_DisableCRC().*/
|
||||
|
||||
uint32_t CRCPoly; /*!< Specifies the polynomial used for the CRC calculation.
|
||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFFFF.
|
||||
|
||||
This feature can be modified afterwards using unitary function @ref LL_SPI_SetCRCPolynomial().*/
|
||||
This feature can be modified afterwards using unitary
|
||||
function @ref LL_SPI_SetCRCPolynomial().*/
|
||||
|
||||
} LL_SPI_InitTypeDef;
|
||||
|
||||
@ -378,7 +391,7 @@ __STATIC_INLINE void LL_SPI_Disable(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabled(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabled(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR1, SPI_CR1_SPE) == (SPI_CR1_SPE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -408,7 +421,7 @@ __STATIC_INLINE void LL_SPI_SetMode(SPI_TypeDef *SPIx, uint32_t Mode)
|
||||
* @arg @ref LL_SPI_MODE_MASTER
|
||||
* @arg @ref LL_SPI_MODE_SLAVE
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetMode(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetMode(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_MSTR | SPI_CR1_SSI));
|
||||
}
|
||||
@ -436,7 +449,7 @@ __STATIC_INLINE void LL_SPI_SetStandard(SPI_TypeDef *SPIx, uint32_t Standard)
|
||||
* @arg @ref LL_SPI_PROTOCOL_MOTOROLA
|
||||
* @arg @ref LL_SPI_PROTOCOL_TI
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetStandard(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetStandard(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_FRF));
|
||||
}
|
||||
@ -465,7 +478,7 @@ __STATIC_INLINE void LL_SPI_SetClockPhase(SPI_TypeDef *SPIx, uint32_t ClockPhase
|
||||
* @arg @ref LL_SPI_PHASE_1EDGE
|
||||
* @arg @ref LL_SPI_PHASE_2EDGE
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetClockPhase(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetClockPhase(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_CPHA));
|
||||
}
|
||||
@ -494,7 +507,7 @@ __STATIC_INLINE void LL_SPI_SetClockPolarity(SPI_TypeDef *SPIx, uint32_t ClockPo
|
||||
* @arg @ref LL_SPI_POLARITY_LOW
|
||||
* @arg @ref LL_SPI_POLARITY_HIGH
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetClockPolarity(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetClockPolarity(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_CPOL));
|
||||
}
|
||||
@ -534,7 +547,7 @@ __STATIC_INLINE void LL_SPI_SetBaudRatePrescaler(SPI_TypeDef *SPIx, uint32_t Bau
|
||||
* @arg @ref LL_SPI_BAUDRATEPRESCALER_DIV128
|
||||
* @arg @ref LL_SPI_BAUDRATEPRESCALER_DIV256
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetBaudRatePrescaler(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetBaudRatePrescaler(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_BR));
|
||||
}
|
||||
@ -562,7 +575,7 @@ __STATIC_INLINE void LL_SPI_SetTransferBitOrder(SPI_TypeDef *SPIx, uint32_t BitO
|
||||
* @arg @ref LL_SPI_LSB_FIRST
|
||||
* @arg @ref LL_SPI_MSB_FIRST
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTransferBitOrder(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTransferBitOrder(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_LSBFIRST));
|
||||
}
|
||||
@ -599,7 +612,7 @@ __STATIC_INLINE void LL_SPI_SetTransferDirection(SPI_TypeDef *SPIx, uint32_t Tra
|
||||
* @arg @ref LL_SPI_HALF_DUPLEX_RX
|
||||
* @arg @ref LL_SPI_HALF_DUPLEX_TX
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTransferDirection(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTransferDirection(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_RXONLY | SPI_CR1_BIDIMODE | SPI_CR1_BIDIOE));
|
||||
}
|
||||
@ -648,7 +661,7 @@ __STATIC_INLINE void LL_SPI_SetDataWidth(SPI_TypeDef *SPIx, uint32_t DataWidth)
|
||||
* @arg @ref LL_SPI_DATAWIDTH_15BIT
|
||||
* @arg @ref LL_SPI_DATAWIDTH_16BIT
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDataWidth(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDataWidth(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_DS));
|
||||
}
|
||||
@ -675,7 +688,7 @@ __STATIC_INLINE void LL_SPI_SetRxFIFOThreshold(SPI_TypeDef *SPIx, uint32_t Thres
|
||||
* @arg @ref LL_SPI_RX_FIFO_TH_HALF
|
||||
* @arg @ref LL_SPI_RX_FIFO_TH_QUARTER
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOThreshold(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOThreshold(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_FRXTH));
|
||||
}
|
||||
@ -719,7 +732,7 @@ __STATIC_INLINE void LL_SPI_DisableCRC(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledCRC(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledCRC(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR1, SPI_CR1_CRCEN) == (SPI_CR1_CRCEN)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -747,7 +760,7 @@ __STATIC_INLINE void LL_SPI_SetCRCWidth(SPI_TypeDef *SPIx, uint32_t CRCLength)
|
||||
* @arg @ref LL_SPI_CRC_8BIT
|
||||
* @arg @ref LL_SPI_CRC_16BIT
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetCRCWidth(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetCRCWidth(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR1, SPI_CR1_CRCL));
|
||||
}
|
||||
@ -782,7 +795,7 @@ __STATIC_INLINE void LL_SPI_SetCRCPolynomial(SPI_TypeDef *SPIx, uint32_t CRCPoly
|
||||
* @param SPIx SPI Instance
|
||||
* @retval Returned value is a number between Min_Data = 0x00 and Max_Data = 0xFFFF
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_REG(SPIx->CRCPR));
|
||||
}
|
||||
@ -793,7 +806,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval Returned value is a number between Min_Data = 0x00 and Max_Data = 0xFFFF
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxCRC(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxCRC(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_REG(SPIx->RXCRCR));
|
||||
}
|
||||
@ -804,7 +817,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetRxCRC(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval Returned value is a number between Min_Data = 0x00 and Max_Data = 0xFFFF
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTxCRC(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTxCRC(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_REG(SPIx->TXCRCR));
|
||||
}
|
||||
@ -845,7 +858,7 @@ __STATIC_INLINE void LL_SPI_SetNSSMode(SPI_TypeDef *SPIx, uint32_t NSS)
|
||||
* @arg @ref LL_SPI_NSS_HARD_INPUT
|
||||
* @arg @ref LL_SPI_NSS_HARD_OUTPUT
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetNSSMode(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetNSSMode(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
uint32_t Ssm = (READ_BIT(SPIx->CR1, SPI_CR1_SSM));
|
||||
uint32_t Ssoe = (READ_BIT(SPIx->CR2, SPI_CR2_SSOE) << 16U);
|
||||
@ -883,7 +896,7 @@ __STATIC_INLINE void LL_SPI_DisableNSSPulseMgt(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledNSSPulse(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledNSSPulse(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_NSSP) == (SPI_CR2_NSSP)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -902,7 +915,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsEnabledNSSPulse(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_RXNE) == (SPI_SR_RXNE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -913,7 +926,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_TXE) == (SPI_SR_TXE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -924,7 +937,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_CRCERR) == (SPI_SR_CRCERR)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -935,7 +948,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_MODF) == (SPI_SR_MODF)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -946,7 +959,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_OVR) == (SPI_SR_OVR)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -964,7 +977,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_BSY) == (SPI_SR_BSY)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -975,7 +988,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->SR, SPI_SR_FRE) == (SPI_SR_FRE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -990,7 +1003,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE(SPI_TypeDef *SPIx)
|
||||
* @arg @ref LL_SPI_RX_FIFO_HALF_FULL
|
||||
* @arg @ref LL_SPI_RX_FIFO_FULL
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->SR, SPI_SR_FRLVL));
|
||||
}
|
||||
@ -1005,7 +1018,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel(SPI_TypeDef *SPIx)
|
||||
* @arg @ref LL_SPI_TX_FIFO_HALF_FULL
|
||||
* @arg @ref LL_SPI_TX_FIFO_FULL
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->SR, SPI_SR_FTLVL));
|
||||
}
|
||||
@ -1078,7 +1091,8 @@ __STATIC_INLINE void LL_SPI_ClearFlag_FRE(SPI_TypeDef *SPIx)
|
||||
|
||||
/**
|
||||
* @brief Enable error interrupt
|
||||
* @note This bit controls the generation of an interrupt when an error condition occurs (CRCERR, OVR, MODF in SPI mode, FRE at TI mode).
|
||||
* @note This bit controls the generation of an interrupt when an error condition
|
||||
* occurs (CRCERR, OVR, MODF in SPI mode, FRE at TI mode).
|
||||
* @rmtoll CR2 ERRIE LL_SPI_EnableIT_ERR
|
||||
* @param SPIx SPI Instance
|
||||
* @retval None
|
||||
@ -1112,7 +1126,8 @@ __STATIC_INLINE void LL_SPI_EnableIT_TXE(SPI_TypeDef *SPIx)
|
||||
|
||||
/**
|
||||
* @brief Disable error interrupt
|
||||
* @note This bit controls the generation of an interrupt when an error condition occurs (CRCERR, OVR, MODF in SPI mode, FRE at TI mode).
|
||||
* @note This bit controls the generation of an interrupt when an error condition
|
||||
* occurs (CRCERR, OVR, MODF in SPI mode, FRE at TI mode).
|
||||
* @rmtoll CR2 ERRIE LL_SPI_DisableIT_ERR
|
||||
* @param SPIx SPI Instance
|
||||
* @retval None
|
||||
@ -1150,7 +1165,7 @@ __STATIC_INLINE void LL_SPI_DisableIT_TXE(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_ERR(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_ERR(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_ERRIE) == (SPI_CR2_ERRIE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -1161,7 +1176,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_ERR(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_RXNE(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_RXNE(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_RXNEIE) == (SPI_CR2_RXNEIE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -1172,7 +1187,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_RXNE(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_TXE(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledIT_TXE(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_TXEIE) == (SPI_CR2_TXEIE)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -1213,7 +1228,7 @@ __STATIC_INLINE void LL_SPI_DisableDMAReq_RX(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_RX(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_RX(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_RXDMAEN) == (SPI_CR2_RXDMAEN)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -1246,7 +1261,7 @@ __STATIC_INLINE void LL_SPI_DisableDMAReq_TX(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_TX(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_TX(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return ((READ_BIT(SPIx->CR2, SPI_CR2_TXDMAEN) == (SPI_CR2_TXDMAEN)) ? 1UL : 0UL);
|
||||
}
|
||||
@ -1273,7 +1288,7 @@ __STATIC_INLINE void LL_SPI_SetDMAParity_RX(SPI_TypeDef *SPIx, uint32_t Parity)
|
||||
* @arg @ref LL_SPI_DMA_PARITY_ODD
|
||||
* @arg @ref LL_SPI_DMA_PARITY_EVEN
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_RX(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_RX(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMARX) >> SPI_CR2_LDMARX_Pos);
|
||||
}
|
||||
@ -1300,7 +1315,7 @@ __STATIC_INLINE void LL_SPI_SetDMAParity_TX(SPI_TypeDef *SPIx, uint32_t Parity)
|
||||
* @arg @ref LL_SPI_DMA_PARITY_ODD
|
||||
* @arg @ref LL_SPI_DMA_PARITY_EVEN
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMATX) >> SPI_CR2_LDMATX_Pos);
|
||||
}
|
||||
@ -1311,7 +1326,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX(SPI_TypeDef *SPIx)
|
||||
* @param SPIx SPI Instance
|
||||
* @retval Address of data register
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_DMA_GetRegAddr(SPI_TypeDef *SPIx)
|
||||
__STATIC_INLINE uint32_t LL_SPI_DMA_GetRegAddr(const SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t) &(SPIx->DR);
|
||||
}
|
||||
@ -1388,7 +1403,7 @@ __STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)
|
||||
* @{
|
||||
*/
|
||||
|
||||
ErrorStatus LL_SPI_DeInit(SPI_TypeDef *SPIx);
|
||||
ErrorStatus LL_SPI_DeInit(const SPI_TypeDef *SPIx);
|
||||
ErrorStatus LL_SPI_Init(SPI_TypeDef *SPIx, LL_SPI_InitTypeDef *SPI_InitStruct);
|
||||
void LL_SPI_StructInit(LL_SPI_InitTypeDef *SPI_InitStruct);
|
||||
|
||||
|
Reference in New Issue
Block a user