/* $Id: pgXmplKey.html,v 1.1.1.4 2013/04/09 21:12:13 awachtler Exp $ */ /* Example use of the KEY macros */ #include "board.h" #include "ioutil.h" #include "xmpl.h" #ifdef NO_LEDS # error "No LED Interface defined" #endif #ifdef NO_KEYS # error "No KEY Interface defined" #endif int main(void) { volatile uint8_t c; c = 0x55; LED_INIT(); LED_SET_VALUE(c); KEY_INIT(); while(1) { DELAY_MS(10); if( keys_debounced() ) { c^=0xff; LED_SET_VALUE(c); } } } /* EOF */