Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
UART Hardware Functions

These UART functions are implemented differently for different UART types. More...

Functions

syscall kgetc (device *devptr)
 
syscall kputc (uchar c, device *devptr)
 
interrupt uartInterrupt (void)
 

Detailed Description

These UART functions are implemented differently for different UART types.

Function Documentation

syscall kgetc ( device *  devptr)

Synchronously read a character from a UART. This blocks until a character is available. The interrupt handler is not used.

Parameters
devptrPointer to the device table entry for a UART.
Returns
The character read from the UART as an unsigned char cast to an int.
syscall kputc ( uchar  c,
device *  devptr 
)

Synchronously write a character to a UART. This blocks until the character has been written to the hardware. The interrupt handler is not used.

Parameters
cThe character to write.
devptrPointer to the device table entry for a UART.
Returns
The character written to the UART as an unsigned char cast to an int.
interrupt uartInterrupt ( void  )

Handle an interrupt request from a PL011 UART.