xmpl_keys.c - Using the KEY Macros

## KEY Macro Example

    /* $Id$ */
    /* 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 */