mikrokontrollersystemer-pro.../prosjekt.X/main.c
Sebastian H. Gabrielli bf3753a012 I2C bulk fan read works
2024-04-23 15:31:32 +02:00

43 lines
790 B
C

/*
* File: main.c
* Author: Sebastian H. Gabrielli, Helle Augland Grasmo
*
* Created on March 6, 2024, 12:34 PM
*/
#include <stdbool.h>
#include "uart.h"
#include "voltage.h"
#define RTC_PERIOD (511)
#define DELAY_TIME 1000
#include "eeprom.h"
#include <avr/interrupt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define F_CPU 4E6
#include "command-handler.h"
#include "i2c.h"
#include "themistor-temp.h"
#include "uart.h"
#include <avr/io.h>
#include <stdint.h>
#include <util/delay.h>
// Fan history variables
volatile uint16_t fan1_history[512] = {1, 2, 3, 4};
volatile uint16_t fan2_history[512] = {2, 3, 4, 5};
int main() {
init_uart((uint16_t)9600);
init_i2c();
stdout = &USART_stream;
PORTB.DIRSET = PIN3_bm;
sei();
while (1) {
;
}
}