aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/chan-rgbaux.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-04-28 03:06:22 -0600
committerSelene ToyKeeper2023-04-28 03:06:22 -0600
commitbecb1525aadc1039a99ecdc6f7ae5cf3a1beb2fb (patch)
treec016f1674e11d4c1f5d6e665b550307375079d51 /spaghetti-monster/chan-rgbaux.c
parentRGB aux: always preview in high mode, and show voltage during 3-second post-o... (diff)
downloadanduril-becb1525aadc1039a99ecdc6f7ae5cf3a1beb2fb.tar.gz
anduril-becb1525aadc1039a99ecdc6f7ae5cf3a1beb2fb.tar.bz2
anduril-becb1525aadc1039a99ecdc6f7ae5cf3a1beb2fb.zip
D4v2 FET+1 model: works again, and now uses dynamic PWM (lower lows)
(also added generic channel modes for RGB aux LEDs)
Diffstat (limited to 'spaghetti-monster/chan-rgbaux.c')
-rw-r--r--spaghetti-monster/chan-rgbaux.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/spaghetti-monster/chan-rgbaux.c b/spaghetti-monster/chan-rgbaux.c
new file mode 100644
index 0000000..355f246
--- /dev/null
+++ b/spaghetti-monster/chan-rgbaux.c
@@ -0,0 +1,19 @@
+// channel modes for RGB aux LEDs
+// Copyright (C) 2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+void set_level_auxred(uint8_t level) {
+ rgb_led_set(!(!(level)) << 1); // red, high (or off)
+}
+
+void set_level_auxgrn(uint8_t level) {
+ rgb_led_set(!(!(level)) << 3); // green, high (or off)
+}
+
+void set_level_auxblu(uint8_t level) {
+ rgb_led_set(!(!(level)) << 5); // blue, high (or off)
+}
+
+bool gradual_tick_null(uint8_t gt) { return true; } // do nothing
+