aboutsummaryrefslogtreecommitdiff
path: root/hw/hank/emisar-d1v2
diff options
context:
space:
mode:
Diffstat (limited to 'hw/hank/emisar-d1v2')
-rw-r--r--hw/hank/emisar-d1v2/7135-fet/anduril.h32
-rw-r--r--hw/hank/emisar-d1v2/linear-fet/anduril.h30
-rw-r--r--hw/hank/emisar-d1v2/nofet/anduril.h24
3 files changed, 86 insertions, 0 deletions
diff --git a/hw/hank/emisar-d1v2/7135-fet/anduril.h b/hw/hank/emisar-d1v2/7135-fet/anduril.h
new file mode 100644
index 0000000..200f93f
--- /dev/null
+++ b/hw/hank/emisar-d1v2/7135-fet/anduril.h
@@ -0,0 +1,32 @@
+// Emisar D1v2 (7135+FET) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+// ATTINY: 1634
+// same as Emisar D4v2, mostly
+// (was only made for a short time, not many people have one)
+#include "hank/emisar-d4v2/anduril.h"
+#undef MODEL_NUMBER
+#define MODEL_NUMBER "0123"
+
+// some models use a simple button LED, others use RGB...
+// ... so include support for both
+#define USE_BUTTON_LED
+// the aux LEDs are in the button, so use them while main LEDs are on
+// (early short run had no button LEDs at all, later run uses linear+FET instead,
+// so it's unlikely that anyone needs this, but it doesn't hurt anything)
+#define USE_AUX_RGB_LEDS
+#define USE_AUX_RGB_LEDS_WHILE_ON 25
+#define USE_INDICATOR_LED_WHILE_RAMPING
+
+// safe limit ~50% power
+#undef SIMPLE_UI_CEIL
+#define SIMPLE_UI_CEIL 120
+
+// stop panicking at ~75% power or ~1000 lm (D1 has a decent power-to-thermal-mass ratio)
+#ifdef THERM_FASTER_LEVEL
+#undef THERM_FASTER_LEVEL
+#endif
+#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10) // throttle back faster when high
+
diff --git a/hw/hank/emisar-d1v2/linear-fet/anduril.h b/hw/hank/emisar-d1v2/linear-fet/anduril.h
new file mode 100644
index 0000000..7131759
--- /dev/null
+++ b/hw/hank/emisar-d1v2/linear-fet/anduril.h
@@ -0,0 +1,30 @@
+// Emisar D1v2 (linear+FET) config options for Anduril
+// (2022 re-issue / update of old D1)
+// Copyright (C) 2022-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+// ATTINY: 1634
+// similar to a Noctigon KR4, sort of
+#include "hank/noctigon-kr4/anduril.h"
+#undef MODEL_NUMBER
+#define MODEL_NUMBER "0124"
+
+// some models use a simple button LED, others use RGB...
+// ... so include support for both
+#define USE_BUTTON_LED
+// the aux LEDs are in the button, so use them while main LEDs are on
+#define USE_AUX_RGB_LEDS
+#define USE_AUX_RGB_LEDS_WHILE_ON 25
+#define USE_INDICATOR_LED_WHILE_RAMPING
+
+// safe limit: max regulated power
+#undef SIMPLE_UI_CEIL
+#define SIMPLE_UI_CEIL MAX_1x7135
+
+// stop panicking at ~75% power or ~1000 lm (D1 has a decent power-to-thermal-mass ratio)
+#ifdef THERM_FASTER_LEVEL
+#undef THERM_FASTER_LEVEL
+#endif
+#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10) // throttle back faster when high
+
diff --git a/hw/hank/emisar-d1v2/nofet/anduril.h b/hw/hank/emisar-d1v2/nofet/anduril.h
new file mode 100644
index 0000000..eae6215
--- /dev/null
+++ b/hw/hank/emisar-d1v2/nofet/anduril.h
@@ -0,0 +1,24 @@
+// Emisar D1v2 (linear only, no DDFET) config options for Anduril
+// (2022 re-issue / update of old D1)
+// Copyright (C) 2022-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+// ATTINY: 1634
+// similar to a Noctigon KR4, sort of
+#include "hank/noctigon-kr4/nofet/anduril.h"
+#undef MODEL_NUMBER
+#define MODEL_NUMBER "0125"
+
+// some models use a simple button LED, others use RGB...
+// ... so include support for both
+#define USE_BUTTON_LED
+// the aux LEDs are in the button, so use them while main LEDs are on
+#define USE_AUX_RGB_LEDS
+#define USE_AUX_RGB_LEDS_WHILE_ON 25
+#define USE_INDICATOR_LED_WHILE_RAMPING
+
+// safe limit: same as regular ramp
+#undef SIMPLE_UI_CEIL
+#define SIMPLE_UI_CEIL RAMP_SMOOTH_CEIL
+