mikrokontrollersystemer-pro.../prosjekt.X/fan_speeeed.h
2024-04-27 17:31:00 +02:00

52 lines
954 B
C

/*
* File: fanseeeed.h
* Author: inami
*
* Created on 13. mars 2024, 13:38
*/
#ifndef FANSEEEED_H
#define FANSEEEED_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/cpufunc.h>
// INITALICE TIMER COUNTER
void init_TCA0();
// UPDATE TIMER PERIODE
void TCA0_update_period_ms ();
// TAKES INN A TIME AND A THE COUNTED FAN DIPS
// RETURNS THE RPM OF THE FAN
uint16_t RPM_calculation(uint16_t fancounter, uint16_t time);
// INITIALISING FAN PORTS
void init_fanports();
// INIT AC0 TO COMPARE PD6 AND PD7
void init_ac0();
// INIT AC1 TO COMPARE PD4 AND PD7
void init_ac1();
#ifdef __cplusplus
}
#endif
#endif /* FANSEEEED_H */