modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label)
Although it is possible to simply use the interface number, it has proven convenient to use the names for the interfaces in the samples. Migrate to DEVICE_DT_NAME(). Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
e8510f0577
commit
46a0e5347d
6 changed files with 44 additions and 30 deletions
|
@ -47,7 +47,7 @@ static struct modbus_serial_config modbus_serial_cfg[] = {
|
|||
#endif
|
||||
|
||||
#define MODBUS_DT_GET_DEV(inst) { \
|
||||
.iface_name = DT_INST_LABEL(inst), \
|
||||
.iface_name = DEVICE_DT_NAME(DT_DRV_INST(inst)),\
|
||||
.cfg = &modbus_serial_cfg[inst], \
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue