#define MAX_MSG_LEN 16 // may be increased if necessary to max 251 static const hm2_modbus_chan_descriptor_t channels = { /* {TYPE, FUNC, ADDR, COUNT, pin_name} */ {HAL_U32, 3, 0x0611, 1, "error_code"}, {HAL_U32, 3, 0x2101, 1, "status"}, {HAL_FLOAT, 3, 0x2104, 1, "output-current"}, {HAL_FLOAT, 3, 0x2105, 1, "bus-voltage"}, {HAL_FLOAT, 3, 0x210C, 1, "motor-speed"}, {HAL_FLOAT, 6, 0x2001, 1, "frequency-command"}, {HAL_U32, 6, 0x2000, 1, "operation"}, };