Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication. The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication. The following sections will outline the use of the user-space interface and provide basic examples.
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port. This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.
Loading the driver
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.
Configuring the serial port
Performing serial transactions
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.
cross-link output output output blah blah blah