#define MAX_MSG_LEN 16 // may be increased if necessary to max 251 #define DEBUG 1 static const hm2_modbus_chan_descriptor_t channels[] = { /* {TYPE, FUNC, ADDR, COUNT, pin_name} */ {HAL_U32, 3, 0x3003, 1, "voltage"}, {HAL_U32, 3, 0x3004, 1, "current"}, {HAL_FLOAT, 3, 0x3005, 1, "speed-rpm"}, {HAL_U32, 3, 0x5000, 1, "faultcode"}, {HAL_U32, 6, 0x2000, 1, "speed-cmd"}, {HAL_U32, 6, 0x1000, 1, "motor-cmd"} };