Subversion Repositories group.electronics

Rev

Rev 161 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
158 pfowler 1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Timers;
7
 
178 pfowler 8
using vJoyInterfaceWrap;
158 pfowler 9
using MCP2221;
10
 
11
namespace nitdcscore
12
{
13
    class Program
14
    {
15
 
16
 
17
        static void Main(string[] args) {
18
 
161 pfowler 19
            Globals.DcsBiosInit();
178 pfowler 20
            Globals.NitvJoyInit();
158 pfowler 21
 
22
            mcp2221 mcp = new mcp2221();
23
            mcp.Enabled = true;
161 pfowler 24
 
158 pfowler 25
            /*
26
            MchpUsbI2c usbi2c = new MchpUsbI2c();
27
            usbi2c.Settings.GetConnectionStatus();
28
            int count = usbi2c.Management.GetDevCount();
29
            for (int i = 0; i < count; i++) {
30
                usbi2c.Management.SelectDev(i);
31
                usbi2c.Settings.GetConnectionStatus();
32
                string usbDescriptor = usbi2c.Settings.GetUsbStringDescriptor();
33
                Console.WriteLine(usbDescriptor + ":" + i.ToString());
34
            }
35
 
36
            usbi2c.Management.SelectDev(0);
37
            usbi2c.Settings.GetConnectionStatus();
38
            usbi2c.Functions.WriteGpioPinValue(3, 1);
39
 
40
            usbi2c.Management.SelectDev(1);
41
            usbi2c.Settings.GetConnectionStatus();
42
            usbi2c.Functions.WriteGpioPinValue(3, 1);
43
 
44
            usbi2c.Management.SelectDev(0);
45
            usbi2c.Settings.GetConnectionStatus();
46
            int val0 = usbi2c.Functions.ReadGpioPinValue(3);
47
 
48
            usbi2c.Management.SelectDev(1);
49
            usbi2c.Settings.GetConnectionStatus();
50
            int val1 = usbi2c.Functions.ReadGpioPinValue(3);
51
 
52
            Console.WriteLine(val0.ToString() + ":" + val1.ToString());
53
            */
54
 
55
        }
56
 
57
    }
58
}