mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'bugfix/modbus_fix_slave_id_support_v40' into 'release/v4.0'
Bugfix/modbus fix slave id support v40 See merge request espressif/esp-idf!12096
This commit is contained in:
@@ -95,10 +95,6 @@ static esp_err_t mbc_serial_slave_start(void)
|
|||||||
(eMBParity)mbs_opts->mbs_comm.parity);
|
(eMBParity)mbs_opts->mbs_comm.parity);
|
||||||
MB_SLAVE_CHECK((status == MB_ENOERR), ESP_ERR_INVALID_STATE,
|
MB_SLAVE_CHECK((status == MB_ENOERR), ESP_ERR_INVALID_STATE,
|
||||||
"mb stack initialization failure, eMBInit() returns (0x%x).", status);
|
"mb stack initialization failure, eMBInit() returns (0x%x).", status);
|
||||||
#ifdef CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT
|
|
||||||
status = eMBSetSlaveID(MB_SLAVE_ID_SHORT, TRUE, (UCHAR*)mb_slave_id, sizeof(mb_slave_id));
|
|
||||||
MB_SLAVE_CHECK((status == MB_ENOERR), ESP_ERR_INVALID_STATE, "mb stack set slave ID failure.");
|
|
||||||
#endif
|
|
||||||
status = eMBEnable();
|
status = eMBEnable();
|
||||||
MB_SLAVE_CHECK((status == MB_ENOERR), ESP_ERR_INVALID_STATE,
|
MB_SLAVE_CHECK((status == MB_ENOERR), ESP_ERR_INVALID_STATE,
|
||||||
"mb stack set slave ID failure, eMBEnable() returned (0x%x).", (uint32_t)status);
|
"mb stack set slave ID failure, eMBEnable() returned (0x%x).", (uint32_t)status);
|
||||||
|
Reference in New Issue
Block a user