STM32H735xx HAL User Manual
Functions
Initialization and de-initialization functions
CEC Exported Functions

Initialization and Configuration functions. More...

Functions

HAL_StatusTypeDef HAL_CEC_Init (CEC_HandleTypeDef *hcec)
 Initializes the CEC mode according to the specified parameters in the CEC_InitTypeDef and creates the associated handle .
HAL_StatusTypeDef HAL_CEC_DeInit (CEC_HandleTypeDef *hcec)
 DeInitializes the CEC peripheral.
HAL_StatusTypeDef HAL_CEC_SetDeviceAddress (CEC_HandleTypeDef *hcec, uint16_t CEC_OwnAddress)
 Initializes the Own Address of the CEC device.
__weak void HAL_CEC_MspInit (CEC_HandleTypeDef *hcec)
 CEC MSP Init.
__weak void HAL_CEC_MspDeInit (CEC_HandleTypeDef *hcec)
 CEC MSP DeInit.
HAL_StatusTypeDef HAL_CEC_RegisterCallback (CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID, pCEC_CallbackTypeDef pCallback)
 Register a User CEC Callback To be used instead of the weak predefined callback.
HAL_StatusTypeDef HAL_CEC_UnRegisterCallback (CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID)
 Unregister an CEC Callback CEC callabck is redirected to the weak predefined callback.
HAL_StatusTypeDef HAL_CEC_RegisterRxCpltCallback (CEC_HandleTypeDef *hcec, pCEC_RxCallbackTypeDef pCallback)
 Register CEC RX complete Callback To be used instead of the weak HAL_CEC_RxCpltCallback() predefined callback.
HAL_StatusTypeDef HAL_CEC_UnRegisterRxCpltCallback (CEC_HandleTypeDef *hcec)
 UnRegister CEC RX complete Callback CEC RX complete Callback is redirected to the weak HAL_CEC_RxCpltCallback() predefined callback.

Detailed Description

Initialization and Configuration functions.

===============================================================================
            ##### Initialization and Configuration functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to initialize the CEC
      (+) The following parameters need to be configured:
        (++) SignalFreeTime
        (++) Tolerance
        (++) BRERxStop                 (RX stopped or not upon Bit Rising Error)
        (++) BREErrorBitGen            (Error-Bit generation in case of Bit Rising Error)
        (++) LBPEErrorBitGen           (Error-Bit generation in case of Long Bit Period Error)
        (++) BroadcastMsgNoErrorBitGen (Error-bit generation in case of broadcast message error)
        (++) SignalFreeTimeOption      (SFT Timer start definition)
        (++) OwnAddress                (CEC device address)
        (++) ListenMode


Function Documentation

HAL_StatusTypeDef HAL_CEC_DeInit ( CEC_HandleTypeDef hcec)
HAL_StatusTypeDef HAL_CEC_Init ( CEC_HandleTypeDef hcec)

CEC MSP DeInit.

Parameters:
hcecCEC handle
Return values:
None

Definition at line 400 of file stm32h7xx_hal_cec.c.

Referenced by HAL_CEC_DeInit(), and HAL_CEC_UnRegisterCallback().

CEC MSP Init.

Parameters:
hcecCEC handle
Return values:
None

Definition at line 386 of file stm32h7xx_hal_cec.c.

Referenced by HAL_CEC_Init(), and HAL_CEC_UnRegisterCallback().

HAL_StatusTypeDef HAL_CEC_RegisterCallback ( CEC_HandleTypeDef hcec,
HAL_CEC_CallbackIDTypeDef  CallbackID,
pCEC_CallbackTypeDef  pCallback 
)

Register a User CEC Callback To be used instead of the weak predefined callback.

Parameters:
hcecCEC handle
CallbackIDID of the callback to be registered This parameter can be one of the following values:
pCallbackpointer to the Callback function
Return values:
HALstatus

Definition at line 422 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::ErrorCallback, __CEC_HandleTypeDef::ErrorCode, __CEC_HandleTypeDef::gState, HAL_CEC_ERROR_CB_ID, HAL_CEC_ERROR_INVALID_CALLBACK, HAL_CEC_MSPDEINIT_CB_ID, HAL_CEC_MSPINIT_CB_ID, HAL_CEC_STATE_READY, HAL_CEC_STATE_RESET, HAL_CEC_TX_CPLT_CB_ID, __CEC_HandleTypeDef::MspDeInitCallback, __CEC_HandleTypeDef::MspInitCallback, and __CEC_HandleTypeDef::TxCpltCallback.

HAL_StatusTypeDef HAL_CEC_RegisterRxCpltCallback ( CEC_HandleTypeDef hcec,
pCEC_RxCallbackTypeDef  pCallback 
)

Register CEC RX complete Callback To be used instead of the weak HAL_CEC_RxCpltCallback() predefined callback.

Parameters:
hcecCEC handle
pCallbackpointer to the Rx transfer compelete Callback function
Return values:
HALstatus

Definition at line 586 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::ErrorCode, HAL_CEC_ERROR_INVALID_CALLBACK, HAL_CEC_STATE_READY, __CEC_HandleTypeDef::RxCpltCallback, and __CEC_HandleTypeDef::RxState.

HAL_StatusTypeDef HAL_CEC_SetDeviceAddress ( CEC_HandleTypeDef hcec,
uint16_t  CEC_OwnAddress 
)

Initializes the Own Address of the CEC device.

Parameters:
hcecCEC handle
CEC_OwnAddressThe CEC own address.
Return values:
HALstatus

Definition at line 340 of file stm32h7xx_hal_cec.c.

References __HAL_CEC_DISABLE, __HAL_CEC_ENABLE, assert_param, CEC_OWN_ADDRESS_NONE, __CEC_HandleTypeDef::ErrorCode, __CEC_HandleTypeDef::gState, HAL_CEC_ERROR_NONE, HAL_CEC_STATE_BUSY, HAL_CEC_STATE_READY, __CEC_HandleTypeDef::Instance, IS_CEC_OWN_ADDRESS, and __CEC_HandleTypeDef::RxState.

HAL_StatusTypeDef HAL_CEC_UnRegisterCallback ( CEC_HandleTypeDef hcec,
HAL_CEC_CallbackIDTypeDef  CallbackID 
)

Unregister an CEC Callback CEC callabck is redirected to the weak predefined callback.

Parameters:
hcecuart handle
CallbackIDID of the callback to be unregistered This parameter can be one of the following values:
Return values:
status

Definition at line 510 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::ErrorCallback, __CEC_HandleTypeDef::ErrorCode, __CEC_HandleTypeDef::gState, HAL_CEC_ERROR_CB_ID, HAL_CEC_ERROR_INVALID_CALLBACK, HAL_CEC_ErrorCallback(), HAL_CEC_MspDeInit(), HAL_CEC_MSPDEINIT_CB_ID, HAL_CEC_MspInit(), HAL_CEC_MSPINIT_CB_ID, HAL_CEC_STATE_READY, HAL_CEC_STATE_RESET, HAL_CEC_TX_CPLT_CB_ID, HAL_CEC_TxCpltCallback(), __CEC_HandleTypeDef::MspDeInitCallback, __CEC_HandleTypeDef::MspInitCallback, and __CEC_HandleTypeDef::TxCpltCallback.

HAL_StatusTypeDef HAL_CEC_UnRegisterRxCpltCallback ( CEC_HandleTypeDef hcec)

UnRegister CEC RX complete Callback CEC RX complete Callback is redirected to the weak HAL_CEC_RxCpltCallback() predefined callback.

Parameters:
hcecCEC handle
Return values:
HALstatus

Definition at line 622 of file stm32h7xx_hal_cec.c.

References __CEC_HandleTypeDef::ErrorCode, HAL_CEC_ERROR_INVALID_CALLBACK, HAL_CEC_RxCpltCallback(), HAL_CEC_STATE_READY, __CEC_HandleTypeDef::RxCpltCallback, and __CEC_HandleTypeDef::RxState.