IEEE1284_OPEN(3)
β¨ NAME β¨
ieee1284_open β open a port π (it lives in the Functions corner of the manual, section 3, for the record)
π¦ SYNOPSIS π¦
#include <ieee1284.h>
int ieee1284_open(struct parport *port, int flags, int *capabilities);
πΈ DESCRIPTION πΈ
okay so bestie, listen: before you can do literally anything with a port, you have to open it first. That's the whole vibe. All the initial set-up of the port happens right here at this stage. And then β the way that open ports don't just stay open forever β when you're done with it, you close it with ieee1284_close(3). no cap.
The flags you can pass are:
F1284_EXCLβ this device cannot share the port with anybody else, periodt. If that's the situation, you have to declare it at this stage, so the other drivers out there trying to grab the port know not to even bother. Because if you don't? They'll just wait around until this driver releases the port, i.e. never. π
lowkey important: theiopl/dev-port access methods don't support this yet, but theppdevones do. iykyk.
Now, if capabilities is not NULL, it has to point to storage for an int, and that int gets treated as a set of flags β one per bit β which the library sets or clears as appropriate. And if a capability is present, it will be used when asked for. Here's the whole lineup:
CAP1284_RAWβ pin-level access is available. If this one's present then these functions are effective:ieee1284_write_data,ieee1284_read_status,ieee1284_wait_status,ieee1284_write_control,ieee1284_read_control,ieee1284_frob_control. slay.CAP1284_NIBBLEβ there is an implementation of nibble mode for this port.CAP1284_BYTEβ there is an implementation of byte mode for this port.CAP1284_COMPATβ there is an implementation of compatibility mode for this port.CAP1284_ECPβ there is a hardware implementation of ECP mode for this port.CAP1284_ECPRLEβ there is an RLE-aware implementation of ECP mode for this port (theF1284_RLEflag is recognised by the ECP transfer functions).CAP1284_ECPSWEβ there is a software implementation of ECP mode for this port.CAP1284_BECPβ there is an implementation of bounded ECP mode for this port.CAP1284_EPPβ there is a hardware implementation of EPP mode for this port.CAP1284_EPPSWEβ there is a software implementation of EPP mode for this port.CAP1284_IRQβ an interrupt line is configured for this port and interrupt notifications can be received usingieee1284_get_irq_fd(3). iconic.CAP1284_DMAβ a DMA channel is configured for this port.
π RETURN VALUE π
here's what you might get back, bestie β read carefully:
E1284_OKβ the port is now opened. we love to see it. π«ΆE1284_INITβ there was a problem during port initialization. could be because another driver has opened the port exclusively, or some other reason. πE1284_NOMEMβ there is not enough memory.E1284_NOTAVAILβ one or more of the supplied flags is not supported by this type of port.E1284_INVALIDPORTβ theportparameter is invalid (for instance, the port may already be open).E1284_SYSβ there was a problem at the operating system level. the global variableerrnohas been set appropriately.
π SEE ALSO π
π AUTHOR π
Tim Waugh <twaugh@redhat.com>
- Author.
π COPYRIGHT π
Copyright Β© 2001-2003 Tim Waugh
and that's the whole page, bestie π this was IEEE1284_OPEN(3) from the Functions section, footer stamped 09/18/2007 and IEEE1284_OPEN(3) β go forth and open those ports responsibly, mwah π
β¨
π¦ 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