/*

This program demonstrates how to read the state of a digital input
channel.

*/

#use eziopk25.lib			//	Use PK2500 I/O Library

#define INPUT0 0			//	Assign INPUT0 to IN-00

main() {
	int I;					//	Define integral variable I

	eioBrdInit(0);			//	initialize I/O
	I = eioBrdDI(INPUT0);	//	read INPUT0 to I

	printf("IN-00 Status: %d\n",I);
								//	display status of INPUT0

	I = eioBrdDI(INPUT0);
	printf("IN-00 Status: %d\n",I);
}