+ /* Disable all pullups */
+ PIOA_PUDR = 0xffffffff;
+ /* Set all port pin connected to PIOA */
+ PIOA_PER = 0xffffffff;
+ /* Set PA0..3 as output */
+ PIOA_OER = 0x0000000f;
+ /* Disable multidrive on all pins */
+ PIOA_MDDR = 0x0000000f;
+
+ /* Set PA0..3 to 1 to turn off leds */
+ PIOA_SODR = 0x0000000f;
+ /* turn first led on */
+ PIOA_CODR = 0x00000001;
+
+ timer_set_event_softint(&leds_timer, (Hook)leds_toggle, 0);
+ timer_setDelay(&leds_timer, ms_to_ticks(100));
+ timer_add(&leds_timer);
+
+