forked from tuupola/pico_effects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgalactic.cpp
35 lines (27 loc) · 955 Bytes
/
galactic.cpp
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
#include "galactic_unicorn.hpp"
using namespace pimoroni;
extern GalacticUnicorn galactic_unicorn;
#ifdef __cplusplus
extern "C" {
#endif
// couldn't get these to work, see galactic.h
//const uint8_t galactic_sw_brightness_up = galactic_unicorn.SWITCH_BRIGHTNESS_UP;
//const uint8_t galactic_sw_brightness_down = galactic_unicorn.SWITCH_BRIGHTNESS_DOWN;
//const uint8_t galactic_sw_vol_up = galactic_unicorn.SWITCH_VOLUME_UP;
//const uint8_t galactic_sw_vol_down = galactic_unicorn.SWITCH_VOLUME_DOWN;
//const uint8_t galactic_sw_sleep = galactic_unicorn.SWITCH_SLEEP;
bool galactic_is_button_pressed(uint8_t button) {
return galactic_unicorn.is_pressed(button);
}
void galactic_set_brightness(float value) {
galactic_unicorn.set_brightness(value);
}
void galactic_adj_brightness(float diff) {
galactic_unicorn.adjust_brightness(diff);
}
uint16_t galactic_get_light_level() {
return galactic_unicorn.light();
}
#ifdef __cplusplus
}
#endif