Ryan Voots
and 1 contributors

NAME

Device::Chip::Adapter::LinuxKernel - A Device::Chip::Adapter implementation

DESCRIPTION

This class implements the Device::Chip::Adapter interface for the LinuxKernel, allowing an instance of Device::Chip driver to communicate with the actual chip hardware by using the Linux Kernel interfaces for GPIO, I2C (SMbus), and SPI. Suitble for use on any Linux system including Raspberry PI (RPI), Beaglebone, Banana PI or any other single board computer that exposes IO via the standard Linux Kernel interfaces.

CONSTRUCTOR

new

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

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

KNOWN ISSUES

I2C reading likely doesn't work properly
GPIO performance is probably horrendous. We re-open the /value file in sysfs over and over for every action. This could be better by storing the filehandles

PLANS AHEAD

I'm going to release a companion module to this for Raspberry PI devices. It'll automatically detect which set of hardware you're on and select the appropriate busses for you. I'll also be working to add "interrupt" support for the GPIO so that you can use poll(2) or select(2) to get a trigger on edge detection on some GPIO devices.

AUTHOR

Ryan Voots <ryan@voots.org>