
#include "../mcc_generated_files/mcc.h"
#include "../app/factory/factory.h"
#include "../xf/xf.h"



void main(void)
{
    // Initialize the device
    SYSTEM_Initialize();
    
    // Enable the Global Interrupts
    INTERRUPT_GlobalInterruptEnable();
    //INTERRUPT_GlobalInterruptDisable();
    //INTERRUPT_PeripheralInterruptEnable();
    //INTERRUPT_PeripheralInterruptDisable();                

    XF_init();

    Factory_init();
    Factory_build();
    Factory_start();
    
    TMR0_SetInterruptHandler(XF_decrementAndQueueTimers);

    
    while (1) {
        XF_executeOnce();
        
    }
}