{-# LINE 1 "src/Bindings/Parport.hsc" #-}

{-# LINE 2 "src/Bindings/Parport.hsc" #-}
{-# OPTIONS_GHC   -Wall #-}
{-# LANGUAGE      DeriveDataTypeable , ForeignFunctionInterface #-}


{-# LINE 6 "src/Bindings/Parport.hsc" #-}

{-# LINE 7 "src/Bindings/Parport.hsc" #-}

module Bindings.Parport where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 10 "src/Bindings/Parport.hsc" #-}

{- Start off with user-visible constants -}

{- Maximum of 16 ports per machine -}
c'PARPORT_MAX = 16
c'PARPORT_MAX :: (Num a) => a

{-# LINE 15 "src/Bindings/Parport.hsc" #-}


{- Magic numbers -}
c'PARPORT_IRQ_NONE = -1
c'PARPORT_IRQ_NONE :: (Num a) => a

{-# LINE 19 "src/Bindings/Parport.hsc" #-}

c'PARPORT_DMA_NONE = -1
c'PARPORT_DMA_NONE :: (Num a) => a

{-# LINE 21 "src/Bindings/Parport.hsc" #-}

c'PARPORT_IRQ_AUTO = -2
c'PARPORT_IRQ_AUTO :: (Num a) => a

{-# LINE 23 "src/Bindings/Parport.hsc" #-}

c'PARPORT_DMA_AUTO = -2
c'PARPORT_DMA_AUTO :: (Num a) => a

{-# LINE 25 "src/Bindings/Parport.hsc" #-}

c'PARPORT_DMA_NOFIFO = -3
c'PARPORT_DMA_NOFIFO :: (Num a) => a

{-# LINE 27 "src/Bindings/Parport.hsc" #-}

c'PARPORT_DISABLE = -2
c'PARPORT_DISABLE :: (Num a) => a

{-# LINE 29 "src/Bindings/Parport.hsc" #-}

c'PARPORT_IRQ_PROBEONLY = -3
c'PARPORT_IRQ_PROBEONLY :: (Num a) => a

{-# LINE 31 "src/Bindings/Parport.hsc" #-}

c'PARPORT_IOHI_AUTO = -1
c'PARPORT_IOHI_AUTO :: (Num a) => a

{-# LINE 33 "src/Bindings/Parport.hsc" #-}


c'PARPORT_CONTROL_STROBE = 1
c'PARPORT_CONTROL_STROBE :: (Num a) => a

{-# LINE 36 "src/Bindings/Parport.hsc" #-}

c'PARPORT_CONTROL_AUTOFD = 2
c'PARPORT_CONTROL_AUTOFD :: (Num a) => a

{-# LINE 38 "src/Bindings/Parport.hsc" #-}

c'PARPORT_CONTROL_INIT = 4
c'PARPORT_CONTROL_INIT :: (Num a) => a

{-# LINE 40 "src/Bindings/Parport.hsc" #-}

c'PARPORT_CONTROL_SELECT = 8
c'PARPORT_CONTROL_SELECT :: (Num a) => a

{-# LINE 42 "src/Bindings/Parport.hsc" #-}


c'PARPORT_STATUS_ERROR = 8
c'PARPORT_STATUS_ERROR :: (Num a) => a

{-# LINE 45 "src/Bindings/Parport.hsc" #-}

c'PARPORT_STATUS_SELECT = 16
c'PARPORT_STATUS_SELECT :: (Num a) => a

{-# LINE 47 "src/Bindings/Parport.hsc" #-}

c'PARPORT_STATUS_PAPEROUT = 32
c'PARPORT_STATUS_PAPEROUT :: (Num a) => a

{-# LINE 49 "src/Bindings/Parport.hsc" #-}

c'PARPORT_STATUS_ACK = 64
c'PARPORT_STATUS_ACK :: (Num a) => a

{-# LINE 51 "src/Bindings/Parport.hsc" #-}

c'PARPORT_STATUS_BUSY = 128
c'PARPORT_STATUS_BUSY :: (Num a) => a

{-# LINE 53 "src/Bindings/Parport.hsc" #-}


{- Type classes for Plug-and-Play probe.  -}
-- typedef enum {
c'PARPORT_CLASS_LEGACY = 0
c'PARPORT_CLASS_LEGACY :: (Num a) => a

{-# LINE 58 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_PRINTER = 1
c'PARPORT_CLASS_PRINTER :: (Num a) => a

{-# LINE 59 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_MODEM = 2
c'PARPORT_CLASS_MODEM :: (Num a) => a

{-# LINE 60 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_NET = 3
c'PARPORT_CLASS_NET :: (Num a) => a

{-# LINE 61 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_HDC = 4
c'PARPORT_CLASS_HDC :: (Num a) => a

{-# LINE 62 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_PCMCIA = 5
c'PARPORT_CLASS_PCMCIA :: (Num a) => a

{-# LINE 63 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_MEDIA = 6
c'PARPORT_CLASS_MEDIA :: (Num a) => a

{-# LINE 64 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_FDC = 7
c'PARPORT_CLASS_FDC :: (Num a) => a

{-# LINE 65 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_PORTS = 8
c'PARPORT_CLASS_PORTS :: (Num a) => a

{-# LINE 66 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_SCANNER = 9
c'PARPORT_CLASS_SCANNER :: (Num a) => a

{-# LINE 67 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_DIGCAM = 10
c'PARPORT_CLASS_DIGCAM :: (Num a) => a

{-# LINE 68 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_OTHER = 11
c'PARPORT_CLASS_OTHER :: (Num a) => a

{-# LINE 69 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_UNSPEC = 12
c'PARPORT_CLASS_UNSPEC :: (Num a) => a

{-# LINE 70 "src/Bindings/Parport.hsc" #-}
c'PARPORT_CLASS_SCSIADAPTER = 13
c'PARPORT_CLASS_SCSIADAPTER :: (Num a) => a

{-# LINE 71 "src/Bindings/Parport.hsc" #-}
-- } parport_device_class;

{- The "modes" entry in parport is a bit field representing the
   capabilities of the hardware. -}
c'PARPORT_MODE_PCSPP = 1
c'PARPORT_MODE_PCSPP :: (Num a) => a

{-# LINE 76 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_TRISTATE = 2
c'PARPORT_MODE_TRISTATE :: (Num a) => a

{-# LINE 78 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_EPP = 4
c'PARPORT_MODE_EPP :: (Num a) => a

{-# LINE 80 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_ECP = 8
c'PARPORT_MODE_ECP :: (Num a) => a

{-# LINE 82 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_COMPAT = 16
c'PARPORT_MODE_COMPAT :: (Num a) => a

{-# LINE 84 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_DMA = 32
c'PARPORT_MODE_DMA :: (Num a) => a

{-# LINE 86 "src/Bindings/Parport.hsc" #-}

c'PARPORT_MODE_SAFEININT = 64
c'PARPORT_MODE_SAFEININT :: (Num a) => a

{-# LINE 88 "src/Bindings/Parport.hsc" #-}


{- 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.  -}
c'IEEE1284_MODE_NIBBLE = 0
c'IEEE1284_MODE_NIBBLE :: (Num a) => a

{-# LINE 95 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_BYTE = 1
c'IEEE1284_MODE_BYTE :: (Num a) => a

{-# LINE 97 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_COMPAT = 256
c'IEEE1284_MODE_COMPAT :: (Num a) => a

{-# LINE 99 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_BECP = 512
c'IEEE1284_MODE_BECP :: (Num a) => a

{-# LINE 101 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_ECP = 16
c'IEEE1284_MODE_ECP :: (Num a) => a

{-# LINE 103 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_ECPRLE = 48
c'IEEE1284_MODE_ECPRLE :: (Num a) => a

{-# LINE 105 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_ECPSWE = 1024
c'IEEE1284_MODE_ECPSWE :: (Num a) => a

{-# LINE 107 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_EPP = 64
c'IEEE1284_MODE_EPP :: (Num a) => a

{-# LINE 109 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_EPPSL = 2048
c'IEEE1284_MODE_EPPSL :: (Num a) => a

{-# LINE 111 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_MODE_EPPSWE = 4096
c'IEEE1284_MODE_EPPSWE :: (Num a) => a

{-# LINE 113 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_DEVICEID = 4
c'IEEE1284_DEVICEID :: (Num a) => a

{-# LINE 115 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_EXT_LINK = 16384
c'IEEE1284_EXT_LINK :: (Num a) => a

{-# LINE 117 "src/Bindings/Parport.hsc" #-}

{- 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. -}
c'IEEE1284_ADDR = 8192
c'IEEE1284_ADDR :: (Num a) => a

{-# LINE 122 "src/Bindings/Parport.hsc" #-}

c'IEEE1284_DATA = 0
c'IEEE1284_DATA :: (Num a) => a

{-# LINE 124 "src/Bindings/Parport.hsc" #-}


{- Flags for block transfer operations. -}
c'PARPORT_EPP_FAST = 1
c'PARPORT_EPP_FAST :: (Num a) => a

{-# LINE 128 "src/Bindings/Parport.hsc" #-}

c'PARPORT_W91284PIC = 2
c'PARPORT_W91284PIC :: (Num a) => a

{-# LINE 130 "src/Bindings/Parport.hsc" #-}