Subversion Repositories group.electronics

Rev

Rev 159 | Go to most recent revision | 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
 
8
using MCP2221;
9
 
10
namespace nitdcscore
11
{
12
    class Program
13
    {
14
 
15
 
16
        static void Main(string[] args) {
17
 
161 pfowler 18
            Globals.DcsBiosInit();
158 pfowler 19
 
20
            mcp2221 mcp = new mcp2221();
21
            mcp.Enabled = true;
161 pfowler 22
 
159 pfowler 23
 
158 pfowler 24
            /*
25
            MchpUsbI2c usbi2c = new MchpUsbI2c();
26
            usbi2c.Settings.GetConnectionStatus();
27
            int count = usbi2c.Management.GetDevCount();
28
            for (int i = 0; i < count; i++) {
29
                usbi2c.Management.SelectDev(i);
30
                usbi2c.Settings.GetConnectionStatus();
31
                string usbDescriptor = usbi2c.Settings.GetUsbStringDescriptor();
32
                Console.WriteLine(usbDescriptor + ":" + i.ToString());
33
            }
34
 
35
            usbi2c.Management.SelectDev(0);
36
            usbi2c.Settings.GetConnectionStatus();
37
            usbi2c.Functions.WriteGpioPinValue(3, 1);
38
 
39
            usbi2c.Management.SelectDev(1);
40
            usbi2c.Settings.GetConnectionStatus();
41
            usbi2c.Functions.WriteGpioPinValue(3, 1);
42
 
43
            usbi2c.Management.SelectDev(0);
44
            usbi2c.Settings.GetConnectionStatus();
45
            int val0 = usbi2c.Functions.ReadGpioPinValue(3);
46
 
47
            usbi2c.Management.SelectDev(1);
48
            usbi2c.Settings.GetConnectionStatus();
49
            int val1 = usbi2c.Functions.ReadGpioPinValue(3);
50
 
51
            Console.WriteLine(val0.ToString() + ":" + val1.ToString());
52
            */
53
 
54
        }
55
 
56
    }
57
}