2024-03-06 11:34:22 +00:00
|
|
|
/*
|
|
|
|
|
* File: main.c
|
|
|
|
|
* Author: Sebastian H. Gabrielli
|
|
|
|
|
*
|
|
|
|
|
* Created on March 6, 2024, 12:34 PM
|
|
|
|
|
*/
|
|
|
|
|
|
2024-03-06 14:36:24 +00:00
|
|
|
#define F_CPU 4E6
|
|
|
|
|
|
2024-03-06 11:34:22 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
2024-03-06 14:36:24 +00:00
|
|
|
#include "uart.h"
|
2024-03-20 12:00:40 +00:00
|
|
|
#include "i2c.h"
|
2024-04-16 13:30:38 +00:00
|
|
|
#include "command-handler.h"
|
2024-03-06 14:36:24 +00:00
|
|
|
#include <util/delay.h>
|
2024-04-16 13:30:38 +00:00
|
|
|
#include <avr/io.h>
|
2024-03-06 11:34:22 +00:00
|
|
|
|
2024-03-20 12:00:40 +00:00
|
|
|
int main() {
|
2024-03-06 14:36:24 +00:00
|
|
|
init_uart((uint16_t)9600);
|
2024-03-20 12:00:40 +00:00
|
|
|
init_i2c();
|
2024-03-06 14:36:24 +00:00
|
|
|
stdout = &USART_stream;
|
2024-03-20 12:00:40 +00:00
|
|
|
|
2024-04-16 13:30:38 +00:00
|
|
|
PORTB.DIRSET = PIN3_bm;
|
|
|
|
|
|
2024-03-20 12:00:40 +00:00
|
|
|
sei();
|
2024-03-06 11:34:22 +00:00
|
|
|
|
2024-03-06 14:36:24 +00:00
|
|
|
while (1) {
|
2024-04-16 13:30:38 +00:00
|
|
|
;
|
2024-03-06 14:36:24 +00:00
|
|
|
}
|
|
|
|
|
}
|