updated math functions

This commit is contained in:
hugogogo
2025-03-15 18:15:30 +01:00
parent 16a5bcd313
commit ec928d14b1
12 changed files with 200 additions and 66 deletions

View File

@@ -2,8 +2,7 @@
#define HEADER_H
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <util/twi.h>
#include "utils.h"
#include "bitmanip.h"
@@ -11,19 +10,32 @@
#include "timer.h"
#include "usart.h"
#include "adc.h"
#include "i2c.h"
//
// GLOBAL
//
extern volatile uint8_t adc_channel;
typedef enum {
WAITING,
MASTER,
SLAVE
} Role;
extern volatile Role role;
extern volatile uint8_t received_data;
//
// PROTOTYPES
//
// main.c
// i2c.c
void i2c_init(void);
void i2c_start(void);
void i2c_stop(void);
// uart.c
void uart_init();
void uart_tx(char c);
void uart_printstr(const char* str);
void uart_printstr_endl(const char* str);
//
// MACROS