-
Notifications
You must be signed in to change notification settings - Fork 16
/
heater.h
executable file
·51 lines (34 loc) · 897 Bytes
/
heater.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Header guard
#ifndef HEATER_H
#define HEATER_H
// Definitions
#define TEMPERATURE_TIMER TCC1
#define HEATER_OFF_TEMPERATURE 0
#define HEATER_MIN_TEMPERATURE 100
#define HEATER_MAX_TEMPERATURE 285
// Heater class
class Heater final {
// Public
public:
// Initialize
static void initialize() noexcept;
// Test connection
static bool testConnection() noexcept;
// Set temperature
static bool setTemperature(uint16_t value, bool wait = false) noexcept;
// Get temperature
static float getTemperature() noexcept;
// Reset
static void reset() noexcept;
// Is on
static bool isOn() noexcept;
// Update heater changes
static bool updateHeaterChanges(bool enableUpdatingTemperature = true) noexcept;
// Is working
static bool isWorking;
// Private
private:
// Clear temperature
static void clearTemperature() noexcept;
};
#endif