-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_utils.c
55 lines (47 loc) · 1.17 KB
/
user_utils.c
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
52
53
54
55
#pragma once
#include "_wait.h"
#include "eeconfig.h"
#include "os_detection.h"
#include "rgb_matrix.h"
#include "user_eeprom.h"
#include "user_init.c"
#include "user_layers.h"
void user_enter_layer(uint8_t layer, uint8_t hue, uint8_t sat, uint8_t val) {
layer_move(layer);
rgb_matrix_mode_noeeprom(RGB_MATRIX_BAND_PINWHEEL_VAL);
rgb_matrix_sethsv_noeeprom(hue, sat, val);
return;
}
void user_exit_layer(void) {
layer_clear();
rgblight_reload_from_eeprom();
return;
};
bool user_is_macos(void) {
if (user_config.is_auto_detect_os) {
return detected_host_os() == OS_MACOS;
} else {
return user_config.is_macos;
}
}
bool user_is_ios(void) {
if (user_config.is_auto_detect_os) {
return detected_host_os() == OS_IOS;
} else {
return user_config.is_ios;
}
}
bool user_is_linux(void) {
if (user_config.is_auto_detect_os) {
return detected_host_os() == OS_LINUX;
} else {
return user_config.is_linux;
}
}
bool user_is_windows(void) {
if (user_config.is_auto_detect_os) {
return detected_host_os() == OS_WINDOWS;
} else {
return user_config.is_windows;
}
}