コード例 #1
0
ファイル: ICS9LPRS365BGLF.cs プロジェクト: darkwrat/setfsb
/* Table containing three values
 * FSB, CONTROLBYTE, CONTROLBYTE1
 * Gathered by setting FSB using setfsb, then reviewing the Diagnosis
 * screen to identify what data changed
 */


        public ICS9LPRS365BGLF(smBus smb)
        {
            this.smb = smb;
            ControlBytes.Add(new ControlByte(200, 0x48, 0x2F));
            ControlBytes.Add(new ControlByte(222, 0x48, 0x4B));
            ControlBytes.Add(new ControlByte(233, 0x48, 0x4B));
            ControlBytes.Add(new ControlByte(240, 0x48, 0x67));
        }
コード例 #2
0
ファイル: ICS9LPRS355.cs プロジェクト: darkwrat/setfsb
 public ICS9LPRS355(smBus smb)
 {
     this.smb = smb;
     ControlBytes.Add(new ControlByte(112, 0x88, 0x71));
     ControlBytes.Add(new ControlByte(117, 0x88, 0x87));
     ControlBytes.Add(new ControlByte(125, 0x88, 0xA3));
     ControlBytes.Add(new ControlByte(133, 0x88, 0xBF));
     ControlBytes.Add(new ControlByte(142, 0x88, 0xDB));
     ControlBytes.Add(new ControlByte(150, 0x88, 0xF7));
     ControlBytes.Add(new ControlByte(158, 0x48, 0x13));
     ControlBytes.Add(new ControlByte(167, 0x48, 0x2F));
     ControlBytes.Add(new ControlByte(175, 0x48, 0x4B));
     ControlBytes.Add(new ControlByte(183, 0x48, 0x67));
 }
コード例 #3
0
        public void SendControl(ControlBytes controlByte, string message = null)
        {
            if (message != null)
            {
                Log.Debug($"Sending control (byte = {controlByte}, message = {message})");
            }
            else
            {
                Log.Debug($"Sending control (byte = {controlByte})");
            }

            var bytesToSend = (message == null) ?
                              DelimitationProvider.Delimit((byte)ControlBytes.Escape, (byte)(controlByte)) :
                              DelimitationProvider.Delimit(message, (byte)ControlBytes.Escape, (byte)controlByte);

            SendData(bytesToSend);
        }