Subversion Repositories group.electronics

Rev

Rev 159 | Go to most recent revision | 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 MCP2221;

namespace nitdcscore
{
    class Program
    {
        

        static void Main(string[] args) {


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

            //Bridge_mcp2221 bridge = new Bridge_mcp2221();


            /*
            NITAAPDevice aap = new NITAAPDevice(bios);
            if (aap.init() == 0) {
                Console.WriteLine("AAP Found");
                aap.Enable();
            }

            NITAHFSDevice ahfs = new NITAHFSDevice(bios);
            if (ahfs.init() == 0) {
                Console.WriteLine("AHCP/FSCP Found");
                ahfs.Enable();
            }
            */
            
            /*
            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());
            */

        }

    }
}