wiki:Example1

Examples

Example 1

Initialize all devices and blink with LEDs.

example1/main.c:

#include <all.h>

int
main(void) 
{
        /* initialize devices */
        init_all();

        while(1) {
                /* turn left led on */
                led_set(LEFT);
                /* sleep for one second */
                delay_ms(1000);
                /* turn right led on */
                led_set(RIGHT);
                /* sleep for one second */
                delay_ms(1000);
        }

        return 0;
}

Last modified 6 years ago Last modified on Nov 23, 2011, 11:26:00 AM