2021-04-03 17:21:59 +02:00
|
|
|
#include "config.h"
|
2021-04-04 17:18:45 +02:00
|
|
|
#include "common.h"
|
2021-04-03 17:21:59 +02:00
|
|
|
#include "uart.h"
|
|
|
|
|
#include "eeprom.h"
|
2021-04-04 02:50:25 +02:00
|
|
|
#include "parsing.h"
|
2021-04-03 17:21:59 +02:00
|
|
|
|
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
|
|
|
|
|
int main(void) {
|
2021-04-03 18:44:22 +02:00
|
|
|
// Init components (UART, EEPROM, ...)
|
|
|
|
|
uartInit();
|
|
|
|
|
eepromInit();
|
2021-04-03 17:21:59 +02:00
|
|
|
|
2021-04-03 18:44:22 +02:00
|
|
|
// Initial pause (EEPROM needs 5ms startup time)
|
|
|
|
|
_delay_ms(100);
|
2021-04-03 17:21:59 +02:00
|
|
|
|
2021-04-03 18:44:22 +02:00
|
|
|
// Write initial message via UART
|
2021-04-16 20:31:25 +02:00
|
|
|
uartPutLine("INFO -- EEPROM programmer by binaryDiv");
|
2021-04-03 17:40:17 +02:00
|
|
|
|
2021-04-03 18:44:22 +02:00
|
|
|
while(1) {
|
|
|
|
|
// Run main loop endlessly
|
2021-04-04 02:50:25 +02:00
|
|
|
parseNextCommand();
|
2021-04-03 18:44:22 +02:00
|
|
|
}
|
2021-04-03 17:21:59 +02:00
|
|
|
}
|