STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE uint8_t LL_SPI_ReceiveData8 (SPI_TypeDef *SPIx)
 Read 8-Bits in the data register DR DR LL_SPI_ReceiveData8. More...
 
__STATIC_INLINE uint16_t LL_SPI_ReceiveData16 (SPI_TypeDef *SPIx)
 Read 16-Bits in the data register DR DR LL_SPI_ReceiveData16. More...
 
__STATIC_INLINE void LL_SPI_TransmitData8 (SPI_TypeDef *SPIx, uint8_t TxData)
 Write 8-Bits in the data register DR DR LL_SPI_TransmitData8. More...
 
__STATIC_INLINE void LL_SPI_TransmitData16 (SPI_TypeDef *SPIx, uint16_t TxData)
 Write 16-Bits in the data register DR DR LL_SPI_TransmitData16. More...
 

Detailed Description

Function Documentation

◆ LL_SPI_ReceiveData16()

__STATIC_INLINE uint16_t LL_SPI_ReceiveData16 ( SPI_TypeDef *  SPIx)

Read 16-Bits in the data register DR DR LL_SPI_ReceiveData16.

Parameters
SPIxSPI Instance
Return values
RxDataValue between Min_Data=0x00 and Max_Data=0xFFFF

Definition at line 1345 of file stm32l4xx_ll_spi.h.

1346 {
1347  return (uint16_t)(READ_REG(SPIx->DR));
1348 }

◆ LL_SPI_ReceiveData8()

__STATIC_INLINE uint8_t LL_SPI_ReceiveData8 ( SPI_TypeDef *  SPIx)

Read 8-Bits in the data register DR DR LL_SPI_ReceiveData8.

Parameters
SPIxSPI Instance
Return values
RxDataValue between Min_Data=0x00 and Max_Data=0xFF

Definition at line 1334 of file stm32l4xx_ll_spi.h.

1335 {
1336  return (uint8_t)(READ_REG(SPIx->DR));
1337 }

◆ LL_SPI_TransmitData16()

__STATIC_INLINE void LL_SPI_TransmitData16 ( SPI_TypeDef *  SPIx,
uint16_t  TxData 
)

Write 16-Bits in the data register DR DR LL_SPI_TransmitData16.

Parameters
SPIxSPI Instance
TxDataValue between Min_Data=0x00 and Max_Data=0xFFFF
Return values
None

Definition at line 1374 of file stm32l4xx_ll_spi.h.

1375 {
1376 #if defined (__GNUC__)
1377  __IO uint16_t *spidr = ((__IO uint16_t *)&SPIx->DR);
1378  *spidr = TxData;
1379 #else
1380  SPIx->DR = TxData;
1381 #endif
1382 }

◆ LL_SPI_TransmitData8()

__STATIC_INLINE void LL_SPI_TransmitData8 ( SPI_TypeDef *  SPIx,
uint8_t  TxData 
)

Write 8-Bits in the data register DR DR LL_SPI_TransmitData8.

Parameters
SPIxSPI Instance
TxDataValue between Min_Data=0x00 and Max_Data=0xFF
Return values
None

Definition at line 1357 of file stm32l4xx_ll_spi.h.

1358 {
1359 #if defined (__GNUC__)
1360  __IO uint8_t *spidr = ((__IO uint8_t *)&SPIx->DR);
1361  *spidr = TxData;
1362 #else
1363  *((__IO uint8_t *)&SPIx->DR) = TxData;
1364 #endif
1365 }