-
Notifications
You must be signed in to change notification settings - Fork 8.4k
samples: rtu_server: add support for CDC ACM UART #47514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
samples: rtu_server: add support for CDC ACM UART #47514
Conversation
We cannot implement configure API because there is no notification of configuration changes provided for the Abstract Control Model and the UART controller is only emulated. However, it allows us to use CDC ACM UART together with subsystems like Modbus which require configure API for real controllers. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Node is not a bus controller, use DT_INST_PARENT instead of DT_INST_BUS. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
aurel32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that overlay-cdc-acm.conf issue, that looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that needed? The shell is not activated in this sample, causing a warning:
warning: SHELL_BACKEND_SERIAL_CHECK_DTR (defined at subsys/shell/backends/Kconfig.backends:75) was
assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies:
SHELL_BACKEND_SERIAL (=n), SHELL_BACKENDS (=n), SHELL (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR and/or look
up SHELL_BACKEND_SERIAL_CHECK_DTR in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint. It is copy&paste error (config overlay from samples/subsys/shell/shell_module).
1a0624f to
37a2f00
Compare
Allow to use RTU server sample on any board that has supported USB device controller. Although it is only a point to point connection and does not represent a bus, it can, apart from testing the server implementation, also be used practically for example to control relays or to read ADC values via USB connection without implementing custom USB class or driver. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
37a2f00 to
34cd8cd
Compare
aurel32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, LGTM
Allow to use RTU server sample on any board that has supported
USB device controller. Although it is only a point to point
connection and does not represent a bus, it can, apart from
testing the server implementation, also be used practically
for example to control relays or to read ADC values via
USB connection without implementing custom USB class or driver.
Resolves: #45938