OpenCores
URL https://opencores.org/ocsvn/modular_oscilloscope/modular_oscilloscope/trunk

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [sw/] [src/] [include/] [epp_parallel_access_win.cpp] - Blame information for rev 60

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 60 budinero
#include "epp_parallel_access_win.h"
2
 
3
PORTOUT PortOut;
4
PORTWORDOUT PortWordOut;
5
PORTDWORDOUT PortDWordOut;
6
PORTIN PortIn;
7
PORTWORDIN PortWordIn;
8
PORTDWORDIN PortDWordIn;
9
SETPORTBIT SetPortBit;
10
CLRPORTBIT ClrPortBit;
11
NOTPORTBIT NotPortBit;
12
GETPORTBIT GetPortBit;
13
RIGHTPORTSHIFT RightPortShift;
14
LEFTPORTSHIFT LeftPortShift;
15
ISDRIVERINSTALLED IsDriverInstalled;
16
 
17
HMODULE hio;
18
 
19
void UnloadIODLL() {
20
        FreeLibrary(hio);
21
}
22
 
23
int LoadIODLL() {
24
        hio =  LoadLibraryA("io");
25
        if (hio == NULL) return 1;
26
        PortOut = (PORTOUT)GetProcAddress(hio, "PortOut");
27
        PortWordOut = (PORTWORDOUT)GetProcAddress(hio, "PortWordOut");
28
        PortDWordOut = (PORTDWORDOUT)GetProcAddress(hio, "PortDWordOut");
29
        PortIn = (PORTIN)GetProcAddress(hio, "PortIn");
30
        PortWordIn = (PORTWORDIN)GetProcAddress(hio, "PortWordIn");
31
        PortDWordIn = (PORTDWORDIN)GetProcAddress(hio, "PortDWordIn");
32
        SetPortBit = (SETPORTBIT)GetProcAddress(hio, "SetPortBit");
33
        ClrPortBit = (CLRPORTBIT)GetProcAddress(hio, "ClrPortBit");
34
        NotPortBit = (NOTPORTBIT)GetProcAddress(hio, "NotPortBit");
35
        GetPortBit = (GETPORTBIT)GetProcAddress(hio, "GetPortBit");
36
        RightPortShift = (RIGHTPORTSHIFT)GetProcAddress(hio, "RightPortShift");
37
        LeftPortShift = (LEFTPORTSHIFT)GetProcAddress(hio, "LeftPortShift");
38
        IsDriverInstalled = (ISDRIVERINSTALLED)GetProcAddress(hio, "IsDriverInstalled");
39
 
40
        atexit(UnloadIODLL);
41
 
42
        return 0;
43
}
44
 
45
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.