STM32F103xB HAL User Manual
|
Functions | |
static void | I2C_DMAXferCplt (DMA_HandleTypeDef *hdma) |
DMA I2C process complete callback. | |
static void | I2C_DMAError (DMA_HandleTypeDef *hdma) |
DMA I2C communication error callback. | |
static void | I2C_DMAAbort (DMA_HandleTypeDef *hdma) |
DMA I2C communication abort callback (To be called at end of DMA Abort procedure). | |
static void | I2C_ITError (I2C_HandleTypeDef *hi2c) |
I2C interrupts error process. | |
static HAL_StatusTypeDef | I2C_MasterRequestWrite (I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Timeout, uint32_t Tickstart) |
static HAL_StatusTypeDef | I2C_MasterRequestRead (I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Timeout, uint32_t Tickstart) |
Master sends target device address for read request. | |
static HAL_StatusTypeDef | I2C_RequestMemoryWrite (I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, uint32_t Tickstart) |
Master sends target device address followed by internal memory address for write request. | |
static HAL_StatusTypeDef | I2C_RequestMemoryRead (I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, uint32_t Tickstart) |
Master sends target device address followed by internal memory address for read request. | |
static HAL_StatusTypeDef | I2C_WaitOnFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout. | |
static HAL_StatusTypeDef | I2C_WaitOnMasterAddressFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Flag, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout for Master addressing phase. | |
static HAL_StatusTypeDef | I2C_WaitOnTXEFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout for specific usage of TXE flag. | |
static HAL_StatusTypeDef | I2C_WaitOnBTFFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout for specific usage of BTF flag. | |
static HAL_StatusTypeDef | I2C_WaitOnRXNEFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout for specific usage of RXNE flag. | |
static HAL_StatusTypeDef | I2C_WaitOnSTOPFlagUntilTimeout (I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart) |
This function handles I2C Communication Timeout for specific usage of STOP flag. | |
static HAL_StatusTypeDef | I2C_WaitOnSTOPRequestThroughIT (I2C_HandleTypeDef *hi2c) |
This function handles I2C Communication Timeout for specific usage of STOP request through Interrupt. | |
static HAL_StatusTypeDef | I2C_IsAcknowledgeFailed (I2C_HandleTypeDef *hi2c) |
This function handles Acknowledge failed detection during an I2C Communication. | |
static void | I2C_MasterTransmit_TXE (I2C_HandleTypeDef *hi2c) |
Handle TXE flag for Master. | |
static void | I2C_MasterTransmit_BTF (I2C_HandleTypeDef *hi2c) |
Handle BTF flag for Master transmitter. | |
static void | I2C_MasterReceive_RXNE (I2C_HandleTypeDef *hi2c) |
Handle RXNE flag for Master. | |
static void | I2C_MasterReceive_BTF (I2C_HandleTypeDef *hi2c) |
Handle BTF flag for Master receiver. | |
static void | I2C_Master_SB (I2C_HandleTypeDef *hi2c) |
Handle SB flag for Master. | |
static void | I2C_Master_ADD10 (I2C_HandleTypeDef *hi2c) |
Handle ADD10 flag for Master. | |
static void | I2C_Master_ADDR (I2C_HandleTypeDef *hi2c) |
Handle ADDR flag for Master. | |
static void | I2C_SlaveTransmit_TXE (I2C_HandleTypeDef *hi2c) |
Handle TXE flag for Slave. | |
static void | I2C_SlaveTransmit_BTF (I2C_HandleTypeDef *hi2c) |
Handle BTF flag for Slave transmitter. | |
static void | I2C_SlaveReceive_RXNE (I2C_HandleTypeDef *hi2c) |
Handle RXNE flag for Slave. | |
static void | I2C_SlaveReceive_BTF (I2C_HandleTypeDef *hi2c) |
Handle BTF flag for Slave receiver. | |
static void | I2C_Slave_ADDR (I2C_HandleTypeDef *hi2c, uint32_t IT2Flags) |
Handle ADD flag for Slave. | |
static void | I2C_Slave_STOPF (I2C_HandleTypeDef *hi2c) |
Handle STOPF flag for Slave. | |
static void | I2C_Slave_AF (I2C_HandleTypeDef *hi2c) |
static void | I2C_MemoryTransmit_TXE_BTF (I2C_HandleTypeDef *hi2c) |
Handle TXE and BTF flag for Memory transmitter. | |
static void | I2C_ConvertOtherXferOptions (I2C_HandleTypeDef *hi2c) |
Convert I2Cx OTHER_xxx XferOptions to functional XferOptions. |
static void I2C_ConvertOtherXferOptions | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Convert I2Cx OTHER_xxx XferOptions to functional XferOptions.
hi2c | I2C handle. |
None |
Definition at line 7567 of file stm32f1xx_hal_i2c.c.
References I2C_FIRST_AND_LAST_FRAME, I2C_FIRST_FRAME, I2C_OTHER_AND_LAST_FRAME, I2C_OTHER_FRAME, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_DMAAbort | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA I2C communication abort callback (To be called at end of DMA Abort procedure).
hdma | DMA handle. |
None |
Definition at line 7171 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE, __HAL_I2C_ENABLE, __I2C_HandleTypeDef::AbortCpltCallback, __I2C_HandleTypeDef::ErrorCallback, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_AbortCpltCallback(), HAL_I2C_ERROR_NONE, HAL_I2C_ERROR_TIMEOUT, HAL_I2C_ErrorCallback(), HAL_I2C_MODE_NONE, HAL_I2C_STATE_ABORT, HAL_I2C_STATE_LISTEN, HAL_I2C_STATE_READY, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_STATE_NONE, I2C_TIMEOUT_FLAG, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __I2C_HandleTypeDef::XferCount, and __DMA_HandleTypeDef::XferCpltCallback.
Referenced by HAL_I2C_Slave_Seq_Receive_DMA(), HAL_I2C_Slave_Seq_Transmit_DMA(), I2C_ITError(), and I2C_Slave_STOPF().
static void I2C_DMAError | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA I2C communication error callback.
hdma | DMA handle |
None |
Definition at line 7136 of file stm32f1xx_hal_i2c.c.
References __I2C_HandleTypeDef::ErrorCallback, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_DMA, HAL_I2C_ErrorCallback(), HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, and __DMA_HandleTypeDef::XferCpltCallback.
Referenced by HAL_I2C_Master_Receive_DMA(), HAL_I2C_Master_Seq_Receive_DMA(), HAL_I2C_Master_Seq_Transmit_DMA(), HAL_I2C_Master_Transmit_DMA(), HAL_I2C_Mem_Read_DMA(), HAL_I2C_Mem_Write_DMA(), HAL_I2C_Slave_Receive_DMA(), HAL_I2C_Slave_Seq_Receive_DMA(), HAL_I2C_Slave_Seq_Transmit_DMA(), and HAL_I2C_Slave_Transmit_DMA().
static void I2C_DMAXferCplt | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA I2C process complete callback.
hdma | DMA handle |
None |
Definition at line 6998 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, __HAL_I2C_ENABLE_IT, __I2C_HandleTypeDef::ErrorCallback, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_NONE, HAL_I2C_ErrorCallback(), HAL_I2C_MasterRxCpltCallback(), HAL_I2C_MemRxCpltCallback(), HAL_I2C_MODE_MEM, HAL_I2C_MODE_NONE, HAL_I2C_MODE_SLAVE, HAL_I2C_SlaveRxCpltCallback(), HAL_I2C_SlaveTxCpltCallback(), HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_BUSY_RX_LISTEN, HAL_I2C_STATE_BUSY_TX, HAL_I2C_STATE_BUSY_TX_LISTEN, HAL_I2C_STATE_LISTEN, HAL_I2C_STATE_READY, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_FIRST_AND_LAST_FRAME, I2C_IT_ERR, I2C_IT_EVT, I2C_LAST_FRAME, I2C_NO_OPTION_FRAME, I2C_OTHER_AND_LAST_FRAME, I2C_STATE_MASTER_BUSY_RX, I2C_STATE_NONE, I2C_STATE_SLAVE_BUSY_RX, I2C_STATE_SLAVE_BUSY_TX, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::MasterRxCpltCallback, __I2C_HandleTypeDef::MemRxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::SlaveRxCpltCallback, __I2C_HandleTypeDef::SlaveTxCpltCallback, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, __DMA_HandleTypeDef::XferCpltCallback, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_Master_Receive_DMA(), HAL_I2C_Master_Seq_Receive_DMA(), HAL_I2C_Master_Seq_Transmit_DMA(), HAL_I2C_Master_Transmit_DMA(), HAL_I2C_Mem_Read_DMA(), HAL_I2C_Mem_Write_DMA(), HAL_I2C_Slave_Receive_DMA(), HAL_I2C_Slave_Seq_Receive_DMA(), HAL_I2C_Slave_Seq_Transmit_DMA(), and HAL_I2C_Slave_Transmit_DMA().
static HAL_StatusTypeDef I2C_IsAcknowledgeFailed | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
This function handles Acknowledge failed detection during an I2C Communication.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
HAL | status |
Definition at line 7542 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_FLAG, __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_AF, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_AF, I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by I2C_WaitOnBTFFlagUntilTimeout(), I2C_WaitOnSTOPFlagUntilTimeout(), and I2C_WaitOnTXEFlagUntilTimeout().
static void I2C_ITError | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
I2C interrupts error process.
hi2c | I2C handle. |
None |
Definition at line 6473 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE, __HAL_I2C_DISABLE_IT, __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::AbortCpltCallback, __I2C_HandleTypeDef::ErrorCallback, __I2C_HandleTypeDef::ErrorCode, HAL_DMA_Abort_IT(), HAL_DMA_STATE_READY, HAL_I2C_AbortCpltCallback(), HAL_I2C_ERROR_AF, HAL_I2C_ERROR_ARLO, HAL_I2C_ERROR_BERR, HAL_I2C_ERROR_NONE, HAL_I2C_ERROR_OVR, HAL_I2C_ErrorCallback(), HAL_I2C_ListenCpltCallback(), HAL_I2C_MODE_MASTER, HAL_I2C_MODE_MEM, HAL_I2C_MODE_NONE, HAL_I2C_STATE_ABORT, HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_LISTEN, HAL_I2C_STATE_READY, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_DMAAbort(), I2C_FLAG_RXNE, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_NO_OPTION_FRAME, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::ListenCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __DMA_HandleTypeDef::State, __I2C_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_ER_IRQHandler(), HAL_I2C_Master_Abort_IT(), and I2C_Slave_STOPF().
static void I2C_Master_ADD10 | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle ADD10 flag for Master.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5895 of file stm32f1xx_hal_i2c.c.
References __I2C_HandleTypeDef::Devaddress, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_10BIT_ADDRESS, __I2C_HandleTypeDef::Instance, and __DMA_HandleTypeDef::XferCpltCallback.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_Master_ADDR | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle ADDR flag for Master.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5914 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_ADDRFLAG, I2C_InitTypeDef::AddressingMode, __I2C_HandleTypeDef::EventCount, HAL_I2C_MODE_MEM, HAL_I2C_STATE_BUSY_RX, I2C_ADDRESSINGMODE_10BIT, I2C_FIRST_AND_LAST_FRAME, I2C_FIRST_AND_NEXT_FRAME, I2C_FIRST_FRAME, I2C_LAST_FRAME, I2C_LAST_FRAME_NO_STOP, I2C_NEXT_FRAME, I2C_NO_OPTION_FRAME, I2C_STATE_MASTER_BUSY_RX, __I2C_HandleTypeDef::Init, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_Master_SB | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle SB flag for Master.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5834 of file stm32f1xx_hal_i2c.c.
References I2C_InitTypeDef::AddressingMode, __I2C_HandleTypeDef::Devaddress, __I2C_HandleTypeDef::EventCount, HAL_I2C_MODE_MEM, HAL_I2C_STATE_BUSY_TX, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_10BIT_HEADER_READ, I2C_10BIT_HEADER_WRITE, I2C_7BIT_ADD_READ, I2C_7BIT_ADD_WRITE, I2C_ADDRESSINGMODE_7BIT, __I2C_HandleTypeDef::Init, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::State, and __DMA_HandleTypeDef::XferCpltCallback.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_MasterReceive_BTF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle BTF flag for Master receiver.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5708 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, HAL_I2C_MasterRxCpltCallback(), HAL_I2C_MemRxCpltCallback(), HAL_I2C_MODE_MEM, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FIRST_AND_NEXT_FRAME, I2C_FIRST_FRAME, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_LAST_FRAME_NO_STOP, I2C_NEXT_FRAME, I2C_STATE_MASTER_BUSY_RX, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::MasterRxCpltCallback, __I2C_HandleTypeDef::MemRxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_MasterReceive_RXNE | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle RXNE flag for Master.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5600 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, __I2C_HandleTypeDef::ErrorCallback, HAL_I2C_ErrorCallback(), HAL_I2C_MasterRxCpltCallback(), HAL_I2C_MemRxCpltCallback(), HAL_I2C_MODE_MEM, HAL_I2C_MODE_NONE, HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_READY, I2C_FIRST_AND_NEXT_FRAME, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_STATE_MASTER_BUSY_RX, I2C_STATE_NONE, I2C_WaitOnSTOPRequestThroughIT(), __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::MasterRxCpltCallback, __I2C_HandleTypeDef::MemRxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, USE_HAL_I2C_REGISTER_CALLBACKS, __I2C_HandleTypeDef::XferCount, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static HAL_StatusTypeDef I2C_MasterRequestRead | ( | I2C_HandleTypeDef * | hi2c, |
uint16_t | DevAddress, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
Master sends target device address for read request.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
DevAddress | Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 6709 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_ADDRFLAG, I2C_InitTypeDef::AddressingMode, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_WRONG_START, I2C_10BIT_ADDRESS, I2C_10BIT_HEADER_READ, I2C_10BIT_HEADER_WRITE, I2C_7BIT_ADD_READ, I2C_ADDRESSINGMODE_7BIT, I2C_FIRST_AND_LAST_FRAME, I2C_FIRST_FRAME, I2C_FLAG_ADD10, I2C_FLAG_ADDR, I2C_FLAG_SB, I2C_NO_OPTION_FRAME, I2C_STATE_MASTER_BUSY_TX, I2C_WaitOnFlagUntilTimeout(), I2C_WaitOnMasterAddressFlagUntilTimeout(), __I2C_HandleTypeDef::Init, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_Master_Receive().
static HAL_StatusTypeDef I2C_MasterRequestWrite | ( | I2C_HandleTypeDef * | hi2c, |
uint16_t | DevAddress, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
DevAddress | Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 6639 of file stm32f1xx_hal_i2c.c.
References I2C_InitTypeDef::AddressingMode, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_WRONG_START, I2C_10BIT_ADDRESS, I2C_10BIT_HEADER_WRITE, I2C_7BIT_ADD_WRITE, I2C_ADDRESSINGMODE_7BIT, I2C_FIRST_AND_LAST_FRAME, I2C_FIRST_FRAME, I2C_FLAG_ADD10, I2C_FLAG_ADDR, I2C_FLAG_SB, I2C_NO_OPTION_FRAME, I2C_STATE_MASTER_BUSY_RX, I2C_WaitOnFlagUntilTimeout(), I2C_WaitOnMasterAddressFlagUntilTimeout(), __I2C_HandleTypeDef::Init, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_Master_Transmit().
static void I2C_MasterTransmit_BTF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle BTF flag for Master transmitter.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5447 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, HAL_I2C_MasterTxCpltCallback(), HAL_I2C_MODE_NONE, HAL_I2C_STATE_BUSY_TX, HAL_I2C_STATE_READY, I2C_FIRST_AND_LAST_FRAME, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_LAST_FRAME, I2C_NO_OPTION_FRAME, I2C_STATE_MASTER_BUSY_TX, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::MasterTxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_MasterTransmit_TXE | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle TXE flag for Master.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5353 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, HAL_I2C_MasterTxCpltCallback(), HAL_I2C_MemTxCpltCallback(), HAL_I2C_MODE_MEM, HAL_I2C_MODE_NONE, HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_BUSY_TX, HAL_I2C_STATE_READY, I2C_FIRST_AND_LAST_FRAME, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_LAST_FRAME, I2C_MemoryTransmit_TXE_BTF(), I2C_NO_OPTION_FRAME, I2C_STATE_MASTER_BUSY_TX, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::MasterTxCpltCallback, __I2C_HandleTypeDef::MemTxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, __I2C_HandleTypeDef::XferCount, __I2C_HandleTypeDef::XferOptions, and __I2C_HandleTypeDef::XferSize.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_MemoryTransmit_TXE_BTF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle TXE and BTF flag for Memory transmitter.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 5514 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, __I2C_HandleTypeDef::EventCount, HAL_I2C_MemTxCpltCallback(), HAL_I2C_MODE_NONE, HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_BUSY_TX, HAL_I2C_STATE_READY, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_MEM_ADD_LSB, I2C_MEM_ADD_MSB, I2C_MEMADD_SIZE_8BIT, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Memaddress, __I2C_HandleTypeDef::MemaddSize, __I2C_HandleTypeDef::MemTxCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::State, and __I2C_HandleTypeDef::XferCount.
Referenced by HAL_I2C_EV_IRQHandler(), and I2C_MasterTransmit_TXE().
static HAL_StatusTypeDef I2C_RequestMemoryRead | ( | I2C_HandleTypeDef * | hi2c, |
uint16_t | DevAddress, | ||
uint16_t | MemAddress, | ||
uint16_t | MemAddSize, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
Master sends target device address followed by internal memory address for read request.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
DevAddress | Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface |
MemAddress | Internal memory address |
MemAddSize | Size of internal memory address |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 6889 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_ADDRFLAG, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_AF, HAL_I2C_WRONG_START, I2C_7BIT_ADD_READ, I2C_7BIT_ADD_WRITE, I2C_FLAG_ADDR, I2C_FLAG_SB, I2C_MEM_ADD_LSB, I2C_MEM_ADD_MSB, I2C_MEMADD_SIZE_8BIT, I2C_WaitOnFlagUntilTimeout(), I2C_WaitOnMasterAddressFlagUntilTimeout(), I2C_WaitOnTXEFlagUntilTimeout(), and __I2C_HandleTypeDef::Instance.
Referenced by HAL_I2C_Mem_Read(), and HAL_I2C_Mem_Read_DMA().
static HAL_StatusTypeDef I2C_RequestMemoryWrite | ( | I2C_HandleTypeDef * | hi2c, |
uint16_t | DevAddress, | ||
uint16_t | MemAddress, | ||
uint16_t | MemAddSize, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
Master sends target device address followed by internal memory address for write request.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
DevAddress | Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface |
MemAddress | Internal memory address |
MemAddSize | Size of internal memory address |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 6809 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_ADDRFLAG, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_AF, HAL_I2C_WRONG_START, I2C_7BIT_ADD_WRITE, I2C_FLAG_ADDR, I2C_FLAG_SB, I2C_MEM_ADD_LSB, I2C_MEM_ADD_MSB, I2C_MEMADD_SIZE_8BIT, I2C_WaitOnFlagUntilTimeout(), I2C_WaitOnMasterAddressFlagUntilTimeout(), I2C_WaitOnTXEFlagUntilTimeout(), and __I2C_HandleTypeDef::Instance.
Referenced by HAL_I2C_Mem_Write(), and HAL_I2C_Mem_Write_DMA().
static void I2C_Slave_ADDR | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | IT2Flags | ||
) | [static] |
Handle ADD flag for Slave.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
IT2Flags | Interrupt2 flags to handle. |
None |
Definition at line 6187 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_ADDRFLAG, __HAL_I2C_DISABLE_IT, __I2C_HandleTypeDef::AddrCallback, HAL_I2C_AddrCallback(), HAL_I2C_STATE_LISTEN, I2C_CHECK_FLAG, I2C_DIRECTION_RECEIVE, I2C_DIRECTION_TRANSMIT, I2C_FLAG_DUALF, I2C_FLAG_TRA, I2C_IT_BUF, __I2C_HandleTypeDef::Init, I2C_InitTypeDef::OwnAddress1, I2C_InitTypeDef::OwnAddress2, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_Slave_AF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6407 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_FLAG, __HAL_I2C_DISABLE_IT, HAL_I2C_ListenCpltCallback(), HAL_I2C_MODE_NONE, HAL_I2C_SlaveTxCpltCallback(), HAL_I2C_STATE_BUSY_TX, HAL_I2C_STATE_LISTEN, HAL_I2C_STATE_READY, I2C_FIRST_AND_LAST_FRAME, I2C_FLAG_AF, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_LAST_FRAME, I2C_NO_OPTION_FRAME, I2C_STATE_NONE, I2C_STATE_SLAVE_BUSY_TX, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::ListenCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::SlaveTxCpltCallback, __I2C_HandleTypeDef::State, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_ER_IRQHandler().
static void I2C_Slave_STOPF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle STOPF flag for Slave.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6238 of file stm32f1xx_hal_i2c.c.
References __HAL_DMA_GET_COUNTER, __HAL_I2C_CLEAR_STOPFLAG, __HAL_I2C_DISABLE_IT, __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_DMA_Abort_IT(), HAL_DMA_GetState(), HAL_DMA_STATE_READY, HAL_I2C_ERROR_AF, HAL_I2C_ERROR_NONE, HAL_I2C_ListenCpltCallback(), HAL_I2C_MODE_NONE, HAL_I2C_SlaveRxCpltCallback(), HAL_I2C_STATE_BUSY_RX, HAL_I2C_STATE_BUSY_RX_LISTEN, HAL_I2C_STATE_LISTEN, HAL_I2C_STATE_READY, __I2C_HandleTypeDef::hdmarx, __I2C_HandleTypeDef::hdmatx, I2C_DMAAbort(), I2C_FLAG_BTF, I2C_FLAG_RXNE, I2C_IT_BUF, I2C_IT_ERR, I2C_IT_EVT, I2C_ITError(), I2C_NO_OPTION_FRAME, I2C_STATE_NONE, I2C_STATE_SLAVE_BUSY_RX, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::ListenCpltCallback, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::SlaveRxCpltCallback, __I2C_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __I2C_HandleTypeDef::XferCount, and __I2C_HandleTypeDef::XferOptions.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_SlaveReceive_BTF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle BTF flag for Slave receiver.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6165 of file stm32f1xx_hal_i2c.c.
References __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::pBuffPtr, and __I2C_HandleTypeDef::XferCount.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_SlaveReceive_RXNE | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle RXNE flag for Slave.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6124 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, HAL_I2C_SlaveRxCpltCallback(), HAL_I2C_STATE_BUSY_RX_LISTEN, HAL_I2C_STATE_LISTEN, I2C_IT_BUF, I2C_STATE_SLAVE_BUSY_RX, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::SlaveRxCpltCallback, __I2C_HandleTypeDef::State, and __I2C_HandleTypeDef::XferCount.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_SlaveTransmit_BTF | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle BTF flag for Slave transmitter.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6103 of file stm32f1xx_hal_i2c.c.
References __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::pBuffPtr, and __I2C_HandleTypeDef::XferCount.
Referenced by HAL_I2C_EV_IRQHandler().
static void I2C_SlaveTransmit_TXE | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Handle TXE flag for Slave.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
None |
Definition at line 6062 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_DISABLE_IT, HAL_I2C_SlaveTxCpltCallback(), HAL_I2C_STATE_BUSY_TX_LISTEN, HAL_I2C_STATE_LISTEN, I2C_IT_BUF, I2C_STATE_SLAVE_BUSY_TX, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::pBuffPtr, __I2C_HandleTypeDef::PreviousState, __I2C_HandleTypeDef::SlaveTxCpltCallback, __I2C_HandleTypeDef::State, and __I2C_HandleTypeDef::XferCount.
Referenced by HAL_I2C_EV_IRQHandler().
static HAL_StatusTypeDef I2C_WaitOnBTFFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout for specific usage of BTF flag.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7397 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_BTF, I2C_IsAcknowledgeFailed(), I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_Master_Transmit(), and HAL_I2C_Mem_Write().
static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Flag, | ||
FlagStatus | Status, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
Flag | specifies the I2C flag to check. |
Status | The new Flag status (SET or RESET). |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7274 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_IsDeviceReady(), HAL_I2C_Master_Receive(), HAL_I2C_Master_Transmit(), HAL_I2C_Mem_Read(), HAL_I2C_Mem_Write(), HAL_I2C_Slave_Receive(), HAL_I2C_Slave_Transmit(), I2C_MasterRequestRead(), I2C_MasterRequestWrite(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().
static HAL_StatusTypeDef I2C_WaitOnMasterAddressFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Flag, | ||
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout for Master addressing phase.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
Flag | specifies the I2C flag to check. |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7308 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_FLAG, __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_AF, HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_AF, I2C_STATE_NONE, __I2C_HandleTypeDef::Instance, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by I2C_MasterRequestRead(), I2C_MasterRequestWrite(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().
static HAL_StatusTypeDef I2C_WaitOnRXNEFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout for specific usage of RXNE flag.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7497 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_CLEAR_FLAG, __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_NONE, HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_RXNE, I2C_FLAG_STOPF, I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_Master_Receive(), HAL_I2C_Mem_Read(), and HAL_I2C_Slave_Receive().
static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout for specific usage of STOP flag.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7435 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_STOPF, I2C_IsAcknowledgeFailed(), I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_Slave_Receive().
static HAL_StatusTypeDef I2C_WaitOnSTOPRequestThroughIT | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
This function handles I2C Communication Timeout for specific usage of STOP request through Interrupt.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
HAL | status |
Definition at line 7468 of file stm32f1xx_hal_i2c.c.
References __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_TIMEOUT, I2C_TIMEOUT_STOP_FLAG, and __I2C_HandleTypeDef::Instance.
Referenced by I2C_MasterReceive_RXNE().
static HAL_StatusTypeDef I2C_WaitOnTXEFlagUntilTimeout | ( | I2C_HandleTypeDef * | hi2c, |
uint32_t | Timeout, | ||
uint32_t | Tickstart | ||
) | [static] |
This function handles I2C Communication Timeout for specific usage of TXE flag.
hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
Timeout | Timeout duration |
Tickstart | Tick start value |
HAL | status |
Definition at line 7359 of file stm32f1xx_hal_i2c.c.
References __HAL_I2C_GET_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2C_ERROR_TIMEOUT, HAL_I2C_MODE_NONE, HAL_I2C_STATE_READY, I2C_FLAG_TXE, I2C_IsAcknowledgeFailed(), I2C_STATE_NONE, __I2C_HandleTypeDef::Mode, __I2C_HandleTypeDef::PreviousState, and __I2C_HandleTypeDef::State.
Referenced by HAL_I2C_Master_Transmit(), HAL_I2C_Mem_Write(), HAL_I2C_Slave_Transmit(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().