diff options
Diffstat (limited to 'src/arm/PL1/PL1_common/uart.h')
-rw-r--r-- | src/arm/PL1/PL1_common/uart.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/arm/PL1/PL1_common/uart.h b/src/arm/PL1/PL1_common/uart.h index 96f3634..e02b3c8 100644 --- a/src/arm/PL1/PL1_common/uart.h +++ b/src/arm/PL1/PL1_common/uart.h @@ -5,12 +5,26 @@ #include "global.h" #include "interrupts.h" +#define DEFAULT_UART_CLOCK_RATE 3000000 + +#define UART_WLEN_8_BITS (0b11 << 5) +#define UART_WLEN_7_BITS (0b10 << 5) +#define UART_WLEN_6_BITS (0b01 << 5) +#define UART_WLEN_5_BITS 0b00 + +#define UART_2_STOP (1 << 3) +#define UART_1_STOP 0 + +#define UART_ODD_PAR (1 << 1) +#define UART_EVEN_PAR ((1 << 1) | (1 << 2)) +#define UART_NO_PAR 0 + // The offsets for reach register. -// Controls actuation of pull up/down to ALL GPIO pins. +// GPIO Pin Pull-up/down Enable #define GPPUD (GPIO_BASE + 0x94) -// Controls actuation of pull up/down for specific GPIO pin. +// GPIO Pin Pull-up/down Enable Clock 0 #define GPPUDCLK0 (GPIO_BASE + 0x98) // The base address for UART. |