public void OnStart(W32Serial ser) { ser.WriteComm(new W32Serial.SerWriteInfo { buf = new byte[] { 0xA5, 0x60 } }); }
static void WriteStr(W32Serial ser, string str) { var buf = ASCIIEncoding.ASCII.GetBytes(str + "\n"); ser.WriteComm(new W32Serial.SerWriteInfo { buf = buf, Done = (ok, err) => { Console.WriteLine("err " + ok); } }); }