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.
Fork of TAIST_modbus by
modbus.h@24:0007712e84a8, 2018-03-16 (annotated)
- Committer:
- vsupacha
- Date:
- Fri Mar 16 04:34:08 2018 +0000
- Revision:
- 24:0007712e84a8
- Parent:
- 0:f306cb0263a6
- Child:
- 29:c19cea6e2ec3
Draft of complete solution
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vsupacha | 0:f306cb0263a6 | 1 | #ifndef MODBUS_H |
vsupacha | 0:f306cb0263a6 | 2 | #define MODBUS_H |
vsupacha | 0:f306cb0263a6 | 3 | |
vsupacha | 0:f306cb0263a6 | 4 | #define FUNC_CODE 3 |
vsupacha | 0:f306cb0263a6 | 5 | #define ADDR_BASE 0x0000 |
vsupacha | 0:f306cb0263a6 | 6 | #define ADDR_RANGE 2 |
vsupacha | 0:f306cb0263a6 | 7 | #define MAX_FRAME_SIZE 20 |
vsupacha | 0:f306cb0263a6 | 8 | |
vsupacha | 0:f306cb0263a6 | 9 | void modbus_init(uint8_t id); |
vsupacha | 0:f306cb0263a6 | 10 | uint16_t modbus_read(uint16_t offset); |
vsupacha | 0:f306cb0263a6 | 11 | uint16_t modbus_update(uint8_t offset, uint16_t val); |
vsupacha | 0:f306cb0263a6 | 12 | int modbus_parser(char ch, uint8_t *frame); |
vsupacha | 24:0007712e84a8 | 13 | uint8_t modbus_check(uint16_t offset, uint16_t count); |
vsupacha | 24:0007712e84a8 | 14 | void modbus_response(uint8_t reg_map); |
vsupacha | 0:f306cb0263a6 | 15 | |
vsupacha | 0:f306cb0263a6 | 16 | #endif // MODBUS_H |