-
Notifications
You must be signed in to change notification settings - Fork 1
/
GPIO.bt
99 lines (85 loc) · 2.32 KB
/
GPIO.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//--------------------------------------
//--- 010 Editor v6.0 Binary Template
//
// File:
// Author:
// Revision:
// Purpose:
//--------------------------------------
//
// GPIO Assignment Table
//
typedef struct {
DWORD gpioPinNum : 6;
DWORD gpioIo : 1;
DWORD gpioI : 1;
DWORD gpioFunction : 8;
DWORD gpioOutputHWSelect : 8;
DWORD gpioInputHWSelect : 5;
DWORD gpioGS : 1;
DWORD gpioR : 1;
DWORD gpioPM : 1;
UBYTE gpioLockPin : 4;
UBYTE gpioFT : 1;
UBYTE gpioFE : 1;
UBYTE gpioOT : 1;
UBYTE gpioOE : 1;
} GPIOASSIGNMENTTABLEENTRY;
typedef struct {
UBYTE gpioAssignmentVersion;
UBYTE gpioAssignmentHeaderSize;
UBYTE gpioAssignmentEntryCount;
UBYTE gpioAssignmentEntrySize;
WORD gpioAssignmentTablePtr;
local int i;
for( i = 0; i < gpioAssignmentEntryCount; i++ )
GPIOASSIGNMENTTABLEENTRY gpioEntry;
} GPIOASSIGNMENTTABLE;
//
// External GPIO Assignment Table
//
//
// External GPIO Assignment Specific Table
//
typedef struct
{
} EXTGPIOASSIGNMENTSPECIFICENTRY;
typedef struct
{
UBYTE extGpioAssignmentSpecificVersion;
UBYTE extGpioAssignmentSpecificHeaderSize;
UBYTE extGpioAssignmentSpecificEntryCount;
UBYTE extGpioAssignmentSpecificEntrySize;
UBYTE extGpioAssignmentSpecificExternalType;
UBYTE extGpioAssignmentSpecificI2CAddress;
UBYTE extGpioAssignmentSpecificxInt : 2;
UBYTE extGpioAssignmentSpecificRsvd : 2;
UBYTE extGpioAssignmentSpecificP : 1;
UBYTE extGpioAssignmentSpecificRsvd : 3;
local int i;
for( i = 0; i < extGpioAssignmentSpecificEntryCount; i++ )
{
GPIOASSIGNMENTTABLEENTRY extGpioAssignmentSpecificEntry;
}
} EXTGPIOASSIGNMENTSPECIFICTABLE;
typedef struct
{
WORD extGpioAssingmentSpecificTablePointer;
} EXTGPIOASSIGNMENTMASTERENTRY;
typedef struct
{
UBYTE extGpioVersion;
UBYTE extGpioHeaderSize;
UBYTE extGpioEntryCount;
UBYTE extGpioEntrySize;
EXTGPIOASSIGNMENTMASTERENTRY extGpioAssignmentMasterEntry[extGpioEntryCount];
local int i;
local int curPos;
for( i = 0; i < extGpioEntryCount; i++ )
{
curPos = FTell();
FSeek(extGpioAssignmentMasterEntry[i].extGpioAssingmentSpecificTablePointer);
EXTGPIOASSIGNMENTSPECIFICTABLE extGpioAssignmentSpecificTable;
FSeek(curPos);
}
} EXTGPIOASSIGNMENTMASTERTABLE;