Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/embedded-fan-control.
Something went wrong. Try again.
663 B · 16 lines
Rust
1234567891011121314151617/// Reads what a coil is currently set to. Coils are the single bit equivalent of the holding/// registers, which is how the bypass relay reports and takes its positionpub const READ_COILS: u8 = 0x01;
pub const READ_HOLDING_REGISTERS: u8 = 0x03;
pub const READ_INPUT_REGISTERS: u8 = 0x04;
/// Drives a single coil. The value is not a zero or a one: modbus spells the two positions/// `0xFF00` and `0x0000`, and nothing else is allowedpub const WRITE_SINGLE_COIL: u8 = 0x05;
pub const WRITE_SINGLE_REGISTER: u8 = 0x06;
/// A device reports an error by responding with the function code of the request and this bit setpub const EXCEPTION_MASK: u8 = 0x80;