/*

in.c:

This program demonstrates how to read the protected digital input from
the PK25xx. It reads all 16 possible channels. You may need to configure
the jumpers properly to read channels 8 to 15.

*/
#use eziopk25.lib

main() {
	auto int i;

	eioBrdInit(0);			//	initialize the board
	while (1) {
		for (i = 0; i < 16; ++i) {		//	for each input channel
			printf("IN%02d reads %d\n",i,eioBrdDI(i));
				//	print the state
			hitwd();							//	remember to hit the watchdog
		}
	}
}