Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_TemperatureGuard.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <cstdint>
11
12#include "cfg/cs_Boards.h"
13#include "common/cs_Types.h"
14#include "drivers/cs_COMP.h"
16#include "drivers/cs_Timer.h"
19#include "storage/cs_State.h"
20
21#define TEMPERATURE_UPDATE_FREQUENCY 10
22
26public:
29 static TemperatureGuard instance;
30 return instance;
31 }
32
33 void init(const boards_config_t& boardConfig);
34
35 void tick();
36
38
39 void start();
40
41 void stop();
42
43 static void staticTick(TemperatureGuard* ptr) { ptr->tick(); }
44
46
47private:
51
56
57 app_timer_t _appTimerData;
58 app_timer_id_t _appTimerId;
64};
Class that enables you to get events when a the voltage on an AIN pin goes over or below a given thre...
Definition: cs_COMP.h:40
Check if the temperature exceeds a certain threshold.
Definition: cs_TemperatureGuard.h:25
COMP * _comp
Definition: cs_TemperatureGuard.h:60
bool _dimmerTempInverted
Definition: cs_TemperatureGuard.h:63
void handleCompEvent(CompEvent_t event)
void init(const boards_config_t &boardConfig)
TemperatureGuard()
Constructor.
void operator=(TemperatureGuard const &)
This class is singleton, deny implementation.
app_timer_t _appTimerData
Definition: cs_TemperatureGuard.h:57
TemperatureGuard(TemperatureGuard const &)
This class is singleton, deny implementation.
app_timer_id_t _appTimerId
Definition: cs_TemperatureGuard.h:58
CS_TYPE _lastChipTempEvent
Definition: cs_TemperatureGuard.h:61
TYPIFY(CONFIG_MAX_CHIP_TEMP) _maxChipTemp
void scheduleNextTick()
static TemperatureGuard & getInstance()
Gets a static singleton (no dynamic memory allocation)
Definition: cs_TemperatureGuard.h:28
CS_TYPE _lastPwmTempEvent
Definition: cs_TemperatureGuard.h:62
static void staticTick(TemperatureGuard *ptr)
Definition: cs_TemperatureGuard.h:43
CompEvent_t
Compare events, also used for configuration.
Definition: cs_COMP.h:18
CS_TYPE
Types:
Definition: cs_Types.h:79
@ CONFIG_MAX_CHIP_TEMP
Board configuration.
Definition: cs_Boards.h:169