Exemplo n.º 1
0
        public FtdiDevice(MpsseProtocol protocol)
        {
            switch (protocol)
            {
            case MpsseProtocol.SPI:
                portA = new MpsseSPI("A");
                break;

            case MpsseProtocol.I2C:
                portA = new MpsseI2C("A");
                break;
            }
            portB = new IoPort("B");

            portA.Opened += new EventHandler(ports_Opened);
            portA.Closed += new EventHandler(ports_Closed);

            portB.Opened += new EventHandler(ports_Opened);
            portB.Closed += new EventHandler(ports_Closed);
        }
Exemplo n.º 2
0
		public FtdiDevice(MpsseProtocol protocol)
		{
			switch (protocol)
			{
				case MpsseProtocol.SPI:
					portA = new MpsseSPI("A");
					break;

				case MpsseProtocol.I2C:
					portA = new MpsseI2C("A");
					break;
			}
			portB = new IoPort("B");

			portA.Opened += new EventHandler(ports_Opened);
			portA.Closed += new EventHandler(ports_Closed);

			portB.Opened += new EventHandler(ports_Opened);
			portB.Closed += new EventHandler(ports_Closed);
		}