aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-11-25 18:46:03 -0700
committerSelene ToyKeeper2019-11-25 18:46:03 -0700
commit2cf2c42678a5cd92bbfa3096101ceaea984df1dd (patch)
tree32931a8fd5f65b5ba93a972c43d35f160372b8ce /hw
parentincreased Noctigon K1's default temperature limit to 55 C (diff)
parentenabled muggle mode again in all build targets, since it fits now (diff)
downloadanduril-2cf2c42678a5cd92bbfa3096101ceaea984df1dd.tar.gz
anduril-2cf2c42678a5cd92bbfa3096101ceaea984df1dd.tar.bz2
anduril-2cf2c42678a5cd92bbfa3096101ceaea984df1dd.zip
merged upstream fsm branch
Diffstat (limited to '')
-rw-r--r--hwdef-Emisar_D4v2.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/hwdef-Emisar_D4v2.h b/hwdef-Emisar_D4v2.h
index 0460fad..addf429 100644
--- a/hwdef-Emisar_D4v2.h
+++ b/hwdef-Emisar_D4v2.h
@@ -9,7 +9,7 @@
* 3 PA4 green aux LED
* 4 PA3 blue aux LED
* 5 PA2 e-switch
- * 6 PA1 (none)
+ * 6 PA1 button LED
* 7 PA0 (none)
* 8 GND GND
* 9 VCC VCC
@@ -65,17 +65,23 @@
#define AUXLED_RGB_DDR DDRA // DDRA or DDRB or DDRC
#define AUXLED_RGB_PUE PUEA // PUEA or PUEB or PUEC
+#define BUTTON_LED_PIN PA1 // pin 6
+#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() {
// enable output ports
// 7135
DDRB = (1 << PWM1_PIN);
- // FET, aux R/G/B
+ // FET, aux R/G/B, button LED
DDRA = (1 << PWM2_PIN)
| (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.