Previous post became too big but these are the constants.s file with the RED-V constants for the UART.
# constants.s
.equ UART_REG_TXFIFO, 0
.equ UART_BASE, 0x10013000
.equ UART0_BASE, 0x10013000
.equ UART_TXDATA, UART0_BASE + 0x00
.equ UART_RXDATA, UART0_BASE + 0x04
.equ UART_TXCTRL, UART0_BASE + 0x08
.equ UART_RXCTRL, UART0_BASE + 0x0C
.equ UART_IE, UART0_BASE + 0x10
.equ UART_IP, UART0_BASE + 0x14
.equ UART_DIV, UART0_BASE + 0x18
.equ GPIO_BASE, 0x10012000
.equ GPIO_IOF_EN, GPIO_BASE + 0x38
.equ GPIO_IOF_SEL, GPIO_BASE + 0x3C
.equ IOF_UART0_RX, (1 << 16) # GPIO16
.equ IOF_UART0_TX, (1 << 17) # GPIO17
.equ IOF_UART0_MASK, IOF_UART0_RX | IOF_UART0_TX
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.