v11.1 Reg 0x2011

This commit is contained in:
Anton Mukhin
2024-06-19 10:05:47 +03:00
parent 4239d310ed
commit b7782c1e8f
2 changed files with 5 additions and 1 deletions

View File

@@ -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)

View File

@@ -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;