diff --git a/Common/Plugin.dll b/Common/Plugin.dll index 728e0f6..9eba74f 100644 Binary files a/Common/Plugin.dll and b/Common/Plugin.dll differ diff --git a/RTC/Plugin/RTCPlugin.cs b/RTC/Plugin/RTCPlugin.cs index 0d3fe66..4034094 100644 --- a/RTC/Plugin/RTCPlugin.cs +++ b/RTC/Plugin/RTCPlugin.cs @@ -46,7 +46,7 @@ public void Quit() { } - public byte Read(eAccess _type, int _address, out bool _isvalid) + public byte Read(eAccess _type, int _address, int _id, out bool _isvalid) { // Only handle the two Next I/O ports corresponding to the I2C SCL and Data lines if (_type == eAccess.Port_Read && _address == PORT_SCL) @@ -63,7 +63,7 @@ public byte Read(eAccess _type, int _address, out bool _isvalid) return 0; } - public bool Write(eAccess _type, int _port, byte _value) + public bool Write(eAccess _type, int _port, int _id, byte _value) { if (_type == eAccess.Port_Write && _port == PORT_SCL) { @@ -93,5 +93,14 @@ private void LogSlave(string Text) public void Tick() { } + + public bool KeyPressed(int _id) + { + return false; + } + + public void Reset() + { + } } } diff --git a/RTCSys/RTCSys_Device.cs b/RTCSys/RTCSys_Device.cs index 38a9b2e..6117724 100644 --- a/RTCSys/RTCSys_Device.cs +++ b/RTCSys/RTCSys_Device.cs @@ -36,7 +36,7 @@ public List Init(iCSpect _CSpect) return ports; } - public byte Read(eAccess _type, int _address, out bool _isvalid) + public byte Read(eAccess _type, int _address, int _id, out bool _isvalid) { if (_type == eAccess.NextReg_Read && _address == REG_00_MACHINE_ID) { @@ -115,7 +115,7 @@ public byte Read(eAccess _type, int _address, out bool _isvalid) return 0xff; } - public bool Write(eAccess _type, int _port, byte _value) + public bool Write(eAccess _type, int _port, int _id, byte _value) { if (_type == eAccess.NextReg_Write && _port == REG_00_MACHINE_ID) { @@ -160,5 +160,14 @@ public void Tick() public void Quit() { } + + public bool KeyPressed(int _id) + { + return false; + } + + public void Reset() + { + } } } diff --git a/UARTLogger/UARTLogger_Device.cs b/UARTLogger/UARTLogger_Device.cs index 27e1b93..c909dfd 100644 --- a/UARTLogger/UARTLogger_Device.cs +++ b/UARTLogger/UARTLogger_Device.cs @@ -46,7 +46,7 @@ public void Quit() } } - public bool Write(eAccess _type, int _port, byte _value) + public bool Write(eAccess _type, int _port, int _id, byte _value) { switch (_port) { @@ -66,7 +66,7 @@ public bool Write(eAccess _type, int _port, byte _value) return false; } - public byte Read(eAccess _type, int _port, out bool _isvalid) + public byte Read(eAccess _type, int _port, int _id, out bool _isvalid) { switch (_port) { @@ -97,5 +97,14 @@ public byte Read(eAccess _type, int _port, out bool _isvalid) public void Tick() { } + + public bool KeyPressed(int _id) + { + return false; + } + + public void Reset() + { + } } } diff --git a/UARTReplacement/SerialPort.cs b/UARTReplacement/SerialPort.cs index 07126d8..69a4e3b 100644 --- a/UARTReplacement/SerialPort.cs +++ b/UARTReplacement/SerialPort.cs @@ -193,6 +193,7 @@ public int Baud public void Reset(byte ResetByte) { + if (port is null) return; // bit 7 = Indicates the reset signal to the expansion bus and esp is asserted bool resetESP = (ResetByte & 128) == 128; if (resetESP) @@ -216,7 +217,7 @@ public void EnableEspGpio(byte EnableByte) public void SetEspGpio(byte GpioByte) { - if (enableEspGpio) + if (enableEspGpio || port is null) return; // bit 0 = Read / Write ESP GPIO0 (hard reset = 1) diff --git a/UARTReplacement/UARTReplacement_Device.cs b/UARTReplacement/UARTReplacement_Device.cs index 37e3d6d..6c41aa9 100644 --- a/UARTReplacement/UARTReplacement_Device.cs +++ b/UARTReplacement/UARTReplacement_Device.cs @@ -68,7 +68,7 @@ public void Quit() } } - public bool Write(eAccess _type, int _port, byte _value) + public bool Write(eAccess _type, int _port, int _id, byte _value) { switch (_port) { @@ -118,7 +118,7 @@ public bool Write(eAccess _type, int _port, byte _value) return false; } - public byte Read(eAccess _type, int _port, out bool _isvalid) + public byte Read(eAccess _type, int _port, int _id, out bool _isvalid) { switch (_port) { @@ -215,6 +215,15 @@ public void ESPWork() public void Tick() { } + + public bool KeyPressed(int _id) + { + return false; + } + + public void Reset() + { + } } } diff --git a/i2C_Sample/Class1.cs b/i2C_Sample/Class1.cs index a16ffc4..9c751a4 100644 --- a/i2C_Sample/Class1.cs +++ b/i2C_Sample/Class1.cs @@ -60,7 +60,7 @@ public void Quit() /// the port being written to /// the value to write // ********************************************************************** - public bool Write(eAccess _type, int _port, byte _value) + public bool Write(eAccess _type, int _port, int _id, byte _value) { switch (_port) { @@ -79,7 +79,7 @@ public bool Write(eAccess _type, int _port, byte _value) /// /// // ********************************************************************** - public byte Read(eAccess _type, int _port, out bool _isvalid) + public byte Read(eAccess _type, int _port, int _id, out bool _isvalid) { switch (_port) { @@ -93,5 +93,14 @@ public byte Read(eAccess _type, int _port, out bool _isvalid) public void Tick() { } + + public bool KeyPressed(int _id) + { + return false; + } + + public void Reset() + { + } } }