Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches

Overview

Structs and Enums used by the driver.

Note
This is example show how to instantiate UART with uart_instance_t and uart_hwreg_t.
#define UART_BASE (uart_hwreg_t*)SYSTEM_UART_0_IO_CTRL
void bsp_init() {
// Init uart 0
uart0.hwreg = UART0_BASE;
uart0.dataLength = BITS_8;
uart0.parity = NONE;
uart0.stop = ONE;
}
uart_instance_t uart0
Definition bsp.c:4
void bsp_init()
Definition bsp.c:6
#define BSP_UART_DATA_LEN
Definition bsp.h:28
#define BSP_UART_BAUDRATE
Definition bsp.h:27
#define BSP_CLINT_HZ
Definition bsp.h:30
@ ONE
One Stop Bit *‍/.
Definition uart.h:64
@ BITS_8
8-bit data length *‍/
Definition uart.h:52
@ NONE
No Parity *‍/.
Definition uart.h:57
void uart_applyConfig(uart_instance_t *inst)
Apply stored UART configuration to hardware.
Definition uart.c:68
UART instance. Holds the software registers and hardware pointer.
Definition uart.h:114

Data Structures

struct  uart_hwreg_t
 UART hardware register map. More...
struct  uart_instance_t
 UART instance. Holds the software registers and hardware pointer. More...