Elektronische_Last/Source/FanControl.hpp

31 lines
561 B
C++

/*
* FanControl.hpp
*
* Created on: 27.07.2023
* Author: Carst
*/
#ifndef FANCONTROL_HPP_
#define FANCONTROL_HPP_
#include <cstdint>
extern "C" void FanControl_SetDuty(uint32_t d);
namespace ElektronischeLast
{
class FanControl
{
public:
void init(void);
void run(std::uint32_t temp);
std::uint32_t get_speed(void);
private:
std::uint32_t last_compare;
std::uint32_t last_temp;
std::uint16_t get_compare_value(std::uint16_t temp);
};
}
#endif /* FANCONTROL_HPP_ */