- ao_enable_output(LED_GREEN_PORT, LED_GREEN_PIN, 0);
- ao_enable_output(LED_RED_PORT, LED_RED_PIN, 1);
- for (;;) {
- ao_gpio_set(LED_GREEN_PORT, LED_GREEN_PIN, g);
- ao_gpio_set(LED_RED_PORT, LED_RED_PIN, r);
- g ^= 1;
- r ^= 1;
- for (x = 0.0f; x < 100000.0f; x = x + 0.1f)
- ao_arch_nop();
- }
+ ao_add_task(&red_task, red, "red");
+ ao_add_task(&green_task, green, "green");
+ ao_start_scheduler();