-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
49 lines (35 loc) · 1.01 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "chip.h"
#include "ethernet.h"
#include "uart_receive.h"
/* Page used for storage */
#define PAGE_ADDR 0x01/* Page number */
/*****************************************************************************
* Private functions
****************************************************************************/
static void delay(uint32_t i);
/* Delay in miliseconds (cclk = 120MHz) */
static void delayMs(uint32_t ms) {
delay(ms * 30030);
}
int main(void) {
//***********************************************
// Inicializace
//***********************************************
Chip_IOCON_Init(LPC_IOCON);
Chip_GPIO_Init(LPC_GPIO);
enet_init();
eeprom_init();
setup_uarts();
//***********************************************
// Hlavni smycka
//***********************************************
while (1) {
eeprom_write();
ethernet_transmit();
}
return EXIT_FAILURE;
}