{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ForeignFunctionInterface #-} #include #include module Bindings.Parport where #strict_import {- Start off with user-visible constants -} {- Maximum of 16 ports per machine -} #num PARPORT_MAX {- Magic numbers -} #num PARPORT_IRQ_NONE #num PARPORT_DMA_NONE #num PARPORT_IRQ_AUTO #num PARPORT_DMA_AUTO #num PARPORT_DMA_NOFIFO #num PARPORT_DISABLE #num PARPORT_IRQ_PROBEONLY #num PARPORT_IOHI_AUTO #num PARPORT_CONTROL_STROBE #num PARPORT_CONTROL_AUTOFD #num PARPORT_CONTROL_INIT #num PARPORT_CONTROL_SELECT #num PARPORT_STATUS_ERROR #num PARPORT_STATUS_SELECT #num PARPORT_STATUS_PAPEROUT #num PARPORT_STATUS_ACK #num PARPORT_STATUS_BUSY {- Type classes for Plug-and-Play probe. -} -- typedef enum { #num PARPORT_CLASS_LEGACY #num PARPORT_CLASS_PRINTER #num PARPORT_CLASS_MODEM #num PARPORT_CLASS_NET #num PARPORT_CLASS_HDC #num PARPORT_CLASS_PCMCIA #num PARPORT_CLASS_MEDIA #num PARPORT_CLASS_FDC #num PARPORT_CLASS_PORTS #num PARPORT_CLASS_SCANNER #num PARPORT_CLASS_DIGCAM #num PARPORT_CLASS_OTHER #num PARPORT_CLASS_UNSPEC #num PARPORT_CLASS_SCSIADAPTER -- } parport_device_class; {- The "modes" entry in parport is a bit field representing the capabilities of the hardware. -} #num PARPORT_MODE_PCSPP #num PARPORT_MODE_TRISTATE #num PARPORT_MODE_EPP #num PARPORT_MODE_ECP #num PARPORT_MODE_COMPAT #num PARPORT_MODE_DMA #num PARPORT_MODE_SAFEININT {- IEEE1284 modes: Nibble mode, byte mode, ECP, ECPRLE and EPP are their own 'extensibility request' values. Others are special. 'Real' ECP modes must have the IEEE1284_MODE_ECP bit set. -} #num IEEE1284_MODE_NIBBLE #num IEEE1284_MODE_BYTE #num IEEE1284_MODE_COMPAT #num IEEE1284_MODE_BECP #num IEEE1284_MODE_ECP #num IEEE1284_MODE_ECPRLE #num IEEE1284_MODE_ECPSWE #num IEEE1284_MODE_EPP #num IEEE1284_MODE_EPPSL #num IEEE1284_MODE_EPPSWE #num IEEE1284_DEVICEID #num IEEE1284_EXT_LINK {- For the benefit of parport_read/write, you can use these with * parport_negotiate to use address operations. They have no effect * other than to make parport_read/write use address transfers. -} #num IEEE1284_ADDR #num IEEE1284_DATA {- Flags for block transfer operations. -} #num PARPORT_EPP_FAST #num PARPORT_W91284PIC