#include "mcc_generated_files/mcc.h" #include "xf/xf.h" #include "app/factory/factory.h" void main(void) { SYSTEM_Initialize(); XF_init(); Factory_init(); Factory_build(); Factory_start(); //WWDT_SoftEnable(); TMR0_SetInterruptHandler(XF_decrementAndQueueTimers); ECAN_Initialize(); RXB0CONbits.RXFUL = 0; RXB1CONbits.RXFUL = 0; B0CONbits.RXFUL = 0; B1CONbits.RXFUL = 0; B2CONbits.RXFUL = 0; B3CONbits.RXFUL = 0; B4CONbits.RXFUL = 0; B5CONbits.RXFUL = 0; PIR5bits.RXBnIF = 0; INTERRUPT_GlobalInterruptEnable(); while (1) { WWDT_TimerClear(); XF_executeOnce(); } }