The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Device::Chip::Adapter::UART - a Device::Chip::Adapter implementation for serial devices


This class implements the Device::Chip::Adapter interface around a regular serial port, such as a USB UART adapter, allowing an instance of a Device::Chip driver to communicate with actual chip hardware using this adapter.

This adapter provides both the GPIO and UART protocols. The GPIO protocol wraps the modem control and handshaking lines. The UART protocol adds access to the transmit and receive lines by adding the "write" and "read" methods.

As the Device::Chip interface is intended for hardware IO interfaces, it does not support the concept that a serial stream might spontaneously become disconnected. As such, an end-of-file condition on the stream filehandle will be reported as a future failure.



   $adapter = Device::Chip::Adapter::UART->new( %args )

Returns a new instance of a Device::Chip::Adapter::UART.

Takes the following named arguments:

dev => STRING

Path to the device node representing the UART; usually something like /dev/ttyUSB0 or /dev/ttyACM0.


The following Device::Chip::Adapter protocol types are supported

  • GPIO


Paul Evans <>