16 #include "ModbusSerial.h"
21 #define MAX_REG_COUNT 100
30 void attach(uint8_t command,
struct registers (*fn)(uint8_t argc, uint8_t *argv));
Header file for 'Functions.cpp'.
A data structure to describe function arguments and return values.
Base class for a host computer to control this (LattePanda's Arduino Leonardo) device.
void attach(uint8_t command, struct registers(*fn)(uint8_t argc, uint8_t *argv))
Assign a function to a command number. Standard commands have default functions, but those can be ove...
struct registers(* callbackFunctions[100])(uint8_t argc, uint8_t *argv)
An array of references to callback functions indexed by their function code number....
ModbusSerial mb
Object representing an interactive Modbus connection over Serial.
void processInput()
Read the command and args sent and execute the corresponding callback function, store the results of ...
void begin(int baud)
Begin listening for a Modmata connection over serial/USB.