Modbus function 0x16 Mask Write Register. This function code is used to modify the contents of a specified holding register using a combination of an AND mask, an OR mask, and the register's current contents. The function can be used to set or clear individual bits in the register. The request specifies the holding register to be written, the data to be used as the AND mask, and the data to
| 535 | @ingroup register |
| 536 | */ |
| 537 | uint8_t ModbusMaster::maskWriteRegister(uint16_t u16WriteAddress, |
| 538 | uint16_t u16AndMask, uint16_t u16OrMask) |
| 539 | { |
| 540 | _u16WriteAddress = u16WriteAddress; |
| 541 | _u16TransmitBuffer[0] = u16AndMask; |
| 542 | _u16TransmitBuffer[1] = u16OrMask; |
| 543 | return ModbusMasterTransaction(ku8MBMaskWriteRegister); |
| 544 | } |
| 545 | |
| 546 | |
| 547 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected