The PCAL6416A is a low-voltage 16-bit general purpose I/O (GPIO) expander with interrupt. This component library is compatible to basic operation as GPIO expanders: PCAL6416A, PCAL9555, PCA9555, PCA9535, PCA9539, PCAL9554, PCA9554 and PCA9538. On addition to this, this library is including mbed-SDK-style APIs. APIs that similar to DigitaiInOut, DigitalOut, DigitalIn, BusInOUt, BusOut and BusIn are available.
This is a copy of the PCA9555 library by Akifumi "Tedd" OKANO, which is compatible with PCAL6416A chip.
base_classes/CompGpioExp/GpioBus/GpioBusIn.cpp@0:035111d3d631, 2017-02-15 (annotated)
- Committer:
- andriym
- Date:
- Wed Feb 15 10:07:59 2017 +0000
- Revision:
- 0:035111d3d631
A change of name for the PCAL955x library to make it searchable for people needing PCAL6416A library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andriym | 0:035111d3d631 | 1 | #include "mbed.h" |
andriym | 0:035111d3d631 | 2 | #include "GpioBusIn.h" |
andriym | 0:035111d3d631 | 3 | |
andriym | 0:035111d3d631 | 4 | GpioBusIn::GpioBusIn( |
andriym | 0:035111d3d631 | 5 | CompGpioExp &gpiop, |
andriym | 0:035111d3d631 | 6 | GpioPinName p0, GpioPinName p1, GpioPinName p2, GpioPinName p3, |
andriym | 0:035111d3d631 | 7 | GpioPinName p4, GpioPinName p5, GpioPinName p6, GpioPinName p7, |
andriym | 0:035111d3d631 | 8 | GpioPinName p8, GpioPinName p9, GpioPinName p10, GpioPinName p11, |
andriym | 0:035111d3d631 | 9 | GpioPinName p12, GpioPinName p13, GpioPinName p14, GpioPinName p15 ) |
andriym | 0:035111d3d631 | 10 | : |
andriym | 0:035111d3d631 | 11 | GpioBusInOut( gpiop, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ) |
andriym | 0:035111d3d631 | 12 | { |
andriym | 0:035111d3d631 | 13 | this->input(); |
andriym | 0:035111d3d631 | 14 | } |
andriym | 0:035111d3d631 | 15 | |
andriym | 0:035111d3d631 | 16 | GpioBusIn::GpioBusIn( CompGpioExp &gpiop, GpioPinName pins[ 16 ] ) |
andriym | 0:035111d3d631 | 17 | : GpioBusInOut( gpiop, pins ) |
andriym | 0:035111d3d631 | 18 | { |
andriym | 0:035111d3d631 | 19 | this->input(); |
andriym | 0:035111d3d631 | 20 | } |
andriym | 0:035111d3d631 | 21 | |
andriym | 0:035111d3d631 | 22 | GpioBusIn::~GpioBusIn() |
andriym | 0:035111d3d631 | 23 | { |
andriym | 0:035111d3d631 | 24 | } |
andriym | 0:035111d3d631 | 25 | |
andriym | 0:035111d3d631 | 26 | GpioBusIn::operator int( void ) |
andriym | 0:035111d3d631 | 27 | { |
andriym | 0:035111d3d631 | 28 | return( read() ); |
andriym | 0:035111d3d631 | 29 | } |