---
name: "rtapi_outb"
section: "3rtapi"
platform: "linux"
package: "linuxcnc-uspace-dev"
version: "1:2.9.4-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rtapi_outb"
---

# rtapi\_outb(3rtapi)

Perform hardware I/O

## NAME

rtapi\_outb, rtapi\_inb - Perform hardware I/O

## SYNTAX

void rtapi\_outb(unsigned char *byte*, unsigned int *port*)

unsigned char rtapi\_inb(unsigned int *port*)

## ARGUMENTS

- *port*

  The address of the I/O port

- *byte*

  The byte to be written to the port

## DESCRIPTION

**rtapi\_outb** writes a byte to a hardware I/O port.  **rtapi\_inb** reads a byte from a hardware I/O port.

## REALTIME CONSIDERATIONS

May be called from init/cleanup code and from within realtime tasks. Not available in non-realtime components.

## RETURN VALUE

**rtapi\_inb** returns the byte read from the given I/O port

## NOTES

The I/O address should be within a region previously allocated by **rtapi\_request\_region**.  Otherwise, another real-time module or the Linux kernel might attempt to access the I/O region at the same time.

## SEE ALSO

**[rtapi\_region(3rtapi)](/rtapi_region/3rtapi.md)**
