Subversion Repositories group.electronics

Rev

Rev 168 | Rev 171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 168 Rev 170
Line 11... Line 11...
11
        private mcp23017[] chips;
11
        private mcp23017[] chips;
12
 
12
 
13
        public NitMultiPanel(mcp2221 mcp) : base(mcp) {
13
        public NitMultiPanel(mcp2221 mcp) : base(mcp) {
14
            chips = new mcp23017[2] { new mcp23017(mcp, 0x20), new mcp23017(mcp, 0x24) };
14
            chips = new mcp23017[2] { new mcp23017(mcp, 0x20), new mcp23017(mcp, 0x24) };
15
 
15
 
16
            data.buttons = 0;
-
 
17
            data.prev = 0;
-
 
18
 
-
 
19
            data.axis[0].mapsize = 0xffff;
-
 
20
            data.axis[0].thres = 15;
-
 
21
 
-
 
22
            data.axis[1].mapsize = 0xffff;
-
 
23
            data.axis[1].thres = 15;
-
 
24
 
-
 
25
            this.Init();
16
            this.Init();
26
        }
17
        }
27
 
18
 
28
        public override int Init() {
19
        public override int Init() {
29
            // Choose what function the number pad shall carry out:
20
            // Choose what function the number pad shall carry out:
Line 123... Line 114...
123
            chips[1].SetIODirection(0x00, 0xff);
114
            chips[1].SetIODirection(0x00, 0xff);
124
            chips[1].SetIOPolarity(0x00, 0xff);
115
            chips[1].SetIOPolarity(0x00, 0xff);
125
            chips[1].SetIOPullups(0x00, 0xff);
116
            chips[1].SetIOPullups(0x00, 0xff);
126
 
117
 
127
            this.Refresh();
118
            this.Refresh();
128
            //input.prev = input.curr;
-
 
129
 
-
 
130
            data.prev = data.buttons;
119
            data.prev = data.buttons;
131
            data.axis[0].prev = data.axis[0].value;
120
            data.axis[0].prev = data.axis[0].value;
132
            data.axis[1].prev = data.axis[1].value;
121
            data.axis[1].prev = data.axis[1].value;
133
 
122
 
134
 
123