/// <summary>This uses the standard baud rates defined by the SERIAL_BAUD enumerated type</summary> public static RESULTS setI2C_MODE(ISS_MODES_I2C mode, SERIAL_BAUD_RATES baud) { ISSComm comm = ISSComm.getComm(); comm.Write(new byte[] { 0x5A, 0x02, (byte)((byte)mode | (byte)ISS_MODES.SERIAL), (byte)(((uint)baud) >> 8), (byte)baud }); comm.Read(2); //if (comm.readData[0] == 0xFF) // is Ack return((RESULTS)comm.readData[1]); }
public static RESULTS setIO_MODE_SERIAL(IO_TYPES pin3, IO_TYPES pin4, SERIAL_BAUD_RATES baud) { return(setModeSerial(ISS_MODES.IO_MODE, pin3, pin4, baud)); }
/// <summary>This uses the standard baud rates defined by the SERIAL_BAUD enumerated type</summary> private static RESULTS setModeSerial(ISS_MODES mode, IO_TYPES pin3, IO_TYPES pin4, SERIAL_BAUD_RATES baud) { ISSComm comm = ISSComm.getComm(); comm.Write(new byte[] { 0x5A, 0x02, (byte)((byte)mode | (byte)ISS_MODES.SERIAL), (byte)(((uint)baud) >> 8), (byte)baud, (byte)(((int)pin4 << 6) | ((int)pin3 << 4)) }); comm.Read(2); //if (comm.readData[0] == 0xFF) // is Ack return((RESULTS)comm.readData[1]); }