Device::Chip::MCP23x17::Adapter - Device::Chip::Adapter over MCP23x17 chip
Device::Chip::MCP23x17::Adapter
Device::Chip::Adapter
use Device::Chip::MCP23S17; use Future::AsyncAwait; my $chip = Device::Chip::MCP23S17->new; await $chip->mount( Device::Chip::Adapter::...->new ); my $adapter = $chip->as_adapter; my $second_chip = Device::Chip::...->new; await $second_chip->mount( $adapter );
This implementation of the Device::Chip::Adapter API provides the GPIO protocol, by exposing the 16bit GPIO registers of a MCP23x17 chip as 16 named GPIO pins. It allows, for example, a second instance of some Device::Chip implementation that uses the GPIO protocol, to be attached via the MCP23x17 chip.
GPIO
Instances of this class are not created directly; they are returned by "as_adapter" in Device::Chip::MCP23x17.
To install Device::Chip::MCP23x17, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Chip::MCP23x17
CPAN shell
perl -MCPAN -e shell install Device::Chip::MCP23x17
For more information on module installation, please visit the detailed CPAN module installation guide.