CEC driver modules.
More...
|
#define | BROADCAST_ADDRESS ((uint32_t)0x0000F) /* Broadcast address */ |
|
#define | CFGR_CLEAR_MASK ((uint32_t)0x7000FE00) /* CFGR register Mask */ |
|
#define | CEC_OFFSET (CEC_BASE - PERIPH_BASE) |
|
#define | CR_OFFSET (CEC_OFFSET + 0x00) |
|
#define | CECEN_BitNumber 0x00 |
|
#define | CR_CECEN_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (CECEN_BitNumber * 4)) |
|
#define | TXSOM_BitNumber 0x01 |
|
#define | CR_TXSOM_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TXSOM_BitNumber * 4)) |
|
#define | TXEOM_BitNumber 0x02 |
|
#define | CR_TXEOM_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TXEOM_BitNumber * 4)) |
|
#define | CFGR_OFFSET (CEC_OFFSET + 0x04) |
|
#define | LSTN_BitNumber 0x1F |
|
#define | CFGR_LSTN_BB (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (LSTN_BitNumber * 4)) |
|
CEC driver modules.
void CEC_ClearFlag |
( |
uint16_t |
CEC_FLAG | ) |
|
Clears the CEC's pending flags.
- Parameters
-
CEC_FLAG,: | specifies the flag to clear. This parameter can be any combination of the following values:
- CEC_FLAG_TXACKE: Tx Missing acknowledge Error
- CEC_FLAG_TXERR: Tx Error
- CEC_FLAG_TXUDR: Tx-Buffer Underrun
- CEC_FLAG_TXEND: End of transmission (successful transmission of the last byte).
- CEC_FLAG_TXBR: Tx-Byte Request
- CEC_FLAG_ARBLST: Arbitration Lost
- CEC_FLAG_RXACKE: Rx Missing Acknowledge
- CEC_FLAG_LBPE: Rx Long period Error
- CEC_FLAG_SBPE: Rx Short period Error
- CEC_FLAG_BRE: Rx Bit Rising Error
- CEC_FLAG_RXOVR: Rx Overrun
- CEC_FLAG_RXEND: End Of Reception
- CEC_FLAG_RXBR: Rx-Byte Received
|
- Return values
-
void CEC_ClearITPendingBit |
( |
uint16_t |
CEC_IT | ) |
|
Clears the CEC's interrupt pending bits.
- Parameters
-
CEC_IT,: | specifies the CEC interrupt pending bit to clear. This parameter can be any combination of the following values:
- CEC_IT_TXACKE: Tx Missing acknowledge Error
- CEC_IT_TXERR: Tx Error
- CEC_IT_TXUDR: Tx-Buffer Underrun
- CEC_IT_TXEND: End of Transmission
- CEC_IT_TXBR: Tx-Byte Request
- CEC_IT_ARBLST: Arbitration Lost
- CEC_IT_RXACKE: Rx-Missing Acknowledge
- CEC_IT_LBPE: Rx Long period Error
- CEC_IT_SBPE: Rx Short period Error
- CEC_IT_BRE: Rx Bit Rising Error
- CEC_IT_RXOVR: Rx Overrun
- CEC_IT_RXEND: End Of Reception
- CEC_IT_RXBR: Rx-Byte Received
|
- Return values
-
void CEC_Cmd |
( |
FunctionalState |
NewState | ) |
|
Enables or disables the CEC peripheral.
- Parameters
-
NewState,: | new state of the CEC peripheral. This parameter can be: ENABLE or DISABLE. |
- Return values
-
Deinitializes all CEC peripheral registers to their default reset values.
- Parameters
-
- Return values
-
void CEC_EndOfMessage |
( |
void |
| ) |
|
Transmits message with an EOM bit.
- Parameters
-
- Return values
-
FlagStatus CEC_GetFlagStatus |
( |
uint16_t |
CEC_FLAG | ) |
|
Gets the CEC flag status.
- Parameters
-
CEC_FLAG,: | specifies the CEC flag to check. This parameter can be one of the following values:
- CEC_FLAG_TXACKE: Tx Missing acknowledge Error
- CEC_FLAG_TXERR: Tx Error.
- CEC_FLAG_TXUDR: Tx-Buffer Underrun.
- CEC_FLAG_TXEND: End of transmission (successful transmission of the last byte).
- CEC_FLAG_TXBR: Tx-Byte Request.
- CEC_FLAG_ARBLST: Arbitration Lost
- CEC_FLAG_RXACKE: Rx-Missing Acknowledge
- CEC_FLAG_LBPE: Rx Long period Error
- CEC_FLAG_SBPE: Rx Short period Error
- CEC_FLAG_BRE: Rx Bit Rissing Error
- CEC_FLAG_RXOVR: Rx Overrun.
- CEC_FLAG_RXEND: End Of Reception.
- CEC_FLAG_RXBR: Rx-Byte Received.
|
- Return values
-
The | new state of CEC_FLAG (SET or RESET) |
ITStatus CEC_GetITStatus |
( |
uint16_t |
CEC_IT | ) |
|
Checks whether the specified CEC interrupt has occurred or not.
- Parameters
-
CEC_IT,: | specifies the CEC interrupt source to check. This parameter can be one of the following values:
- CEC_IT_TXACKE: Tx Missing acknowledge Error
- CEC_IT_TXERR: Tx Error.
- CEC_IT_TXUDR: Tx-Buffer Underrun.
- CEC_IT_TXEND: End of transmission (successful transmission of the last byte).
- CEC_IT_TXBR: Tx-Byte Request.
- CEC_IT_ARBLST: Arbitration Lost.
- CEC_IT_RXACKE: Rx-Missing Acknowledge.
- CEC_IT_LBPE: Rx Long period Error.
- CEC_IT_SBPE: Rx Short period Error.
- CEC_IT_BRE: Rx Bit Rising Error.
- CEC_IT_RXOVR: Rx Overrun.
- CEC_IT_RXEND: End Of Reception.
- CEC_IT_RXBR: Rx-Byte Received
|
- Return values
-
The | new state of CEC_IT (SET or RESET). |
Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct.
- Note
- The CEC parameters must be configured before enabling the CEC peripheral.
- Parameters
-
CEC_InitStruct,: | pointer to an CEC_InitTypeDef structure that contains the configuration information for the specified CEC peripheral. |
- Return values
-
void CEC_ITConfig |
( |
uint16_t |
CEC_IT, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the selected CEC interrupts.
- Parameters
-
CEC_IT,: | specifies the CEC interrupt source to be enabled. This parameter can be any combination of the following values:
- CEC_IT_TXACKE: Tx Missing acknowledge Error
- CEC_IT_TXERR: Tx Error.
- CEC_IT_TXUDR: Tx-Buffer Underrun.
- CEC_IT_TXEND: End of Transmission (successful transmission of the last byte).
- CEC_IT_TXBR: Tx-Byte Request.
- CEC_IT_ARBLST: Arbitration Lost
- CEC_IT_RXACKE: Rx-Missing Acknowledge
- CEC_IT_LBPE: Rx Long period Error
- CEC_IT_SBPE: Rx Short period Error
- CEC_IT_BRE: Rx Bit Rising Error
- CEC_IT_RXOVR: Rx Overrun.
- CEC_IT_RXEND: End Of Reception
- CEC_IT_RXBR: Rx-Byte Received
|
NewState,: | new state of the selected CEC interrupts. This parameter can be: ENABLE or DISABLE. |
- Return values
-
void CEC_ListenModeCmd |
( |
FunctionalState |
NewState | ) |
|
Enables or disables the CEC Listen Mode.
- Parameters
-
NewState,: | new state of the Listen Mode. This parameter can be: ENABLE or DISABLE. |
- Return values
-
void CEC_OwnAddressClear |
( |
void |
| ) |
|
Clears the Own Address of the CEC device.
- Parameters
-
CEC_OwnAddress,: | The CEC own address. |
- Return values
-
void CEC_OwnAddressConfig |
( |
uint8_t |
CEC_OwnAddress | ) |
|
Defines the Own Address of the CEC device.
- Parameters
-
CEC_OwnAddress,: | The CEC own address. |
- Return values
-
uint8_t CEC_ReceiveData |
( |
void |
| ) |
|
Returns the most recent received data by the CEC peripheral.
- Parameters
-
- Return values
-
void CEC_SendData |
( |
uint8_t |
Data | ) |
|
Transmits single data through the CEC peripheral.
- Parameters
-
Data,: | the data to transmit. |
- Return values
-
void CEC_StartOfMessage |
( |
void |
| ) |
|
Starts a new message.
- Parameters
-
- Return values
-
Fills each CEC_InitStruct member with its default value.
- Parameters
-
CEC_InitStruct,: | pointer to a CEC_InitTypeDef structure which will be initialized. |
- Return values
-