IPC@CHIP - PIN API
controlling the all 8 I/O pins of the DK40
set and unset functions for each pin
reading the status (set or unset) of each pin if there’s an input signal
typical example:
setPin(2, 1); /*set pin 2*/
setPin(1, 0); /*unset pin 1*/
for (i = 0; i < 8; i++) { /*reading all pins*/
if (getPinStatus(i)) {
printf("Pin %d is set\n", i);
} else {
printf("Pin %d is not set\n", i);
}
}
http://www.teco.edu/