@@ -34,7 +34,7 @@ static void modbus_serial_tx_on(struct modbus_context *ctx)
34
34
struct modbus_serial_config * cfg = ctx -> cfg ;
35
35
36
36
if (cfg -> de != NULL ) {
37
- gpio_pin_set (cfg -> de -> port , cfg -> de -> pin , 1 );
37
+ gpio_pin_set_dt (cfg -> de , 1 );
38
38
}
39
39
40
40
if (IS_ENABLED (CONFIG_MODBUS_SERIAL_ASYNC_API )) {
@@ -58,7 +58,7 @@ static void modbus_serial_tx_off(struct modbus_context *ctx)
58
58
}
59
59
60
60
if (cfg -> de != NULL ) {
61
- gpio_pin_set (cfg -> de -> port , cfg -> de -> pin , 0 );
61
+ gpio_pin_set_dt (cfg -> de , 0 );
62
62
}
63
63
}
64
64
@@ -78,7 +78,7 @@ static void modbus_serial_rx_on(struct modbus_context *ctx)
78
78
struct modbus_serial_config * cfg = ctx -> cfg ;
79
79
80
80
if (cfg -> re != NULL ) {
81
- gpio_pin_set (cfg -> re -> port , cfg -> re -> pin , 1 );
81
+ gpio_pin_set_dt (cfg -> re , 1 );
82
82
}
83
83
84
84
atomic_set_bit (& ctx -> state , MODBUS_STATE_RX_ENABLED );
@@ -108,7 +108,7 @@ static void modbus_serial_rx_off(struct modbus_context *ctx)
108
108
atomic_clear_bit (& ctx -> state , MODBUS_STATE_RX_ENABLED );
109
109
110
110
if (cfg -> re != NULL ) {
111
- gpio_pin_set (cfg -> re -> port , cfg -> re -> pin , 0 );
111
+ gpio_pin_set_dt (cfg -> re , 0 );
112
112
}
113
113
}
114
114
0 commit comments