STM32H735xx HAL User Manual
|
CEC Transmit/Receive functions. More...
Functions | |
HAL_StatusTypeDef | HAL_CEC_Transmit_IT (CEC_HandleTypeDef *hcec, uint8_t InitiatorAddress, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size) |
Send data in interrupt mode. | |
uint32_t | HAL_CEC_GetLastReceivedFrameSize (CEC_HandleTypeDef *hcec) |
Get size of the received frame. | |
void | HAL_CEC_ChangeRxBuffer (CEC_HandleTypeDef *hcec, uint8_t *Rxbuffer) |
Change Rx Buffer. | |
void | HAL_CEC_IRQHandler (CEC_HandleTypeDef *hcec) |
This function handles CEC interrupt requests. | |
__weak void | HAL_CEC_TxCpltCallback (CEC_HandleTypeDef *hcec) |
Tx Transfer completed callback. | |
__weak void | HAL_CEC_RxCpltCallback (CEC_HandleTypeDef *hcec, uint32_t RxFrameSize) |
Rx Transfer completed callback. | |
__weak void | HAL_CEC_ErrorCallback (CEC_HandleTypeDef *hcec) |
CEC error callbacks. |
CEC Transmit/Receive functions.
=============================================================================== ##### IO operation functions ##### =============================================================================== This subsection provides a set of functions allowing to manage the CEC data transfers. (#) The CEC handle must contain the initiator (TX side) and the destination (RX side) logical addresses (4-bit long addresses, 0xF for broadcast messages destination) (#) The communication is performed using Interrupts. These API's return the HAL status. The end of the data processing will be indicated through the dedicated CEC IRQ when using Interrupt mode. The HAL_CEC_TxCpltCallback(), HAL_CEC_RxCpltCallback() user callbacks will be executed respectively at the end of the transmit or Receive process The HAL_CEC_ErrorCallback() user callback will be executed when a communication error is detected (#) API's with Interrupt are : (+) HAL_CEC_Transmit_IT() (+) HAL_CEC_IRQHandler() (#) A set of User Callbacks are provided: (+) HAL_CEC_TxCpltCallback() (+) HAL_CEC_RxCpltCallback() (+) HAL_CEC_ErrorCallback()
void HAL_CEC_ChangeRxBuffer | ( | CEC_HandleTypeDef * | hcec, |
uint8_t * | Rxbuffer | ||
) |
Change Rx Buffer.
hcec | CEC handle |
Rxbuffer | Rx Buffer |
Frame | size |
Definition at line 764 of file stm32h7xx_hal_cec.c.
References __CEC_HandleTypeDef::Init, and CEC_InitTypeDef::RxBuffer.
void HAL_CEC_ErrorCallback | ( | CEC_HandleTypeDef * | hcec | ) |
CEC error callbacks.
hcec | CEC handle |
None |
Definition at line 928 of file stm32h7xx_hal_cec.c.
Referenced by HAL_CEC_Init(), HAL_CEC_IRQHandler(), and HAL_CEC_UnRegisterCallback().
uint32_t HAL_CEC_GetLastReceivedFrameSize | ( | CEC_HandleTypeDef * | hcec | ) |
Get size of the received frame.
hcec | CEC handle |
Frame | size |
Definition at line 752 of file stm32h7xx_hal_cec.c.
References __CEC_HandleTypeDef::RxXferSize.
void HAL_CEC_IRQHandler | ( | CEC_HandleTypeDef * | hcec | ) |
This function handles CEC interrupt requests.
hcec | CEC handle |
None |
Definition at line 774 of file stm32h7xx_hal_cec.c.
References __HAL_CEC_CLEAR_FLAG, __HAL_CEC_LAST_BYTE_TX_SET, CEC_FLAG_ARBLST, CEC_FLAG_LBPE, CEC_FLAG_RXBR, CEC_FLAG_RXEND, CEC_FLAG_SBPE, CEC_FLAG_TXBR, CEC_FLAG_TXEND, __CEC_HandleTypeDef::ErrorCallback, __CEC_HandleTypeDef::ErrorCode, __CEC_HandleTypeDef::gState, HAL_CEC_ERROR_ARBLST, HAL_CEC_ERROR_BRE, HAL_CEC_ERROR_NONE, HAL_CEC_ERROR_RXACKE, HAL_CEC_ERROR_RXOVR, HAL_CEC_ERROR_TXACKE, HAL_CEC_ERROR_TXERR, HAL_CEC_ERROR_TXUDR, HAL_CEC_ErrorCallback(), HAL_CEC_RxCpltCallback(), HAL_CEC_STATE_BUSY_RX, HAL_CEC_STATE_READY, HAL_CEC_TxCpltCallback(), __CEC_HandleTypeDef::Init, __CEC_HandleTypeDef::Instance, __CEC_HandleTypeDef::pTxBuffPtr, CEC_InitTypeDef::RxBuffer, __CEC_HandleTypeDef::RxCpltCallback, __CEC_HandleTypeDef::RxState, __CEC_HandleTypeDef::RxXferSize, __CEC_HandleTypeDef::TxCpltCallback, and __CEC_HandleTypeDef::TxXferCount.
void HAL_CEC_RxCpltCallback | ( | CEC_HandleTypeDef * | hcec, |
uint32_t | RxFrameSize | ||
) |
Rx Transfer completed callback.
hcec | CEC handle |
RxFrameSize | Size of frame |
None |
Definition at line 913 of file stm32h7xx_hal_cec.c.
Referenced by HAL_CEC_Init(), HAL_CEC_IRQHandler(), and HAL_CEC_UnRegisterRxCpltCallback().
HAL_StatusTypeDef HAL_CEC_Transmit_IT | ( | CEC_HandleTypeDef * | hcec, |
uint8_t | InitiatorAddress, | ||
uint8_t | DestinationAddress, | ||
uint8_t * | pData, | ||
uint32_t | Size | ||
) |
Send data in interrupt mode.
hcec | CEC handle |
InitiatorAddress | Initiator address |
DestinationAddress | destination logical address |
pData | pointer to input byte data buffer |
Size | amount of data to be sent in bytes (without counting the header). 0 means only the header is sent (ping operation). Maximum TX size is 15 bytes (1 opcode and up to 14 operands). |
HAL | status |
Definition at line 696 of file stm32h7xx_hal_cec.c.
References __HAL_CEC_FIRST_BYTE_TX_SET, __HAL_CEC_LAST_BYTE_TX_SET, assert_param, CEC_INITIATOR_LSB_POS, __CEC_HandleTypeDef::ErrorCode, __CEC_HandleTypeDef::gState, HAL_CEC_ERROR_NONE, HAL_CEC_STATE_BUSY_TX, HAL_CEC_STATE_READY, __CEC_HandleTypeDef::Instance, IS_CEC_ADDRESS, IS_CEC_MSGSIZE, __CEC_HandleTypeDef::pTxBuffPtr, and __CEC_HandleTypeDef::TxXferCount.
void HAL_CEC_TxCpltCallback | ( | CEC_HandleTypeDef * | hcec | ) |
Tx Transfer completed callback.
hcec | CEC handle |
None |
Definition at line 898 of file stm32h7xx_hal_cec.c.
Referenced by HAL_CEC_Init(), HAL_CEC_IRQHandler(), and HAL_CEC_UnRegisterCallback().