STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Interrupts and flags management functions

Interrupts and flags management functions. More...

Functions

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 (uint32_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

Interrupts and flags management functions.

 ===============================================================================
                            ##### Interrupts and flags management functions ##### 
 ===============================================================================
    [..] This section provides functions allowing to configure the CEC Interrupts
         sources and check or clear the flags or pending bits status.
    [..] The user should identify which mode will be used in his application to manage
         the communication: Polling mode or Interrupt mode.
  
    [..] In polling mode, the CEC can be managed by the following flags:
            (+) CEC_FLAG_TXACKE : to indicate a missing acknowledge in transmission mode.
            (+) CEC_FLAG_TXERR  : to indicate an error occurs during transmission mode.
                                  The initiator detects low impedance in the CEC line.
            (+) CEC_FLAG_TXUDR  : to indicate if an underrun error occurs in transmission mode.
                                  The transmission is enabled while the software has not yet 
                                  loaded any value into the TXDR register.
            (+) CEC_FLAG_TXEND  : to indicate the end of successful transmission.
            (+) CEC_FLAG_TXBR   : to indicate the next transmission data has to be written to TXDR.
            (+) CEC_FLAG_ARBLST : to indicate arbitration lost in the case of two CEC devices
                                  starting at the same time.
            (+) CEC_FLAG_RXACKE : to indicate a missing acknowledge in receive mode.
            (+) CEC_FLAG_LBPE   : to indicate a long bit period error generated during receive mode.
            (+) CEC_FLAG_SBPE   : to indicate a short bit period error generated during receive mode.
            (+) CEC_FLAG_BRE    : to indicate a bit rising error generated during receive mode.
            (+) CEC_FLAG_RXOVR  : to indicate if an overrun error occur while receiving a CEC message.
                                  A byte is not yet received while a new byte is stored in the RXDR register.
            (+) CEC_FLAG_RXEND  : to indicate the end Of reception
            (+) CEC_FLAG_RXBR   : to indicate a new byte has been received from the CEC line and 
                                  stored into the RXDR buffer.
    [..]
           (@)In this Mode, it is advised to use the following functions:
              FlagStatus CEC_GetFlagStatus(uint16_t CEC_FLAG);
              void CEC_ClearFlag(uint16_t CEC_FLAG);

    [..] In Interrupt mode, the CEC can be managed by the following interrupt sources:
           (+) CEC_IT_TXACKE : to indicate a TX Missing acknowledge 
           (+) CEC_IT_TXACKE : to indicate a missing acknowledge in transmission mode.
           (+) CEC_IT_TXERR  : to indicate an error occurs during transmission mode.
                               The initiator detects low impedance in the CEC line.
           (+) CEC_IT_TXUDR  : to indicate if an underrun error occurs in transmission mode.
                               The transmission is enabled while the software has not yet 
                               loaded any value into the TXDR register.
           (+) CEC_IT_TXEND  : to indicate the end of successful transmission.
           (+) CEC_IT_TXBR   : to indicate the next transmission data has to be written to TXDR register.
           (+) CEC_IT_ARBLST : to indicate arbitration lost in the case of two CEC devices
                                starting at the same time.
           (+) CEC_IT_RXACKE : to indicate a missing acknowledge in receive mode.
           (+) CEC_IT_LBPE   : to indicate a long bit period error generated during receive mode.
           (+) CEC_IT_SBPE   : to indicate a short bit period error generated during receive mode.
           (+) CEC_IT_BRE    : to indicate a bit rising error generated during receive mode.
           (+) CEC_IT_RXOVR  : to indicate if an overrun error occur while receiving a CEC message.
                               A byte is not yet received while a new byte is stored in the RXDR register.
           (+) CEC_IT_RXEND  : to indicate the end Of reception
           (+) CEC_IT_RXBR   : to indicate a new byte has been received from the CEC line and 
                                stored into the RXDR buffer.
    [..]
           (@)In this Mode it is advised to use the following functions:
              void CEC_ITConfig( uint16_t CEC_IT, FunctionalState NewState);
              ITStatus CEC_GetITStatus(uint16_t CEC_IT);
              void CEC_ClearITPendingBit(uint16_t CEC_IT);

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_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
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_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