CEC_Private_Functions
[CEC]

Functions

void CEC_ClearFlag (uint32_t CEC_FLAG)
 Clears the CEC's pending flags.
void CEC_ClearITPendingBit (uint16_t CEC_IT)
 Clears the CEC's interrupt pending bits.
void CEC_Cmd (FunctionalState NewState)
 Enables or disables the specified CEC peripheral.
void CEC_DeInit (void)
 Deinitializes the CEC peripheral registers to their default reset values.
void CEC_EndOfMessageCmd (FunctionalState NewState)
 Transmits message with or without an EOM bit.
FlagStatus CEC_GetFlagStatus (uint32_t CEC_FLAG)
 Gets the CEC flag status.
ITStatus CEC_GetITStatus (uint8_t CEC_IT)
 Checks whether the specified CEC interrupt has occurred or not.
void CEC_Init (CEC_InitTypeDef *CEC_InitStruct)
 Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct.
void CEC_ITConfig (FunctionalState NewState)
 Enables or disables the CEC interrupt.
void CEC_OwnAddressConfig (uint8_t CEC_OwnAddress)
 Defines the Own Address of the CEC device.
uint8_t CEC_ReceiveDataByte (void)
 Returns the most recent received data by the CEC peripheral.
void CEC_SendDataByte (uint8_t Data)
 Transmits single data through the CEC peripheral.
void CEC_SetPrescaler (uint16_t CEC_Prescaler)
 Sets the CEC prescaler value.
void CEC_StartOfMessage (void)
 Starts a new message.

Function Documentation

void CEC_ClearFlag ( uint32_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_TERR: Tx Error
  • CEC_FLAG_TBTRF: Tx Byte Transfer Request or Block Transfer Finished
  • CEC_FLAG_RSOM: Rx Start Of Message
  • CEC_FLAG_REOM: Rx End Of Message
  • CEC_FLAG_RERR: Rx Error
  • CEC_FLAG_RBTF: Rx Byte/Block Transfer Finished
Return values:
None 

Definition at line 348 of file stm32f10x_cec.c.

References assert_param, CEC, and IS_CEC_CLEAR_FLAG.

Referenced by CEC_IRQHandler(), HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_GetErrorStatus(), HDMI_CEC_ProcessIRQSrc(), HDMI_CEC_TransmitMessage(), and LogicalAddressAllocation().

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_TERR: Tx Error
  • CEC_IT_TBTF: Tx Block Transfer Finished
  • CEC_IT_RERR: Rx Error
  • CEC_IT_RBTF: Rx Block Transfer Finished
Return values:
None 

Definition at line 407 of file stm32f10x_cec.c.

References assert_param, CEC, and IS_CEC_GET_IT.

void CEC_Cmd ( FunctionalState  NewState  ) 

Enables or disables the specified CEC peripheral.

Parameters:
NewState,: new state of the CEC peripheral. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 163 of file stm32f10x_cec.c.

References assert_param, CEC, CEC_CFGR_PE, CFGR_PE_BB, DISABLE, IS_FUNCTIONAL_STATE, and RESET.

Referenced by HDMI_CEC_Init(), and main().

void CEC_DeInit ( void   ) 

Deinitializes the CEC peripheral registers to their default reset values.

Parameters:
None 
Return values:
None 

Definition at line 117 of file stm32f10x_cec.c.

References DISABLE, ENABLE, RCC_APB1Periph_CEC, and RCC_APB1PeriphResetCmd().

Referenced by HDMI_CEC_Init().

void CEC_EndOfMessageCmd ( FunctionalState  NewState  ) 

Transmits message with or without an EOM bit.

Parameters:
NewState,: new state of the CEC Tx End Of Message. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 261 of file stm32f10x_cec.c.

References assert_param, CSR_TEOM_BB, and IS_FUNCTIONAL_STATE.

Referenced by CEC_IRQHandler(), HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_ProcessIRQSrc(), and LogicalAddressAllocation().

FlagStatus CEC_GetFlagStatus ( uint32_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_BTE: Bit Timing Error
  • CEC_FLAG_BPE: Bit Period Error
  • CEC_FLAG_RBTFE: Rx Block Transfer Finished Error
  • CEC_FLAG_SBE: Start Bit Error
  • CEC_FLAG_ACKE: Block Acknowledge Error
  • CEC_FLAG_LINE: Line Error
  • CEC_FLAG_TBTFE: Tx Block Transfer Finsihed Error
  • CEC_FLAG_TEOM: Tx End Of Message
  • CEC_FLAG_TERR: Tx Error
  • CEC_FLAG_TBTRF: Tx Byte Transfer Request or Block Transfer Finished
  • CEC_FLAG_RSOM: Rx Start Of Message
  • CEC_FLAG_REOM: Rx End Of Message
  • CEC_FLAG_RERR: Rx Error
  • CEC_FLAG_RBTF: Rx Byte/Block Transfer Finished
Return values:
The new state of CEC_FLAG (SET or RESET)

Definition at line 290 of file stm32f10x_cec.c.

References assert_param, CEC_BASE, FLAG_Mask, IS_CEC_GET_FLAG, RESET, and SET.

Referenced by CEC_IRQHandler(), HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_GetErrorStatus(), HDMI_CEC_ProcessIRQSrc(), and LogicalAddressAllocation().

ITStatus CEC_GetITStatus ( uint8_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_TERR: Tx Error
  • CEC_IT_TBTF: Tx Block Transfer Finished
  • CEC_IT_RERR: Rx Error
  • CEC_IT_RBTF: Rx Block Transfer Finished
Return values:
The new state of CEC_IT (SET or RESET).

Definition at line 371 of file stm32f10x_cec.c.

References assert_param, CEC, CEC_CFGR_IE, IS_CEC_GET_IT, RESET, and SET.

void CEC_Init ( CEC_InitTypeDef CEC_InitStruct  ) 

Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct.

Parameters:
CEC_InitStruct,: pointer to an CEC_InitTypeDef structure that contains the configuration information for the specified CEC peripheral.
Return values:
None 

Definition at line 134 of file stm32f10x_cec.c.

References assert_param, CEC, CEC_InitTypeDef::CEC_BitPeriodMode, CEC_InitTypeDef::CEC_BitTimingMode, CFGR_CLEAR_Mask, IS_CEC_BIT_PERIOD_ERROR_MODE, and IS_CEC_BIT_TIMING_ERROR_MODE.

Referenced by HDMI_CEC_Init(), and main().

void CEC_ITConfig ( FunctionalState  NewState  ) 

Enables or disables the CEC interrupt.

Parameters:
NewState,: new state of the CEC interrupt. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 185 of file stm32f10x_cec.c.

References assert_param, CFGR_IE_BB, and IS_FUNCTIONAL_STATE.

Referenced by HDMI_CEC_Init(), and main().

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 

Definition at line 198 of file stm32f10x_cec.c.

References assert_param, CEC, and IS_CEC_ADDRESS.

Referenced by HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_Init(), LogicalAddressAllocation(), and main().

uint8_t CEC_ReceiveDataByte ( void   ) 

Returns the most recent received data by the CEC peripheral.

Parameters:
None 
Return values:
The received data.

Definition at line 238 of file stm32f10x_cec.c.

References CEC.

Referenced by CEC_IRQHandler(), and HDMI_CEC_ProcessIRQSrc().

void CEC_SendDataByte ( uint8_t  Data  ) 

Transmits single data through the CEC peripheral.

Parameters:
Data,: the data to transmit.
Return values:
None 

Definition at line 226 of file stm32f10x_cec.c.

References CEC.

Referenced by CEC_IRQHandler(), EXTI9_5_IRQHandler(), HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_ProcessIRQSrc(), HDMI_CEC_TransmitMessage(), and LogicalAddressAllocation().

void CEC_SetPrescaler ( uint16_t  CEC_Prescaler  ) 

Sets the CEC prescaler value.

Parameters:
CEC_Prescaler,: CEC prescaler new value
Return values:
None 

Definition at line 212 of file stm32f10x_cec.c.

References assert_param, CEC, and IS_CEC_PRESCALER.

Referenced by HDMI_CEC_Init(), and main().

void CEC_StartOfMessage ( void   ) 

Starts a new message.

Parameters:
None 
Return values:
None 

Definition at line 249 of file stm32f10x_cec.c.

References CSR_TSOM_BB.

Referenced by EXTI9_5_IRQHandler(), HDMI_CEC_CheckConnectedDevices(), HDMI_CEC_TransmitMessage(), and LogicalAddressAllocation().

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32