Create UART-based AT commands library

This commit is contained in:
2020-11-18 22:39:59 +01:00
parent c2d77d5758
commit 0f2dca5ec7
8 changed files with 262 additions and 8 deletions

View File

@@ -7,9 +7,14 @@
#include "i2c.h"
#include "rtc.h"
#include "led.h"
#include "at.h"
#include "uart.h"
#define I2C_BITRATE 100000UL // 100kHz
char buffer[20];
int main()
{
cfg_init();
@@ -18,12 +23,15 @@ int main()
i2c_init(I2C_BITRATE);
rtc_int0_init();
led_init();
uart_init();
uart_bind_handler(at_handler);
sei();
while(1)
{
keyboard_handle_input();
uart_handle_event(buffer);
}
}