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/GpioDigital/GpioDigitalOut.cpp
- Committer:
- andriym
- Date:
- 2017-02-15
- Revision:
- 0:035111d3d631
File content as of revision 0:035111d3d631:
#include "mbed.h" #include "GpioDigitalOut.h" GpioDigitalOut::GpioDigitalOut( CompGpioExp &gpiop, GpioPinName pin_name ) : GpioDigitalInOut( gpiop, pin_name ) { write( 0 ); this->output(); } GpioDigitalOut::~GpioDigitalOut() { } GpioDigitalOut& GpioDigitalOut::operator=( int rhs ) { write( rhs ); return ( *this ); } GpioDigitalOut& GpioDigitalOut::operator=( GpioDigitalOut& rhs ) { write( rhs.read() ); return *this; }