XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
uart.h File Reference
#include <aa64hcode.h>
#include <stdint.h>
Include dependency graph for uart.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UART_DR   0x00
 
#define UART_FR   0x18
 
#define UART_IBRD   0x24
 
#define UART_FBRD   0x28
 
#define UART_LCR_H   0x2C
 
#define UART_CR   0x30
 
#define UART_IMSC   0x38
 
#define UART_ICR   0x44
 
#define UART_FR_TXFF   (1<<5)
 
#define UART_FR_RXFE   (1<<4)
 
#define UART_CR_UARTEN   (1<<0)
 
#define UART_CR_TXE   (1<<8)
 
#define UART_CR_RXE   (1<<9)
 
#define UART_LCR_H_WLEN_8BIT   (0x3 << 5)
 
#define UART_LCR_H_FEN   (1<<4)
 
#define UART_IMSC_RXIM   (1<<4)
 
#define UART_IMSC_RTIM   (1 << 6)
 
#define UART0_BASE   UART0
 

Functions

void UARTInitialize ()
 UARTInitialize – initialize uart serial output.
 
void uartPutc (char c)
 uartPutc – put a single character to uart
 
void uartPuts (const char *s)
 uartPuts –serial output interface
 
void UARTDebugOut (const char *format,...)
 

Macro Definition Documentation

◆ UART0_BASE

#define UART0_BASE   UART0

◆ UART_CR

#define UART_CR   0x30

◆ UART_CR_RXE

#define UART_CR_RXE   (1<<9)

◆ UART_CR_TXE

#define UART_CR_TXE   (1<<8)

◆ UART_CR_UARTEN

#define UART_CR_UARTEN   (1<<0)

◆ UART_DR

#define UART_DR   0x00

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ UART_FBRD

#define UART_FBRD   0x28

◆ UART_FR

#define UART_FR   0x18

◆ UART_FR_RXFE

#define UART_FR_RXFE   (1<<4)

◆ UART_FR_TXFF

#define UART_FR_TXFF   (1<<5)

◆ UART_IBRD

#define UART_IBRD   0x24

◆ UART_ICR

#define UART_ICR   0x44

◆ UART_IMSC

#define UART_IMSC   0x38

◆ UART_IMSC_RTIM

#define UART_IMSC_RTIM   (1 << 6)

◆ UART_IMSC_RXIM

#define UART_IMSC_RXIM   (1<<4)

◆ UART_LCR_H

#define UART_LCR_H   0x2C

◆ UART_LCR_H_FEN

#define UART_LCR_H_FEN   (1<<4)

◆ UART_LCR_H_WLEN_8BIT

#define UART_LCR_H_WLEN_8BIT   (0x3 << 5)

Function Documentation

◆ UARTDebugOut()

void UARTDebugOut ( const char *  format,
  ... 
)
extern

◆ UARTInitialize()

void UARTInitialize ( )
extern

UARTInitialize – initialize uart serial output.

◆ uartPutc()

void uartPutc ( char  c)
extern

uartPutc – put a single character to uart

Parameters
c– character to print

◆ uartPuts()

void uartPuts ( const char *  s)
extern

uartPuts –serial output interface

Parameters
s– String