aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-09-24 05:28:15 -0600
committerSelene ToyKeeper2021-09-24 05:28:15 -0600
commitacf62345e94439df0212c388d5e7143a50005825 (patch)
treec38dddbdd2e852bb237ae657ff6a358689ce677b /hw
parentcopied Noctigon K1 -> MD11 to start defining a new light (diff)
downloadanduril-acf62345e94439df0212c388d5e7143a50005825.tar.gz
anduril-acf62345e94439df0212c388d5e7143a50005825.tar.bz2
anduril-acf62345e94439df0212c388d5e7143a50005825.zip
just a few adjustments to start with
Diffstat (limited to '')
-rw-r--r--hwdef-Noctigon_MD11.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/hwdef-Noctigon_MD11.h b/hwdef-Noctigon_MD11.h
index 4c0ce05..ecd9f10 100644
--- a/hwdef-Noctigon_MD11.h
+++ b/hwdef-Noctigon_MD11.h
@@ -1,15 +1,15 @@
-#ifndef HWDEF_NOCTIGON_K1_H
-#define HWDEF_NOCTIGON_K1_H
+#ifndef HWDEF_NOCTIGON_MD11_H
+#define HWDEF_NOCTIGON_MD11_H
-/* Noctigon K1 driver layout (attiny1634)
- * (originally known as Emisar D1S V2)
+/* Noctigon MD11 driver layout (attiny1634)
+ * (based on Noctigon K1)
*
* Pin / Name / Function
* 1 PA6 (none) (PWM1B) (reserved for DD drivers)
* 2 PA5 R: red aux LED (PWM0B)
* 3 PA4 G: green aux LED
* 4 PA3 B: blue aux LED
- * 5 PA2 (none) (reserved for L: button LED (on some models))
+ * 5 PA2 L: button LED
* 6 PA1 (none)
* 7 PA0 (none)
* 8 GND GND
@@ -95,6 +95,11 @@
#define AUXLED_RGB_DDR DDRA // DDRA or DDRB or DDRC
#define AUXLED_RGB_PUE PUEA // PUEA or PUEB or PUEC
+#define BUTTON_LED_PIN PA2 // pin 5
+#define BUTTON_LED_PORT PORTA // for all "PA" pins
+#define BUTTON_LED_DDR DDRA // for all "PA" pins
+#define BUTTON_LED_PUE PUEA // for all "PA" pins
+
// with so many pins, doing this all with #ifdefs gets awkward...
// ... so just hardcode it in each hwdef file instead
inline void hwdef_setup() {
@@ -106,6 +111,7 @@ inline void hwdef_setup() {
DDRA = (1 << AUXLED_R_PIN)
| (1 << AUXLED_G_PIN)
| (1 << AUXLED_B_PIN)
+ | (1 << BUTTON_LED_PIN)
;
// configure PWM
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.