Modbus function 0x06 Write Single Register. This function code is used to write a single holding register in a remote device. The request specifies the address of the register to be written. Registers are addressed starting at zero. @param u16WriteAddress address of the holding register (0x0000..0xFFFF) @param u16WriteValue value to be written to holding register (0x0000..0xFFFF) @return 0 on
| 443 | @ingroup register |
| 444 | */ |
| 445 | uint8_t ModbusMaster::writeSingleRegister(uint16_t u16WriteAddress, |
| 446 | uint16_t u16WriteValue) |
| 447 | { |
| 448 | _u16WriteAddress = u16WriteAddress; |
| 449 | _u16WriteQty = 0; |
| 450 | _u16TransmitBuffer[0] = u16WriteValue; |
| 451 | return ModbusMasterTransaction(ku8MBWriteSingleRegister); |
| 452 | } |
| 453 | |
| 454 | |
| 455 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected