libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
Line Control Register bits
Collaboration diagram for Line Control Register bits:

Macros

#define USART_DATABITS_5   (0)
 LCR:WLS 5-bit character length. More...
 
#define USART_DATABITS_6   (0x01)
 LCR:WLS 6-bit character length. More...
 
#define USART_DATABITS_7   (0x02)
 LCR:WLS 7-bit character length. More...
 
#define USART_DATABITS_8   (0x03)
 LCR:WLS 8-bit character length. More...
 
#define USART_PSELPEN_ODD   (0x01)
 LCR:PSEL & LCR:PEN Odd parity. More...
 
#define USART_PSELPEN_EVEN   (0x03)
 LCR:PSEL & LCR:PEN Even parity. More...
 
#define USART_PSELPEN_FORCE1   (0x05)
 LCR:PSEL & LCR:PEN Force 1 stick parity. More...
 
#define USART_PSELPEN_FORCE0   (0x07)
 LCR:PSEL & LCR:PEN Force 0 stick parity. More...
 
#define USART_PARITY_DISABLE   (0)
 LCR:PSEL & LCR:PEN Disable parity. More...
 
#define USART_PARITY_ODD   USART_PSELPEN_ODD
 LCR:PSEL & LCR:PEN Odd parity. More...
 
#define USART_PARITY_EVEN   USART_PSELPEN_EVEN
 LCR:PSEL & LCR:PEN Even parity. More...
 
#define USART_PARITY_FORCE1   USART_PSELPEN_FORCE1
 LCR:PSEL & LCR:PEN Force 1 stick parity. More...
 
#define USART_PARITY_FORCE0   USART_PSELPEN_FORCE0
 LCR:PSEL & LCR:PEN Force 0 stick parity. More...
 
#define USART_STOPBITS_1   (0)
 LCR:SBS Use 1 stop bit. More...
 
#define USART_STOPBITS_1P5   USART_LCR_SBS
 LCR:SBS Use 1.5 stop bit when databits is 5. More...
 
#define USART_STOPBITS_2   USART_LCR_SBS
 LCR:SBS Use 2 stop bits. More...
 
#define USART_LCR_WLS_MASK   (3)
 
#define USART_LCR_WLS(wls)   ((wls) & USART_LCR_WLS_MASK)
 Word length select: 5-8 databits. More...
 
#define USART_LCR_SBS   BIT2
 Set LCR:SBS for 1.5 or 2 stop bits, Clear for 1 stop bit. More...
 
#define USART_LCR_PEN   BIT3
 Enable parity checking. More...
 
#define USART_LCR_PSELPEN_MASK   (7)
 
#define USART_LCR_PSELPEN_SHIFT   3
 
#define USART_LCR_PSELPEN(psel)   (((psel) & USART_LCR_PSELPEN_MASK) << USART_LCR_PSELPEN_SHIFT)
 LCR:PSEL and LCR:PEN control parity. More...
 
#define USART_LCR_BCON   BIT6
 Break Control: Enabling this bit forces TX to logic 0. More...
 

Detailed Description

Macro Definition Documentation

◆ USART_DATABITS_5

#define USART_DATABITS_5   (0)

LCR:WLS 5-bit character length.

Definition at line 113 of file usart.h.

◆ USART_DATABITS_6

#define USART_DATABITS_6   (0x01)

LCR:WLS 6-bit character length.

Definition at line 115 of file usart.h.

◆ USART_DATABITS_7

#define USART_DATABITS_7   (0x02)

LCR:WLS 7-bit character length.

Definition at line 117 of file usart.h.

◆ USART_DATABITS_8

#define USART_DATABITS_8   (0x03)

LCR:WLS 8-bit character length.

Definition at line 119 of file usart.h.

◆ USART_LCR_BCON

#define USART_LCR_BCON   BIT6

Break Control: Enabling this bit forces TX to logic 0.

Definition at line 156 of file usart.h.

◆ USART_LCR_PEN

#define USART_LCR_PEN   BIT3

Enable parity checking.

Definition at line 150 of file usart.h.

◆ USART_LCR_PSELPEN

#define USART_LCR_PSELPEN (   psel)    (((psel) & USART_LCR_PSELPEN_MASK) << USART_LCR_PSELPEN_SHIFT)

LCR:PSEL and LCR:PEN control parity.

Definition at line 154 of file usart.h.

◆ USART_LCR_PSELPEN_MASK

#define USART_LCR_PSELPEN_MASK   (7)

Definition at line 151 of file usart.h.

◆ USART_LCR_PSELPEN_SHIFT

#define USART_LCR_PSELPEN_SHIFT   3

Definition at line 152 of file usart.h.

◆ USART_LCR_SBS

#define USART_LCR_SBS   BIT2

Set LCR:SBS for 1.5 or 2 stop bits, Clear for 1 stop bit.

Definition at line 148 of file usart.h.

◆ USART_LCR_WLS

#define USART_LCR_WLS (   wls)    ((wls) & USART_LCR_WLS_MASK)

Word length select: 5-8 databits.

Definition at line 146 of file usart.h.

◆ USART_LCR_WLS_MASK

#define USART_LCR_WLS_MASK   (3)

Definition at line 144 of file usart.h.

◆ USART_PARITY_DISABLE

#define USART_PARITY_DISABLE   (0)

LCR:PSEL & LCR:PEN Disable parity.

Definition at line 129 of file usart.h.

◆ USART_PARITY_EVEN

#define USART_PARITY_EVEN   USART_PSELPEN_EVEN

LCR:PSEL & LCR:PEN Even parity.

Definition at line 133 of file usart.h.

◆ USART_PARITY_FORCE0

#define USART_PARITY_FORCE0   USART_PSELPEN_FORCE0

LCR:PSEL & LCR:PEN Force 0 stick parity.

Definition at line 137 of file usart.h.

◆ USART_PARITY_FORCE1

#define USART_PARITY_FORCE1   USART_PSELPEN_FORCE1

LCR:PSEL & LCR:PEN Force 1 stick parity.

Definition at line 135 of file usart.h.

◆ USART_PARITY_ODD

#define USART_PARITY_ODD   USART_PSELPEN_ODD

LCR:PSEL & LCR:PEN Odd parity.

Definition at line 131 of file usart.h.

◆ USART_PSELPEN_EVEN

#define USART_PSELPEN_EVEN   (0x03)

LCR:PSEL & LCR:PEN Even parity.

Definition at line 123 of file usart.h.

◆ USART_PSELPEN_FORCE0

#define USART_PSELPEN_FORCE0   (0x07)

LCR:PSEL & LCR:PEN Force 0 stick parity.

Definition at line 127 of file usart.h.

◆ USART_PSELPEN_FORCE1

#define USART_PSELPEN_FORCE1   (0x05)

LCR:PSEL & LCR:PEN Force 1 stick parity.

Definition at line 125 of file usart.h.

◆ USART_PSELPEN_ODD

#define USART_PSELPEN_ODD   (0x01)

LCR:PSEL & LCR:PEN Odd parity.

Definition at line 121 of file usart.h.

◆ USART_STOPBITS_1

#define USART_STOPBITS_1   (0)

LCR:SBS Use 1 stop bit.

Definition at line 139 of file usart.h.

◆ USART_STOPBITS_1P5

#define USART_STOPBITS_1P5   USART_LCR_SBS

LCR:SBS Use 1.5 stop bit when databits is 5.

Definition at line 141 of file usart.h.

◆ USART_STOPBITS_2

#define USART_STOPBITS_2   USART_LCR_SBS

LCR:SBS Use 2 stop bits.

Definition at line 143 of file usart.h.