STM32F37 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups

CEC driver modules. More...

Modules

 CEC_Exported_Constants
 
 CEC_Private_Functions
 

Data Structures

struct  CEC_InitTypeDef
 CEC Init structure definition. More...
 

Macros

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

Functions

void CEC_DeInit (void)
 Deinitializes all CEC peripheral registers to their default reset values. More...
 
void CEC_Init (CEC_InitTypeDef *CEC_InitStruct)
 Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct. More...
 
void CEC_StructInit (CEC_InitTypeDef *CEC_InitStruct)
 Fills each CEC_InitStruct member with its default value. More...
 
void CEC_Cmd (FunctionalState NewState)
 Enables or disables the CEC peripheral. More...
 
void CEC_ListenModeCmd (FunctionalState NewState)
 Enables or disables the CEC Listen Mode. More...
 
void CEC_OwnAddressConfig (uint8_t CEC_OwnAddress)
 Defines the Own Address of the CEC device. More...
 
void CEC_OwnAddressClear (void)
 Clears the Own Address of the CEC device. More...
 
void CEC_SendData (uint8_t Data)
 Transmits single data through the CEC peripheral. More...
 
uint8_t CEC_ReceiveData (void)
 Returns the most recent received data by the CEC peripheral. More...
 
void CEC_StartOfMessage (void)
 Starts a new message. More...
 
void CEC_EndOfMessage (void)
 Transmits message with an EOM bit. More...
 
void CEC_ITConfig (uint16_t CEC_IT, FunctionalState NewState)
 Enables or disables the selected CEC interrupts. More...
 
FlagStatus CEC_GetFlagStatus (uint16_t CEC_FLAG)
 Gets the CEC flag status. More...
 
void CEC_ClearFlag (uint16_t CEC_FLAG)
 Clears the CEC's pending flags. More...
 
ITStatus CEC_GetITStatus (uint16_t CEC_IT)
 Checks whether the specified CEC interrupt has occurred or not. More...
 
void CEC_ClearITPendingBit (uint16_t CEC_IT)
 Clears the CEC's interrupt pending bits. More...
 

Detailed Description

CEC driver modules.

Function Documentation

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
None
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
None
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
None
void CEC_DeInit ( void  )

Deinitializes all CEC peripheral registers to their default reset values.

Parameters
None
Return values
None
void CEC_EndOfMessage ( void  )

Transmits message with an EOM bit.

Parameters
None
Return values
None
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
Thenew 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
Thenew state of CEC_IT (SET or RESET).
void CEC_Init ( CEC_InitTypeDef CEC_InitStruct)

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
None
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
None
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
None
void CEC_OwnAddressClear ( void  )

Clears the Own Address of the CEC device.

Parameters
CEC_OwnAddress,:The CEC own address.
Return values
None
void CEC_OwnAddressConfig ( uint8_t  CEC_OwnAddress)

Defines the Own Address of the CEC device.

Parameters
CEC_OwnAddress,:The CEC own address.
Return values
None
uint8_t CEC_ReceiveData ( void  )

Returns the most recent received data by the CEC peripheral.

Parameters
None
Return values
Thereceived data.
void CEC_SendData ( uint8_t  Data)

Transmits single data through the CEC peripheral.

Parameters
Data,:the data to transmit.
Return values
None
void CEC_StartOfMessage ( void  )

Starts a new message.

Parameters
None
Return values
None
void CEC_StructInit ( CEC_InitTypeDef CEC_InitStruct)

Fills each CEC_InitStruct member with its default value.

Parameters
CEC_InitStruct,:pointer to a CEC_InitTypeDef structure which will be initialized.
Return values
None