mirror of
https://gitea.ecohim.ru:3000/RS485_Relay/RS485_Relay2_fw.git
synced 2025-08-05 23:56:37 +03:00
v11.1 Reg 0x2011
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#ifndef BOARD_LOGIC_H_
|
||||
#define BOARD_LOGIC_H_
|
||||
|
||||
#define MODBUS_FIRMWARE_VERSION ( /*major*/ 11 + /*minor*/ 0 * 0x100)
|
||||
#define MODBUS_FIRMWARE_VERSION ( /*major*/ 11 + /*minor*/ 1 * 0x100)
|
||||
#define MODBUS_BOARD_TYPE (8) //Relay Module board ID
|
||||
|
||||
#define REL_MAIN_BIT (1u<<0)
|
||||
|
@@ -189,6 +189,10 @@ uint8_t read_register(uint16_t address, uint16_t* value)
|
||||
{
|
||||
*value = status;
|
||||
status &= 0b011; // Reset light button press event status
|
||||
}
|
||||
else if (address == 0x2011) //Read E-STOP status
|
||||
{
|
||||
*value = (status & 0b010)>>1; // Read E-stop status bit and shift it to bit 0 position
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user