XenevaOS
Loading...
Searching...
No Matches
uart.h
Go to the documentation of this file.
1
30#ifndef __UART_H__
31#define __UART_H__
32
33#include <aa64hcode.h>
34#include <stdint.h>
35
36#define UART_DR 0x00
37#define UART_FR 0x18
38#define UART_IBRD 0x24
39#define UART_FBRD 0x28
40#define UART_LCR_H 0x2C
41#define UART_CR 0x30
42#define UART_IMSC 0x38
43#define UART_ICR 0x44
44
45#define UART_FR_TXFF (1<<5)
46#define UART_FR_RXFE (1<<4)
47
48#define UART_CR_UARTEN (1<<0)
49#define UART_CR_TXE (1<<8)
50#define UART_CR_RXE (1<<9)
51
52
53#define UART_LCR_H_WLEN_8BIT (0x3 << 5)
54#define UART_LCR_H_FEN (1<<4)
55
56#define UART_IMSC_RXIM (1<<4)
57#define UART_IMSC_RTIM (1 << 6)
58
59#define UART0_BASE UART0
60
61
62extern void UARTInitialize();
63
64
65/*
66 * uartPutc --serial output interface
67 * @param s -- String
68 */
69extern void uartPutc(char c);
70
71/*
72 * uartPuts --serial output interface
73 * @param s -- String
74 */
75extern void uartPuts(const char* s);
76
77/*
78 * UARTDebugOut -- standard text printing function
79 * for early kernel using UART
80 * @param text -- text to output
81 */
82extern void UARTDebugOut(const char* format, ...);
83#endif
void uartPuts(const char *s)
uartPuts –serial output interface
Definition uart.c:93
void UARTInitialize()
UARTInitialize – initialize uart serial output.
Definition uart.c:53
void uartPutc(char c)
uartPutc – put a single character to uart
Definition uart.c:78
void UARTDebugOut(const char *format,...)