#include "Timers.h"

sbit LED = P2^6;

void main(void)
{
    // Initialise the Timers module.
    timers_init();

    // Round Robin task management, reiterative execution loop.
    while(1)
    {
        // Flash an LED output continuoulsy at 0.5Hz, 50% duty cycle.
        if (timers_is_expired_timer(0))
        {
            // Invert LED output.
            LED = ~LED;

            // Set timer 0 to expire in 1000ms.
            timers_restart_timer(0, 1000);
        }

        // Additional Round Robin task managed tasks.
    }
}