2008-12-03 05:40:16 +00:00
|
|
|
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2008-12-04 03:34:55 +00:00
|
|
|
#include "config.h"
|
2008-12-03 05:40:16 +00:00
|
|
|
#include "borg_hw/borg_hw.h"
|
2009-02-18 22:26:46 +00:00
|
|
|
// #include "can/borg_can.h"
|
2008-12-03 05:40:16 +00:00
|
|
|
#include "random/prng.h"
|
|
|
|
#include "random/persistentCounter.h"
|
2008-12-04 03:34:55 +00:00
|
|
|
#include "display_loop.h"
|
2009-01-02 02:18:20 +00:00
|
|
|
#include "pixel.h"
|
|
|
|
|
|
|
|
#ifdef JOYSTICK_SUPPORT
|
|
|
|
#include "joystick/joystick.h"
|
|
|
|
#endif
|
2008-12-03 05:40:16 +00:00
|
|
|
|
2010-01-22 01:43:22 +00:00
|
|
|
#ifdef CAN_SUPPORT
|
|
|
|
#include "can/borg_can.h"
|
|
|
|
#endif
|
|
|
|
|
2012-03-01 23:20:05 +00:00
|
|
|
#ifdef RFM12_SUPPORT
|
|
|
|
#include "rfm12/borg_rfm12.h"
|
|
|
|
#endif
|
|
|
|
|
2008-12-03 05:40:16 +00:00
|
|
|
int main (void){
|
|
|
|
clear_screen(0);
|
|
|
|
|
|
|
|
#ifdef RANDOM_SUPPORT
|
|
|
|
srandom32(percnt_get());
|
|
|
|
percnt_inc();
|
|
|
|
#endif
|
|
|
|
|
2012-03-02 00:01:47 +00:00
|
|
|
#ifdef RFM12_SUPPORT
|
|
|
|
borg_rfm12_init();
|
|
|
|
#endif
|
|
|
|
|
2009-02-19 00:46:02 +00:00
|
|
|
borg_hw_init();
|
|
|
|
|
2008-12-03 05:40:16 +00:00
|
|
|
#ifdef CAN_SUPPORT
|
|
|
|
bcan_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef JOYSTICK_SUPPORT
|
|
|
|
joy_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef UART_SUPPORT
|
|
|
|
uart_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
sei();
|
|
|
|
|
2008-12-04 03:34:55 +00:00
|
|
|
display_loop();
|
2008-12-03 05:40:16 +00:00
|
|
|
|
2010-08-22 03:09:54 +00:00
|
|
|
return 0;
|
2008-12-03 05:40:16 +00:00
|
|
|
}
|