-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.h
48 lines (36 loc) · 1.55 KB
/
settings.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
#ifndef _SETTINGS_H_
#define _SETTINGS_H_
// ========================================
// INCLUDES
// ========================================
#include "system.h"
// ========================================
// MACROS
// ========================================
// ========================================
// TYPES
// ========================================
struct PocuterSettings {
uint32_t systemColor;
int brightness;
};
// ========================================
// PROTOTYPES
// ========================================
extern void loadSettings();
extern char* getSetting(const char *section, const char *name, const char *defaultValue, char *dest, size_t maxLength);
extern int getSetting(const char *section, const char *name, int defaultValue);
extern uint32_t getSetting(const char *section, const char *name, uint32_t defaultValue);
extern double getSetting(const char *section, const char *name, double defaultValue);
extern bool setSetting(const char *section, const char *name, char *value);
extern bool setSetting(const char *section, const char *name, int value);
extern bool setSetting(const char *section, const char *name, uint32_t value);
extern bool setSetting(const char *section, const char *name, double value);
// ========================================
// GLOBALS
// ========================================
extern PocuterSettings pocuterSettings;
// ========================================
// FUNCTIONS
// ========================================
#endif //_SETTINGS_H_