TwiceAsNice  2019-02-18
Macros | Functions
libfli-windows-parport.c File Reference
#include <windows.h>
#include <stdio.h>
#include <winioctl.h>
#include <errno.h>
#include "../libfli-libfli.h"
#include "../libfli-debug.h"
#include "../libfli-camera.h"
Include dependency graph for libfli-windows-parport.c:

Macros

#define CCDPAR_TYPE   ((ULONG) 43000)
 
#define CCDPAR_IOCTL_BASE   ((USHORT) 2833)
 
#define IOCTL_SET_READ_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+1, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define IOCTL_SET_WRITE_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+2, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define IOCTL_SET_DIRECTION_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+3, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define IOCTL_GET_TIMEOUT_COUNT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+4, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define DPORT   (io->port+0x000) /* Data port */
 
#define SPORT   (io->port+0x001)
 
#define CPORT   (io->port+0x002)
 
#define FPORT   (io->port+0x400)
 
#define BPORT   (io->port+0x401)
 
#define EPORT   (io->port+0x402)
 
#define DIR_FORWARD   0x01
 
#define DIR_REVERSE   0x02
 
#define C2   0x04 /* Bit 2 on the control port */
 
#define S5   0x20 /* Bit 5 on the status port */
 
#define S3   0x08 /* Bit 3 on the status port */
 
#define C5   0x20 /* Bit 5 on the control port */
 

Functions

static long ECPSetReverse (flidev_t dev)
 
long ECPReadByte (flidev_t dev, unsigned char *byte, unsigned long *timeout)
 
long ECPReadWord (flidev_t dev, unsigned short *word, unsigned long *timeout)
 
static long ECPSetForward (flidev_t dev)
 
long ECPWriteByte (flidev_t dev, unsigned char byte, unsigned long *timeout)
 
long ECPWrite (flidev_t dev, void *buffer, long length)
 
long ECPWriteWord (flidev_t dev, unsigned short word, unsigned long *timeout)
 
long ECPRead (flidev_t dev, void *buffer, long length)
 
long ECPInit (flidev_t dev)
 
long ECPClose (flidev_t dev)
 
long parportio (flidev_t dev, void *buf, long *wlen, long *rlen)
 

Macro Definition Documentation

◆ BPORT

#define BPORT   (io->port+0x401)

◆ C2

#define C2   0x04 /* Bit 2 on the control port */

◆ C5

#define C5   0x20 /* Bit 5 on the control port */

◆ CCDPAR_IOCTL_BASE

#define CCDPAR_IOCTL_BASE   ((USHORT) 2833)

◆ CCDPAR_TYPE

#define CCDPAR_TYPE   ((ULONG) 43000)

◆ CPORT

#define CPORT   (io->port+0x002)

◆ DIR_FORWARD

#define DIR_FORWARD   0x01

◆ DIR_REVERSE

#define DIR_REVERSE   0x02

◆ DPORT

#define DPORT   (io->port+0x000) /* Data port */

◆ EPORT

#define EPORT   (io->port+0x402)

◆ FPORT

#define FPORT   (io->port+0x400)

◆ IOCTL_GET_TIMEOUT_COUNT

#define IOCTL_GET_TIMEOUT_COUNT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+4, METHOD_BUFFERED, FILE_ANY_ACCESS)

◆ IOCTL_SET_DIRECTION_TIMEOUT

#define IOCTL_SET_DIRECTION_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+3, METHOD_BUFFERED, FILE_ANY_ACCESS)

◆ IOCTL_SET_READ_TIMEOUT

#define IOCTL_SET_READ_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+1, METHOD_BUFFERED, FILE_ANY_ACCESS)

◆ IOCTL_SET_WRITE_TIMEOUT

#define IOCTL_SET_WRITE_TIMEOUT   CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+2, METHOD_BUFFERED, FILE_ANY_ACCESS)

◆ S3

#define S3   0x08 /* Bit 3 on the status port */

◆ S5

#define S5   0x20 /* Bit 5 on the status port */

◆ SPORT

#define SPORT   (io->port+0x001)

Function Documentation

◆ ECPClose()

long ECPClose ( flidev_t  dev)

◆ ECPInit()

long ECPInit ( flidev_t  dev)

◆ ECPRead()

long ECPRead ( flidev_t  dev,
void *  buffer,
long  length 
)

◆ ECPReadByte()

long ECPReadByte ( flidev_t  dev,
unsigned char *  byte,
unsigned long timeout 
)

◆ ECPReadWord()

long ECPReadWord ( flidev_t  dev,
unsigned short *  word,
unsigned long timeout 
)

◆ ECPSetForward()

static long ECPSetForward ( flidev_t  dev)
static

◆ ECPSetReverse()

static long ECPSetReverse ( flidev_t  dev)
static

◆ ECPWrite()

long ECPWrite ( flidev_t  dev,
void *  buffer,
long  length 
)

◆ ECPWriteByte()

long ECPWriteByte ( flidev_t  dev,
unsigned char  byte,
unsigned long timeout 
)

◆ ECPWriteWord()

long ECPWriteWord ( flidev_t  dev,
unsigned short  word,
unsigned long timeout 
)

◆ parportio()

long parportio ( flidev_t  dev,
void *  buf,
long wlen,
long rlen 
)