Functions

IrDA mode functions. More...

Collaboration diagram for IrDA mode functions:

Functions

void USART_HalfDuplexCmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the USART's Half Duplex communication. More...
 
void USART_IrDACmd (USART_TypeDef *USARTx, FunctionalState NewState)
 Enables or disables the USART's IrDA interface. More...
 
void USART_IrDAConfig (USART_TypeDef *USARTx, uint16_t USART_IrDAMode)
 Configures the USART's IrDA interface. More...
 

Detailed Description

IrDA mode functions.

Half-duplex mode function.

 ===============================================================================
                        ##### IrDA mode functions #####
 ===============================================================================  
    [..]
    This subsection provides a set of functions allowing to manage the USART 
    IrDA communication.
    [..]
    IrDA is a half duplex communication protocol. If the Transmitter is busy, any data
    on the IrDA receive line will be ignored by the IrDA decoder and if the Receiver 
    is busy, data on the TX from the USART to IrDA will not be encoded by IrDA.
    While receiving data, transmission should be avoided as the data to be transmitted
    could be corrupted.
    [..]
    IrDA communication is possible through the following procedure:
      (#) Program the Baud rate, Word length = 8 bits, Stop bits, Parity, Transmitter/Receiver 
          modes and hardware flow control values using the USART_Init() function.
      (#) Enable the USART using the USART_Cmd() function.
      (#) Configures the IrDA pulse width by configuring the prescaler using  
          the USART_SetPrescaler() function.
      (#) Configures the IrDA  USART_IrDAMode_LowPower or USART_IrDAMode_Normal mode
          using the USART_IrDAConfig() function.
      (#) Enable the IrDA using the USART_IrDACmd() function.

      -@- A pulse of width less than two and greater than one PSC period(s) may or may
          not be rejected.
      -@- The receiver set up time should be managed by software. The IrDA physical layer
          specification specifies a minimum of 10 ms delay between transmission and 
          reception (IrDA is a half duplex protocol).
      -@- In IrDA mode, the following bits must be kept cleared:
        (+@) LINEN, STOP and CLKEN bits in the USART_CR2 register.
        (+@) SCEN and HDSEL bits in the USART_CR3 register.
 ===============================================================================
                   ##### Half-duplex mode function #####
 ===============================================================================
    [..] This subsection provides a set of functions allowing to manage the USART
         Half-duplex communication.
    [..] The USART can be configured to follow a single-wire half-duplex protocol 
         where the TX and RX lines are internally connected.
    [..] USART Half duplex communication is possible through the following procedure:
         (#) Program the Baud rate, Word length, Stop bits, Parity, Mode transmitter 
             or Mode receiver and hardware flow control values using the USART_Init()
            function.
         (#) Configures the USART address using the USART_SetAddress() function.
         (#) Enable the half duplex mode using USART_HalfDuplexCmd() function.
         (#) Enable the USART using the USART_Cmd() function.
         [..]
         (@) The RX pin is no longer used.
         (@) In Half-duplex mode the following bits must be kept cleared:
             (+@) LINEN and CLKEN bits in the USART_CR2 register.
             (+@) SCEN and IREN bits in the USART_CR3 register.

Function Documentation

void USART_HalfDuplexCmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the USART's Half Duplex communication.

Parameters
USARTxSelect the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5.
NewStatenew state of the USART Communication. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1189 of file stm32f30x_usart.c.

void USART_IrDACmd ( USART_TypeDef USARTx,
FunctionalState  NewState 
)

Enables or disables the USART's IrDA interface.

Parameters
USARTxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral.
NewStatenew state of the IrDA mode. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1053 of file stm32f4xx_usart.c.

void USART_IrDAConfig ( USART_TypeDef USARTx,
uint16_t  USART_IrDAMode 
)

Configures the USART's IrDA interface.

Parameters
USARTxwhere x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral.
USART_IrDAModespecifies the IrDA mode. This parameter can be one of the following values:
  • USART_IrDAMode_LowPower
  • USART_IrDAMode_Normal
Return values
None

Definition at line 1035 of file stm32f4xx_usart.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:29