Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
src/ModbusMaster/ModbusMasterApi.cpp@148:ee3cbaafe355, 2016-09-28 (annotated)
- Committer:
- davidjhoward
- Date:
- Wed Sep 28 17:57:36 2016 +0000
- Revision:
- 148:ee3cbaafe355
- Parent:
- 134:f90154ff33ec
- Child:
- 190:af7ab603c9fe
Adding digital inputs
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| davidjhoward | 83:0f76cfbb4eba | 1 | #include "ModbusMasterApi.h" |
| davidjhoward | 83:0f76cfbb4eba | 2 | #include "MTSLog.h" |
| davidjhoward | 83:0f76cfbb4eba | 3 | |
| davidjhoward | 83:0f76cfbb4eba | 4 | bool ModbusMasterReadRegister( const std::string &io_tag, ModbusValue *value ) |
| davidjhoward | 83:0f76cfbb4eba | 5 | { |
| davidjhoward | 83:0f76cfbb4eba | 6 | value->value = ModbusRegisterMap[io_tag].float_value; |
| davidjhoward | 148:ee3cbaafe355 | 7 | value->valid = ModbusRegisterMap[io_tag].valid; |
| davidjhoward | 83:0f76cfbb4eba | 8 | return true; |
| davidjhoward | 83:0f76cfbb4eba | 9 | } |
| davidjhoward | 83:0f76cfbb4eba | 10 | |
| davidjhoward | 83:0f76cfbb4eba | 11 | bool ModbusMasterWriteRegister( const std::string &io_tag, float value ) |
| davidjhoward | 83:0f76cfbb4eba | 12 | { |
| davidjhoward | 83:0f76cfbb4eba | 13 | ModbusRegisterMap[io_tag].float_value = value; |
| davidjhoward | 83:0f76cfbb4eba | 14 | return true; |
| davidjhoward | 83:0f76cfbb4eba | 15 | } |
