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
- Committer:
 - KRiTiRK
 - Date:
 - 2018-03-21
 - Revision:
 - 7:cba97341e790
 - Parent:
 - 2:6d1f053a6033
 
File content as of revision 7:cba97341e790:
#ifndef MODBUS_H
#define MODBUS_H
#define FUNC_CODE       3
#define ADDR_BASE       0x0000
#define ADDR_RANGE      2
#define MAX_FRAME_SIZE  20
void modbus_init(uint8_t id);
uint16_t modbus_read(uint16_t offset);
uint16_t modbus_update(uint8_t offset, uint16_t val);
int modbus_parser(char ch, uint8_t *frame);
uint8_t modbus_check(uint16_t offset, uint16_t count);
void modbus_response(uint8_t reg_map, char *tmpPrint);
#endif // MODBUS_H
            
    