-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.h
More file actions
37 lines (30 loc) · 697 Bytes
/
system.h
File metadata and controls
37 lines (30 loc) · 697 Bytes
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
#ifndef COMPONENTS_CPP_UTILS_SYSTEM_H_
#define COMPONENTS_CPP_UTILS_SYSTEM_H_
#include <stdint.h>
#include <esp_system.h>
#include <esp_chip_info.h>
#define NOPIN ((gpio_num_t)-1) //for some reason GPIO_NUM_NC won't work
#define UNUSED_VAR(a) (void)(a)
namespace libesp {
/**
* singleton
*/
class System {
public:
static const System &get();
public:
void logSystemInfo() const;
const esp_chip_info_t *getChipInfo() const ;
size_t getFreeHeapSize() const;
const char *getIDFVersion() const;
size_t getMinimumFreeHeapSize() const;
void restart() const;
public:
virtual ~System();
protected:
System();
private:
static System mSelf;
};
}
#endif /* COMPONENTS_CPP_UTILS_SYSTEM_H_ */