16 lines
612 B
C
16 lines
612 B
C
|
#pragma once
|
||
|
#include "mmio.h"
|
||
|
|
||
|
/* PL011 UART */
|
||
|
#define UART0_DR (*(volatile unsigned *)(IO_BASE + 0x00201000))
|
||
|
#define UART0_FR (*(volatile unsigned *)(IO_BASE + 0x00201018))
|
||
|
#define UART0_IBRD (*(volatile unsigned *)(IO_BASE + 0x00201024))
|
||
|
#define UART0_FBRD (*(volatile unsigned *)(IO_BASE + 0x00201028))
|
||
|
#define UART0_LCRH (*(volatile unsigned *)(IO_BASE + 0x0020102C))
|
||
|
#define UART0_CR (*(volatile unsigned *)(IO_BASE + 0x00201030))
|
||
|
#define UART0_IMSC (*(volatile unsigned *)(IO_BASE + 0x00201038))
|
||
|
#define UART0_ICR (*(volatile unsigned *)(IO_BASE + 0x00201044))
|
||
|
|
||
|
void init_uart(void);
|
||
|
void putc(char c);
|