2021-04-03 17:21:59 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
#include "uart.h"
|
|
|
|
|
#include "eeprom.h"
|
|
|
|
|
#include "protocol.h"
|
|
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
uartPutString("INFO -- EEPROM programmer by binaryDiv\r\n");
|
2021-04-03 17:40:17 +02:00
|
|
|
|
2021-04-03 18:44:22 +02:00
|
|
|
while(1) {
|
|
|
|
|
// Run main loop endlessly
|
|
|
|
|
protocolMainLoop();
|
|
|
|
|
}
|
2021-04-03 17:21:59 +02:00
|
|
|
}
|