The PCAL9555, PCAL9554 series is a low-voltage 16-bit/8-bit General Purpose Input/Output (GPIO) expander with interrupt. This conponent library is compatible to basic operation os GPIO expanders: 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.
Dependents: PCAL9555_Hello OM13082-JoyStick OM13082_LED OM13082-test ... more
GpioDigitalOut.cpp
00001 #include "mbed.h" 00002 #include "GpioDigitalOut.h" 00003 00004 GpioDigitalOut::GpioDigitalOut( CompGpioExp &gpiop, GpioPinName pin_name ) 00005 : GpioDigitalInOut( gpiop, pin_name ) 00006 { 00007 write( 0 ); 00008 this->output(); 00009 } 00010 00011 GpioDigitalOut::~GpioDigitalOut() 00012 { 00013 } 00014 00015 GpioDigitalOut& GpioDigitalOut::operator=( int rhs ) 00016 { 00017 write( rhs ); 00018 return ( *this ); 00019 } 00020 00021 GpioDigitalOut& GpioDigitalOut::operator=( GpioDigitalOut& rhs ) 00022 { 00023 write( rhs.read() ); 00024 return *this; 00025 }
Generated on Tue Jul 12 2022 18:40:41 by 1.7.2