Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

Data_Management

Data_Management
[I2C Exported Functions]

Functions

__STATIC_INLINE void LL_I2C_AcknowledgeNextData (I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
 Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match code or next received byte.
__STATIC_INLINE void LL_I2C_HandleTransfer (I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize, uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
 Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set).
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection (I2C_TypeDef *I2Cx)
 Indicate the value of transfer direction (slave mode).
__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode (I2C_TypeDef *I2Cx)
 Return the slave matched address.
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8 (I2C_TypeDef *I2Cx)
 Read Receive Data register.
__STATIC_INLINE void LL_I2C_TransmitData8 (I2C_TypeDef *I2Cx, uint8_t Data)
 Write in Transmit Data Register .

Function Documentation

__STATIC_INLINE void LL_I2C_AcknowledgeNextData ( I2C_TypeDef *  I2Cx,
uint32_t  TypeAcknowledge 
)

Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match code or next received byte.

Note:
Usage in Slave mode only. CR2 NACK LL_I2C_AcknowledgeNextData
Parameters:
I2CxI2C Instance.
TypeAcknowledgeThis parameter can be one of the following values:

  • LL_I2C_ACK
  • LL_I2C_NACK
Return values:
None

Definition at line 1292 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode ( I2C_TypeDef *  I2Cx )

Return the slave matched address.

ISR ADDCODE LL_I2C_GetAddressMatchCode

Parameters:
I2CxI2C Instance.
Return values:
0..0x3F

Definition at line 1356 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection ( I2C_TypeDef *  I2Cx )

Indicate the value of transfer direction (slave mode).

RESET: Write transfer, Slave enters in receiver mode. SET: Read transfer, Slave enters in transmitter mode. ISR DIR LL_I2C_GetTransferDirection

Parameters:
I2CxI2C Instance.
Return values:
Returnedvalue can be one of the following values:

  • LL_I2C_DIRECTION_WRITE
  • LL_I2C_DIRECTION_READ

Definition at line 1345 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_HandleTransfer ( I2C_TypeDef *  I2Cx,
uint32_t  SlaveAddr,
uint32_t  SlaveAddrSize,
uint32_t  TransferSize,
uint32_t  EndMode,
uint32_t  Request 
)

Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set).

CR2 SADD LL_I2C_HandleTransfer
CR2 ADD10 LL_I2C_HandleTransfer
CR2 RD_WRN LL_I2C_HandleTransfer
CR2 START LL_I2C_HandleTransfer
CR2 STOP LL_I2C_HandleTransfer
CR2 RELOAD LL_I2C_HandleTransfer
CR2 NBYTES LL_I2C_HandleTransfer
CR2 AUTOEND LL_I2C_HandleTransfer
CR2 HEAD10R LL_I2C_HandleTransfer

Parameters:
I2CxI2C Instance.
SlaveAddrSpecifies the slave address to be programmed.
SlaveAddrSizeThis parameter can be one of the following values:

  • LL_I2C_ADDRSLAVE_7BIT
  • LL_I2C_ADDRSLAVE_10BIT
TransferSizeSpecifies the number of bytes to be programmed. This parameter must be a value between 0 and 255.
EndModeThis parameter can be one of the following values:

  • LL_I2C_MODE_RELOAD
  • LL_I2C_MODE_AUTOEND
  • LL_I2C_MODE_SOFTEND
RequestThis parameter can be one of the following values:

  • LL_I2C_GENERATE_NOSTARTSTOP
  • LL_I2C_GENERATE_STOP
  • LL_I2C_GENERATE_START_READ
  • LL_I2C_GENERATE_START_WRITE
  • LL_I2C_GENERATE_RESTART_7BIT_READ
  • LL_I2C_GENERATE_RESTART_7BIT_WRITE
  • LL_I2C_GENERATE_RESTART_10BIT_READ
  • LL_I2C_GENERATE_RESTART_10BIT_WRITE
Return values:
None

Definition at line 1329 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE uint8_t LL_I2C_ReceiveData8 ( I2C_TypeDef *  I2Cx )

Read Receive Data register.

RXDR RXDATA LL_I2C_ReceiveData8

Parameters:
I2CxI2C Instance.
Return values:
0..0xFF

Definition at line 1367 of file stm32l4xx_ll_i2c.h.

__STATIC_INLINE void LL_I2C_TransmitData8 ( I2C_TypeDef *  I2Cx,
uint8_t  Data 
)

Write in Transmit Data Register .

TXDR TXDATA LL_I2C_TransmitData8

Parameters:
I2CxI2C Instance.
Data0..0xFF
Return values:
None

Definition at line 1379 of file stm32l4xx_ll_i2c.h.