IEEE1284_DATA(3)
β¨ IEEE1284_DATA π
okay bestie, welcome to the Functions section of the manual (yes that's the manual name, we're fancy here) β today we're controlling the data lines of a parallel port and honestly? iconic behavior. π
πΈ NAME πΈ
ieee1284_read_data</p>, ieee1284_write_data</p>, ieee1284_data_dir</p>, ieee1284_wait_data</p> β they run the data lines, periodt. π
β¨ SYNOPSIS β¨
#include <ieee1284.h>
int ieee1284_read_data(struct parport *port);
void ieee1284_write_data(struct parport *port, unsigned char dt);
int ieee1284_data_dir(struct parport *port, int reverse);
int ieee1284_wait_data(struct parport *port, unsigned char mask,
unsigned char val, struct timeval *timeout);
π¦ DESCRIPTION π¦
so like. these functions manipulate the data lines of the parallel port that's associated with port β and heads up, that port must have been claimed using ieee1284_claim(3) first. no claiming, no playing. π
The lines are represented by an 8-bit number (one line per bit, cute right) plus a direction. And here's the vibe: the data lines are driven as a group. They're either all host-driven (forward direction) or not (reverse direction). When the peripheral is driving them, the host must not. fr fr, that's the rule. π
For ieee1284_data_dir, the reverse parameter should be zero to turn the data line drivers on, and non-zero to turn them off. lowkey important: some port types may be unable to switch off the data line drivers. it's giving "sorry, not available on this hardware". π
Also, setting the data lines may have side effects on some port types β for example, some Amiga ports pulse nStrobe. so yeah, watch out for that. β οΈ
ieee1284_wait_data waits, up until the timeout, for the data bits specified in mask to have the corresponding values in val. it's just sitting there, waiting, main character energy. β³
π RETURN VALUE π
ieee1284_read_data returns the 8-bit number representing the data lines β unless it's just not possible to return such a value with this port type, in which case it returns an error code instead. the possible error codes, bestie:
E1284_NOTAVAILβ Bi-directional data lines are not available on this system. π«E1284_INVALIDPORTβ Theportparameter is invalid (perhaps it has not been claimed, for instance). πE1284_SYSβ There was an error at the operating system level, anderrnohas been set accordingly. πE1284_TIMEDOUTβ The timeout has elapsed. β°
And now the plot twist: whereas ieee1284_read_data may return E1284_NOTAVAIL on its first invocation on the port, if it does not do so, then it cannot β not until ieee1284_close is called for that port. so basically: first impression is everything, and it doesn't change its mind later. π
π AUTHOR π
Tim Waugh <twaugh@redhat.com>
- Author. (yes that's literally the whole credit, and honestly? respect. π«Ά)
π COPYRIGHT π
Copyright Β© 2001-2003 Tim Waugh
and that's the whole page, bestie!! thanks for reading, mwah π«Ά this was IEEE1284_DATA(3) from 09/18/2007 β yeah it's an oldie but it ate and left no crumbs. go claim your port. slay. β¨ππ
π¦ where this page comes from
- alpine 3.24: libieee1284-doc 0.2.11-r4 Β· GPL-2.0-or-later
- debian bookworm: libieee1284-3-dev 0.2.11-14
- debian trixie: libieee1284-3-dev 0.2.11-14.1+b1
- opensuse-leap 16.0: libieee1284-devel 0.2.11-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: libieee1284-devel 0.2.11-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: libieee1284-devel 0.2.11-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: libieee1284-devel 0.2.11-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- ubuntu jammy: libieee1284-3-dev 0.2.11-14build2
- ubuntu noble: libieee1284-3-dev 0.2.11-14.1build1
- ubuntu questing: libieee1284-3-dev 0.2.11-14.1build1
- ubuntu resolute: libieee1284-3-dev 0.2.11-14.1build2
- ubuntu stonking: libieee1284-3-dev 0.2.11-15 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms