Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- *****************************************************************************/
- #include "config.h"
- #include "lpc2294.h"
- #include "lcd.h"
- #include "uart.h"
- #include "armVIC.h"
- #include "can.h"
- #define STATE_0 0
- #define STATE_1 1
- #define STATE_2 2
- #define STATE_3 3
- #define STATE_4 4
- #define STATE_5 5
- #define STATE_6 6
- #define STATE_7 7
- #define STATE_8 8
- #define STATE_9 9
- #define STATE_10 10
- #define STATE_MAX STATE_10
- unsigned char sendSymulPacket = _FALSE;
- unsigned char startSymulation = _FALSE;
- #ifdef uIP_IS_USED
- #define BUF ((struct uip_eth_hdr *)&uip_buf[0])
- #endif //uIP_IS_USED
- void __attribute__ ((interrupt("IRQ"))) timer0_cmp(void);
- void systemInit(void);
- void gpioInit(void);
- const char AppTitle[] = " Magistrala CAN ";
- #define UIP_ARP_TIMER 1000
- #define UIP_TX_TIMER 1
- #define HALF_SEK 50
- #define LED_TIMER 50
- #define ONE_SEC 100
- #define THREE_SEC 300
- #define TWO_SEC 200
- #define TEST_TIMER 100
- int TX_EventPending = _FALSE; // the hardware receive event
- int ARP_EventPending = _FALSE; // trigger the arp timer event
- unsigned long half_Sec = HALF_SEK;
- unsigned long two_Sec = 0;
- unsigned long three_Sec = THREE_SEC;
- unsigned long Uip_Timer = UIP_TX_TIMER;
- unsigned long ten_Secs = UIP_ARP_TIMER;
- unsigned long LedTimer = LED_TIMER;
- unsigned long one_Sec = ONE_SEC;
- unsigned long TestTimer = TEST_TIMER;
- //=====================================================================
- //
- //=====================================================================
- void systemInit(void)
- {
- // --- enable and connect the PLL (Phase Locked Loop) ---
- // a. set multiplier and divider
- SCB_PLLCFG = MSEL | (1<<PSEL1) | (0<<PSEL0);
- // b. enable PLL
- SCB_PLLCON = (1<<PLLE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement