This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
SummerSchool2-Controller/306-controller_interface.X/main.c

39 lines
709 B
C
Raw Normal View History

2023-08-24 15:26:42 +00:00
#include "mcc_generated_files/mcc.h"
#include "xf/xf.h"
#include "app/factory/factory.h"
2023-08-22 07:22:00 +00:00
void main(void)
{
2023-09-05 15:43:41 +00:00
2023-08-22 07:22:00 +00:00
SYSTEM_Initialize();
XF_init();
Factory_init();
Factory_build();
Factory_start();
2023-09-05 09:06:23 +00:00
//WWDT_SoftEnable();
2023-09-05 15:43:41 +00:00
2023-08-22 07:22:00 +00:00
TMR0_SetInterruptHandler(XF_decrementAndQueueTimers);
2023-09-05 15:43:41 +00:00
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;
2023-08-29 13:18:04 +00:00
INTERRUPT_GlobalInterruptEnable();
2023-08-22 07:22:00 +00:00
while (1)
{
2023-09-05 15:43:41 +00:00
2023-09-05 09:06:23 +00:00
WWDT_TimerClear();
2023-08-22 07:22:00 +00:00
XF_executeOnce();
2023-09-05 15:43:41 +00:00
2023-08-22 07:22:00 +00:00
}
}