iPXE
Macros | Functions | Variables
ns16550.h File Reference

16550-compatible UART More...

#include <stdint.h>
#include <ipxe/io.h>

Go to the source code of this file.

Macros

#define COM1_BASE   0x3f8
 
#define COM2_BASE   0x2f8
 
#define COM3_BASE   0x3e8
 
#define COM4_BASE   0x2e8
 
#define COM1   &com1
 
#define COM2   &com2
 
#define COM3   &com3
 
#define COM4   &com4
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __attribute__ ((always_inline)) void ns16550_write(struct ns16550_uart *ns16550
 Write to UART register. More...
 

Variables

static unsigned int address
 
static unsigned int uint8_t data
 
struct uart com1
 
struct uart com2
 
struct uart com3
 
struct uart com4
 

Detailed Description

16550-compatible UART

Definition in file ns16550.h.

Macro Definition Documentation

◆ COM1_BASE

#define COM1_BASE   0x3f8

Definition at line 43 of file ns16550.h.

◆ COM2_BASE

#define COM2_BASE   0x2f8

Definition at line 44 of file ns16550.h.

◆ COM3_BASE

#define COM3_BASE   0x3e8

Definition at line 45 of file ns16550.h.

◆ COM4_BASE

#define COM4_BASE   0x2e8

Definition at line 46 of file ns16550.h.

◆ COM1

#define COM1   &com1

Definition at line 55 of file ns16550.h.

◆ COM2

#define COM2   &com2

Definition at line 56 of file ns16550.h.

◆ COM3

#define COM3   &com3

Definition at line 57 of file ns16550.h.

◆ COM4

#define COM4   &com4

Definition at line 58 of file ns16550.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Write to UART register.

Read from UART register.

Parameters
ns1655016550 UART
addressRegister address
dataData
ns1655016550 UART
addressRegister address
Return values
dataData

Variable Documentation

◆ address

unsigned int address
Initial value:
{
return ioread8 ( ns16550->base + address )
uint8_t ioread8(volatile uint8_t *io_addr)
Read byte from I/O-mapped or memory-mapped device.
static unsigned int address
Definition: ns16550.h:23

Definition at line 23 of file ns16550.h.

◆ data

unsigned int uint8_t data
Initial value:
{
iowrite8 ( data, ( ns16550->base + address ) )
static unsigned int address
Definition: ns16550.h:23
void iowrite8(uint8_t data, volatile uint8_t *io_addr)
Write byte to I/O-mapped or memory-mapped device.
static unsigned int uint8_t data
Definition: ns16550.h:24

Definition at line 24 of file ns16550.h.

◆ com1

struct uart com1

◆ com2

struct uart com2

◆ com3

struct uart com3

◆ com4

struct uart com4