TwiceAsNice
2019-02-18
|
#include <windows.h>
#include <stdio.h>
#include <winioctl.h>
#include <errno.h>
#include "../libfli-libfli.h"
#include "../libfli-debug.h"
#include "../libfli-camera.h"
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) |
#define BPORT (io->port+0x401) |
#define C2 0x04 /* Bit 2 on the control port */ |
#define C5 0x20 /* Bit 5 on the control port */ |
#define CCDPAR_IOCTL_BASE ((USHORT) 2833) |
#define CCDPAR_TYPE ((ULONG) 43000) |
#define CPORT (io->port+0x002) |
#define DIR_FORWARD 0x01 |
#define DIR_REVERSE 0x02 |
#define DPORT (io->port+0x000) /* Data port */ |
#define EPORT (io->port+0x402) |
#define FPORT (io->port+0x400) |
#define IOCTL_GET_TIMEOUT_COUNT CTL_CODE(CCDPAR_TYPE, CCDPAR_IOCTL_BASE+4, 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_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 S3 0x08 /* Bit 3 on the status port */ |
#define S5 0x20 /* Bit 5 on the status port */ |
#define SPORT (io->port+0x001) |