STM32H735xx HAL User Manual
Functions
Input and Output operation functions
CEC Exported Functions

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.

Detailed Description

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()


Function Documentation

void HAL_CEC_ChangeRxBuffer ( CEC_HandleTypeDef hcec,
uint8_t *  Rxbuffer 
)

Change Rx Buffer.

Parameters:
hcecCEC handle
RxbufferRx Buffer
Note:
This function can be called only inside the HAL_CEC_RxCpltCallback()
Return values:
Framesize

Definition at line 764 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::Init, and CEC_InitTypeDef::RxBuffer.

CEC error callbacks.

Parameters:
hcecCEC handle
Return values:
None

Definition at line 928 of file stm32h7xx_hal_cec.c.

Referenced by HAL_CEC_Init(), HAL_CEC_IRQHandler(), and HAL_CEC_UnRegisterCallback().

Get size of the received frame.

Parameters:
hcecCEC handle
Return values:
Framesize

Definition at line 752 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::RxXferSize.

void HAL_CEC_RxCpltCallback ( CEC_HandleTypeDef hcec,
uint32_t  RxFrameSize 
)

Rx Transfer completed callback.

Parameters:
hcecCEC handle
RxFrameSizeSize of frame
Return values:
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.

Parameters:
hcecCEC handle
InitiatorAddressInitiator address
DestinationAddressdestination logical address
pDatapointer to input byte data buffer
Sizeamount 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).
Return values:
HALstatus

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.

Tx Transfer completed callback.

Parameters:
hcecCEC handle
Return values:
None

Definition at line 898 of file stm32h7xx_hal_cec.c.

Referenced by HAL_CEC_Init(), HAL_CEC_IRQHandler(), and HAL_CEC_UnRegisterCallback().