# usart_options_t Struct Reference

`#include <usart.h>`

## Detailed Description

Input parameters when initializing RS232 and similar modes.

Definition at line 120 of file usart.h.

## Data Fields
unsigned long | baudrate
| Set baud rate of the USART (unused in slave modes).
unsigned char | channelmode
| Run the channel in testmode: USART_NORMAL_CHMODE, USART_AUTO_ECHO, USART_LOCAL_LOOPBACK or USART_REMOTE_LOOPBACK.
unsigned char | charlength
| Number of bits to transmit as a character (5 to 9).
unsigned char | paritytype
| How to calculate the parity bit: USART_EVEN_PARITY, USART_ODD_PARITY, USART_SPACE_PARITY, USART_MARK_PARITY, USART_NO_PARITY or USART_MULTIDROP_PARITY.
unsigned short | stopbits
| Number of stop bits between two characters: USART_1_STOPBIT, USART_1_5_STOPBITS, USART_2_STOPBITS or any number from 3 to 257 which will result in a time guard period of that length between characters.

## Field Documentation

unsigned long usart_options_t::baudrate

Set baud rate of the USART (unused in slave modes).

Definition at line 123 of file usart.h.

Referenced by usart_init_rs232(), usart_init_rs232_tx_only(), and usart_init_sync_master().

unsigned char usart_options_t::channelmode

Run the channel in testmode: USART_NORMAL_CHMODE, USART_AUTO_ECHO, USART_LOCAL_LOOPBACK or USART_REMOTE_LOOPBACK.

Definition at line 141 of file usart.h.

Referenced by usart_init_rs232(), usart_init_rs232_tx_only(), usart_init_sync_master(), and usart_init_sync_slave().

unsigned char usart_options_t::charlength

Number of bits to transmit as a character (5 to 9).

Definition at line 126 of file usart.h.

Referenced by usart_init_rs232(), usart_init_rs232_tx_only(), usart_init_sync_master(), and usart_init_sync_slave().

unsigned char usart_options_t::paritytype

How to calculate the parity bit: USART_EVEN_PARITY, USART_ODD_PARITY, USART_SPACE_PARITY, USART_MARK_PARITY, USART_NO_PARITY or USART_MULTIDROP_PARITY.

Definition at line 131 of file usart.h.

Referenced by usart_init_rs232(), usart_init_rs232_tx_only(), usart_init_sync_master(), and usart_init_sync_slave().

unsigned short usart_options_t::stopbits

Number of stop bits between two characters: USART_1_STOPBIT, USART_1_5_STOPBITS, USART_2_STOPBITS or any number from 3 to 257 which will result in a time guard period of that length between characters.

Note:
  USART_1_5_STOPBITS is supported in asynchronous modes only.

Definition at line 137 of file usart.h.

Referenced by usart_init_rs232(), usart_init_rs232_tx_only(), usart_init_sync_master(), and usart_init_sync_slave().