STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
CEC Transmit/Receive functions. More...
Functions | |
HAL_StatusTypeDef | HAL_CEC_Transmit_IT (CEC_HandleTypeDef *hcec, uint8_t InitiatorAddress, uint8_t DestinationAddress, const uint8_t *pData, uint32_t Size) |
Send data in interrupt mode. | |
uint32_t | HAL_CEC_GetLastReceivedFrameSize (const 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. | |
void | HAL_CEC_TxCpltCallback (CEC_HandleTypeDef *hcec) |
Tx Transfer completed callback. | |
void | HAL_CEC_RxCpltCallback (CEC_HandleTypeDef *hcec, uint32_t RxFrameSize) |
Rx Transfer completed callback. | |
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()
HAL_StatusTypeDef HAL_CEC_Transmit_IT | ( | CEC_HandleTypeDef * | hcec, |
uint8_t | InitiatorAddress, | ||
uint8_t | DestinationAddress, | ||
const uint8_t * | pData, | ||
uint32_t | Size ) |
#include <stm32f4xx_hal_cec.h>
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 697 of file stm32f4xx_hal_cec.c.
References __HAL_CEC_FIRST_BYTE_TX_SET, __HAL_CEC_LAST_BYTE_TX_SET, __HAL_LOCK, __HAL_UNLOCK, assert_param, CEC_INITIATOR_LSB_POS, CEC_HandleTypeDef::ErrorCode, CEC_HandleTypeDef::gState, HAL_BUSY, HAL_CEC_ERROR_NONE, HAL_CEC_STATE_BUSY_TX, HAL_CEC_STATE_READY, HAL_ERROR, HAL_OK, CEC_HandleTypeDef::Instance, IS_CEC_ADDRESS, IS_CEC_MSGSIZE, CEC_HandleTypeDef::pTxBuffPtr, and CEC_HandleTypeDef::TxXferCount.
uint32_t HAL_CEC_GetLastReceivedFrameSize | ( | const CEC_HandleTypeDef * | hcec | ) |
#include <stm32f4xx_hal_cec.h>
Get size of the received frame.
hcec | CEC handle |
Frame | size |
Definition at line 753 of file stm32f4xx_hal_cec.c.
References CEC_HandleTypeDef::RxXferSize.
void HAL_CEC_ChangeRxBuffer | ( | CEC_HandleTypeDef * | hcec, |
uint8_t * | Rxbuffer ) |
#include <stm32f4xx_hal_cec.h>
Change Rx Buffer.
hcec | CEC handle |
Rxbuffer | Rx Buffer |
Frame | size |
Definition at line 765 of file stm32f4xx_hal_cec.c.
References CEC_HandleTypeDef::Init, and CEC_InitTypeDef::RxBuffer.
void HAL_CEC_IRQHandler | ( | CEC_HandleTypeDef * | hcec | ) |
#include <stm32f4xx_hal_cec.h>
This function handles CEC interrupt requests.
hcec | CEC handle |
None |
Definition at line 775 of file stm32f4xx_hal_cec.c.
References __HAL_CEC_CLEAR_FLAG, __HAL_CEC_LAST_BYTE_TX_SET, __HAL_UNLOCK, CEC_FLAG_ARBLST, CEC_FLAG_LBPE, CEC_FLAG_RXBR, CEC_FLAG_RXEND, CEC_FLAG_SBPE, CEC_FLAG_TXBR, CEC_FLAG_TXEND, 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(), HAL_IS_BIT_SET, CEC_HandleTypeDef::Init, CEC_HandleTypeDef::Instance, CEC_HandleTypeDef::pTxBuffPtr, CEC_InitTypeDef::RxBuffer, CEC_HandleTypeDef::RxState, CEC_HandleTypeDef::RxXferSize, and CEC_HandleTypeDef::TxXferCount.
__weak void HAL_CEC_TxCpltCallback | ( | CEC_HandleTypeDef * | hcec | ) |
#include <stm32f4xx_hal_cec.h>
Tx Transfer completed callback.
hcec | CEC handle |
None |
Definition at line 899 of file stm32f4xx_hal_cec.c.
References UNUSED.
Referenced by HAL_CEC_Init(), and HAL_CEC_IRQHandler().
__weak void HAL_CEC_RxCpltCallback | ( | CEC_HandleTypeDef * | hcec, |
uint32_t | RxFrameSize ) |
#include <stm32f4xx_hal_cec.h>
Rx Transfer completed callback.
hcec | CEC handle |
RxFrameSize | Size of frame |
None |
Definition at line 914 of file stm32f4xx_hal_cec.c.
References UNUSED.
Referenced by HAL_CEC_Init(), and HAL_CEC_IRQHandler().
__weak void HAL_CEC_ErrorCallback | ( | CEC_HandleTypeDef * | hcec | ) |
#include <stm32f4xx_hal_cec.h>
CEC error callbacks.
hcec | CEC handle |
None |
Definition at line 929 of file stm32f4xx_hal_cec.c.
References UNUSED.
Referenced by HAL_CEC_Init(), and HAL_CEC_IRQHandler().