UartDeviceDriver

UART user driver.
A UartDeviceDriver must implement all UART functions, but additionally this class provides an
open() function that will be called whenever a process obtains ownership of the UART, to match
the existing close() function.

Public methods

close

void close ()

Closes the UART.
This will be called when the UART is closed by its owner. Any resources that need to
be cleaned up should be done so here.
This method may throw IOException to indicate I/O failure, but will still be considered
closed and may attempt to be re-opened in the future.

registerUartDeviceCallback

Registers an interrupt callback on the UART.
See registerGpioCallback(Handler, GpioCallback) for information on
how callbacks work for user drivers.
A typical use-case for UART user driver interrupts is an external UART chip which uses
a GPIO line to indicate when data is ready to read. In this case, the driver code might look
something like this: