mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
Merge branch 'contrib/github_pr_14878' into 'master'
fix(modbus): Fix the mode setup in modbus slave (GitHub PR) Closes IDFGH-14059 See merge request espressif/esp-idf!35237
This commit is contained in:
commit
b77ecce06b
@ -99,11 +99,11 @@ void app_main(void)
|
||||
|
||||
ESP_ERROR_CHECK(mbc_slave_init(MB_PORT_SERIAL_SLAVE, &mbc_slave_handler)); // Initialization of Modbus controller
|
||||
|
||||
// Setup communication parameters and start stack
|
||||
// Setup communication mode and start stack
|
||||
#if CONFIG_MB_COMM_MODE_ASCII
|
||||
comm_info.mode = MB_MODE_ASCII,
|
||||
comm_info.mode = MB_MODE_ASCII;
|
||||
#elif CONFIG_MB_COMM_MODE_RTU
|
||||
comm_info.mode = MB_MODE_RTU,
|
||||
comm_info.mode = MB_MODE_RTU;
|
||||
#endif
|
||||
comm_info.slave_addr = MB_SLAVE_ADDR;
|
||||
comm_info.port = MB_PORT_NUM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user