Some stuff workes better

This commit is contained in:
Inamr 2024-03-08 14:00:01 +01:00
parent 6b0608e04b
commit 3c08e59843

View File

@ -5,18 +5,6 @@
* Created on March 6, 2024, 12:34 PM * Created on March 6, 2024, 12:34 PM
*/ */
#include "header.h" #include "header.h"
#define F_CPU 4000000UL
#define RTC_PERIOD (511)
#define DELAY_TIME 1000
#define USART3_BAUD_RATE(BAUD_RATE) ((float) (64*F_CPU /(16*(float)BAUD_RATE) )+0.5)
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
uint16_t adcVal; uint16_t adcVal;
uint16_t internalVal; uint16_t internalVal;
@ -52,7 +40,7 @@ uint16_t ADC0_read(void)
return ADC0.RES; return ADC0.RES;
} }
bool ADC0_conversionDone(void) bool ADC0_conversationDone(void)
{ {
return (ADC0.INTFLAGS & ADC_RESRDY_bm); return (ADC0.INTFLAGS & ADC_RESRDY_bm);
} }