Subversion Repositories group.electronics

Rev

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;

using vJoyInterfaceWrap;
using MCP2221;

namespace nitdcscore
{
    class Program
    {
        

        static void Main(string[] args) {

            Globals.DcsBiosInit();
            Globals.NitvJoyInit();

            mcp2221 mcp = new mcp2221();
            mcp.Enabled = true;

            /*
            MchpUsbI2c usbi2c = new MchpUsbI2c();
            usbi2c.Settings.GetConnectionStatus();
            int count = usbi2c.Management.GetDevCount();
            for (int i = 0; i < count; i++) {
                usbi2c.Management.SelectDev(i);
                usbi2c.Settings.GetConnectionStatus();
                string usbDescriptor = usbi2c.Settings.GetUsbStringDescriptor();
                Console.WriteLine(usbDescriptor + ":" + i.ToString());
            }

            usbi2c.Management.SelectDev(0);
            usbi2c.Settings.GetConnectionStatus();
            usbi2c.Functions.WriteGpioPinValue(3, 1);

            usbi2c.Management.SelectDev(1);
            usbi2c.Settings.GetConnectionStatus();
            usbi2c.Functions.WriteGpioPinValue(3, 1);

            usbi2c.Management.SelectDev(0);
            usbi2c.Settings.GetConnectionStatus();
            int val0 = usbi2c.Functions.ReadGpioPinValue(3);

            usbi2c.Management.SelectDev(1);
            usbi2c.Settings.GetConnectionStatus();
            int val1 = usbi2c.Functions.ReadGpioPinValue(3);

            Console.WriteLine(val0.ToString() + ":" + val1.ToString());
            */

        }

    }
}