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

Committer:
andriym
Date:
2017-02-15
Revision:
0:035111d3d631

File content as of revision 0:035111d3d631:

#include    "mbed.h"
#include    "GpioBusIn.h"

GpioBusIn::GpioBusIn(
    CompGpioExp &gpiop, 
    GpioPinName p0,  GpioPinName p1,  GpioPinName p2,  GpioPinName p3,
    GpioPinName p4,  GpioPinName p5,  GpioPinName p6,  GpioPinName p7,
    GpioPinName p8,  GpioPinName p9,  GpioPinName p10, GpioPinName p11,
    GpioPinName p12, GpioPinName p13, GpioPinName p14, GpioPinName p15  )
:
GpioBusInOut( gpiop, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 )
{
    this->input();
}

GpioBusIn::GpioBusIn( CompGpioExp &gpiop, GpioPinName pins[ 16 ] )
    : GpioBusInOut( gpiop, pins )
{
    this->input();
}

GpioBusIn::~GpioBusIn()
{
}

GpioBusIn::operator int( void )
{
    return( read() );
}