I'm trying to use `mbc_master_send_request` to read more than one holding register at a time. The function returns without error and the signals look good on a scope, but only the first register is correctly being populated. The code that reads the registers something like this:
Code: Select all
#define MAX_NUM_HOLD_REG 5
static uint16_t regs[MAX_NUM_HOLD_REG];
esp_err_t read_hold_reg(void) {
mb_param_request_t req = {
.slave_addr = 1u,
.command = 0x3u,
.reg_start = 0,
.reg_size = 5,
};
return mbc_master_send_request(&req, data);
}
Thanks,
Andy