MentOS  0.8.0
The Mentoring Operating System
Functions
port_io.h File Reference

Byte I/O on ports prototypes. More...

Go to the source code of this file.

Functions

static unsigned char inportb (unsigned short port)
 Reads a 8-bit value from the given port. More...
 
static unsigned short inports (unsigned short port)
 Reads a 16-bit value from the given port. More...
 
static unsigned int inportl (unsigned short port)
 Reads a 32-bit value from the given port. More...
 
static void outportb (unsigned short port, unsigned char value)
 Writes a 8-bit value at the given port. More...
 
static void outports (unsigned short port, unsigned short value)
 Writes a 16-bit value at the given port. More...
 
static void outportl (unsigned short port, unsigned int value)
 Writes a 32-bit value at the given port. More...
 
static void inportsb (unsigned short port, void *addr, unsigned long count)
 Reads multiple 8-bit values from the given port. More...
 
static void inportsw (unsigned short port, void *addr, unsigned long count)
 Reads multiple 16-bit values from the given port. More...
 
static void inportsl (unsigned short port, void *addr, unsigned long count)
 Reads multiple 32-bit values from the given port. More...
 
static void outportsb (unsigned short port, void *addr, unsigned long count)
 Writes multiple 8-bit values to the given port. More...
 
static void outportsw (unsigned short port, void *addr, unsigned long count)
 Writes multiple 16-bit values to the given port. More...
 
static void outportsl (unsigned short port, void *addr, unsigned long count)
 Writes multiple 32-bit values to the given port. More...
 

Detailed Description

Byte I/O on ports prototypes.

Function Documentation

◆ inportb()

static unsigned char inportb ( unsigned short  port)
inlinestatic

Reads a 8-bit value from the given port.

Parameters
portthe port we want to read from.
Returns
the value we read.

◆ inportl()

static unsigned int inportl ( unsigned short  port)
inlinestatic

Reads a 32-bit value from the given port.

Parameters
portthe port we want to read from.
Returns
the value we read.

◆ inports()

static unsigned short inports ( unsigned short  port)
inlinestatic

Reads a 16-bit value from the given port.

Parameters
portthe port we want to read from.
Returns
the value we read.

◆ inportsb()

static void inportsb ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Reads multiple 8-bit values from the given port.

Parameters
portthe port we want to read from.
addrthe location where we store the values we read.
countthe number of values we want to read.

◆ inportsl()

static void inportsl ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Reads multiple 32-bit values from the given port.

Parameters
portthe port we want to read from.
addrthe location where we store the values we read.
countthe number of values we want to read.

◆ inportsw()

static void inportsw ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Reads multiple 16-bit values from the given port.

Parameters
portthe port we want to read from.
addrthe location where we store the values we read.
countthe number of values we want to read.

◆ outportb()

static void outportb ( unsigned short  port,
unsigned char  value 
)
inlinestatic

Writes a 8-bit value at the given port.

Parameters
portthe port we want to write to.
valuethe value we want to write.

◆ outportl()

static void outportl ( unsigned short  port,
unsigned int  value 
)
inlinestatic

Writes a 32-bit value at the given port.

Parameters
portthe port we want to write to.
valuethe value we want to write.

◆ outports()

static void outports ( unsigned short  port,
unsigned short  value 
)
inlinestatic

Writes a 16-bit value at the given port.

Parameters
portthe port we want to write to.
valuethe value we want to write.

◆ outportsb()

static void outportsb ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Writes multiple 8-bit values to the given port.

Parameters
portthe port we want to write to.
addrthe location where we get the values we need to write.
countthe number of values we want to write.

◆ outportsl()

static void outportsl ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Writes multiple 32-bit values to the given port.

Parameters
portthe port we want to write to.
addrthe location where we get the values we need to write.
countthe number of values we want to write.

◆ outportsw()

static void outportsw ( unsigned short  port,
void *  addr,
unsigned long  count 
)
inlinestatic

Writes multiple 16-bit values to the given port.

Parameters
portthe port we want to write to.
addrthe location where we get the values we need to write.
countthe number of values we want to write.