PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
port.h File Reference
#include <stdint.h>
#include <sys/defs.h>
Include dependency graph for port.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PORT_MAX   UINT16_MAX
 Maximum I/O port number.
 

Typedefs

typedef uint16_t port_t
 I/O port type.
 

Functions

uint64_t port_reserve (port_t *out, port_t minBase, port_t maxBase, uint64_t alignment, uint64_t length, const char *owner)
 Find and reserve a range of I/O ports if available.
 
void port_release (port_t base, uint64_t length)
 Release a previously reserved range of I/O ports.
 
static void out8 (port_t port, uint8_t val)
 Write an 8-bit value to an I/O port.
 
static uint8_t in8 (port_t port)
 Read an 8-bit value from an I/O port.
 
static void out16 (port_t port, uint16_t val)
 Write a 16-bit value to an I/O port.
 
static uint16_t in16 (port_t port)
 Read a 16-bit value from an I/O port.
 
static uint32_t in32 (port_t port)
 Write a 32-bit value to an I/O port.
 
static void out32 (port_t port, uint32_t val)
 Read a 32-bit value from an I/O port.