rtapi_outb(3rtapi)
β¨ rtapi_outb(3rtapi) β¨
okay bestie, so this is a page from the RTAPI section of the LinuxCNC manuals and it's literally all about poking bytes at hardware I/O ports π it's giving low-level, it's giving realtime, it's giving "yes we're talking directly to the hardware, no cap".
πΈ NAME πΈ
rtapi_outb, rtapi_inb β do a little hardware I/O, as a treat π
π¦ 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. like, where the port lives. that's the whole vibe.byteβ the byte you're writing to the port. one (1) single byte. iconic.
β¨ DESCRIPTION β¨
rtapi_outb writes a byte to a hardware I/O port. rtapi_inb reads a byte from a hardware I/O port. that's it, that's the whole thing. out goes the byte, in comes the byte. π₯
π REALTIME CONSIDERATIONS π
so this is the part where you pay attention, bestie:
- you may call these from init/cleanup code, and also from within realtime tasks π«Ά
- these are not available in non-realtime components. sorry to the non-realtime girlies, this is not your moment π
π RETURN VALUE π
rtapi_inb returns the byte that was read from the given I/O port. like it literally hands you the byte. slay.
π NOTES π
the I/O address should be inside a region that was previously allocated by rtapi_request_region. if it's not, another real-time module or the Linux kernel itself might try to access that same I/O region at the same time π and that is not the kind of chaos we're manifesting, fr fr.
π SEE ALSO π
that's the whole page, bestie π go forth and byte responsibly.
~ from the LinuxCNC Documentation girlies, dated 2006-10-12 β yes she's vintage, yes she still ate π β¨ π π¦
π¦ where this page comes from
- debian trixie: linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace-dev 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms