Hello world program for PCAL955x component library. This demonstrates standard usage of this library.

Dependencies:   PCAL955x mbed

Refer to library page for details.

main.cpp

Committer:
nxp_ip
Date:
2015-03-19
Revision:
1:15df36975a85
Parent:
0:26310705044b

File content as of revision 1:15df36975a85:

#include "mbed.h"
#include "PCAL9555.h"

PCAL9555    gpio_exp( p28, p27, 0xE8 );    //  SDA, SCL, Slave_address(option)
GpioBusOut  mypins( gpio_exp, X0_0, X0_1, X0_2, X0_3 );
 
int main() {
    while( 1 ) {
        for( int i = 0; i < 16; i++ ) {
            mypins  = i;
            wait( 0.1 );
        }
    }
}