aboutsummaryrefslogtreecommitdiff
path: root/hw/hank/noctigon-kr4
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-10 21:34:40 -0700
committerSelene ToyKeeper2023-11-10 21:34:40 -0700
commit3d12b7066d27b591e0283e20ed066bc66e29fbe4 (patch)
tree08a0ed41a4b0baa7f7f5ea4eed6ee10ac250250c /hw/hank/noctigon-kr4
parentadded md5sum to build-all.sh output per target (diff)
downloadanduril-3d12b7066d27b591e0283e20ed066bc66e29fbe4.tar.gz
anduril-3d12b7066d27b591e0283e20ed066bc66e29fbe4.tar.bz2
anduril-3d12b7066d27b591e0283e20ed066bc66e29fbe4.zip
refactor checkpoint: splitting MCU-specific code into arch/$MCU.[ch]
Phew, that's a lot of changes! And there's still a lot more to do...
Diffstat (limited to 'hw/hank/noctigon-kr4')
-rw-r--r--hw/hank/noctigon-kr4/2ch/hwdef.h4
-rw-r--r--hw/hank/noctigon-kr4/boost/hwdef.h4
-rw-r--r--hw/hank/noctigon-kr4/hwdef.h8
-rw-r--r--hw/hank/noctigon-kr4/nofet/anduril.h2
4 files changed, 7 insertions, 11 deletions
diff --git a/hw/hank/noctigon-kr4/2ch/hwdef.h b/hw/hank/noctigon-kr4/2ch/hwdef.h
index b23c7cc..28a686d 100644
--- a/hw/hank/noctigon-kr4/2ch/hwdef.h
+++ b/hw/hank/noctigon-kr4/2ch/hwdef.h
@@ -30,8 +30,6 @@
* ADC12 thermal sensor
*/
-#include <avr/io.h>
-
// move the switch to a different pin
#define SWITCH_PIN PB2 // pin 17
#define SWITCH_PCINT PCINT10 // pin 17 pin change interrupt
@@ -39,7 +37,7 @@
#define SWITCH_PCMSK PCMSK1 // PCMSK1 is for PCINT[11:8]
#define SWITCH_PORT PINB // PINA or PINB or PINC
#define SWITCH_PUE PUEB // pullup group B
-#define PCINT_vect PCINT1_vect // ISR for PCINT[11:8]
+#define SWITCH_VECT PCINT1_vect // ISR for PCINT[11:8]
// the rest of the config is the same as the generic Emisar 2ch build
#include "hank/emisar-2ch/hwdef.h"
diff --git a/hw/hank/noctigon-kr4/boost/hwdef.h b/hw/hank/noctigon-kr4/boost/hwdef.h
index f17d263..b923b30 100644
--- a/hw/hank/noctigon-kr4/boost/hwdef.h
+++ b/hw/hank/noctigon-kr4/boost/hwdef.h
@@ -46,12 +46,12 @@
#undef SWITCH_PCMSK
#undef SWITCH_PORT
#undef SWITCH_PUE
-#undef PCINT_vect
+#undef SWITCH_VECT
#define SWITCH_PIN PB2 // pin 17
#define SWITCH_PCINT PCINT10 // pin 17 pin change interrupt
#define SWITCH_PCIE PCIE1 // PCIE1 is for PCINT[11:8]
#define SWITCH_PCMSK PCMSK1 // PCMSK1 is for PCINT[11:8]
#define SWITCH_PORT PINB // PINA or PINB or PINC
#define SWITCH_PUE PUEB // pullup group B
-#define PCINT_vect PCINT1_vect // ISR for PCINT[11:8]
+#define SWITCH_VECT PCINT1_vect // ISR for PCINT[11:8]
diff --git a/hw/hank/noctigon-kr4/hwdef.h b/hw/hank/noctigon-kr4/hwdef.h
index 586f848..be165bd 100644
--- a/hw/hank/noctigon-kr4/hwdef.h
+++ b/hw/hank/noctigon-kr4/hwdef.h
@@ -35,10 +35,8 @@
* Some models also have a direct-drive FET for turbo.
*/
-#include <avr/io.h>
-
-#ifndef HWDEF_C_FILE
-#define HWDEF_C_FILE hank/noctigon-kr4/hwdef.c
+#ifndef HWDEF_C
+#define HWDEF_C hank/noctigon-kr4/hwdef.c
#endif
// allow using aux LEDs as extra channel modes
@@ -93,7 +91,7 @@ enum CHANNEL_MODES {
#define SWITCH_PCMSK PCMSK1 // PCMSK1 is for PCINT[11:8]
#define SWITCH_PORT PINB // PINA or PINB or PINC
#define SWITCH_PUE PUEB // pullup group B
-#define PCINT_vect PCINT1_vect // ISR for PCINT[11:8]
+#define SWITCH_VECT PCINT1_vect // ISR for PCINT[11:8]
// the button tends to short out the voltage divider,
// so ignore voltage while the button is being held
diff --git a/hw/hank/noctigon-kr4/nofet/anduril.h b/hw/hank/noctigon-kr4/nofet/anduril.h
index 4522cde..ad3f012 100644
--- a/hw/hank/noctigon-kr4/nofet/anduril.h
+++ b/hw/hank/noctigon-kr4/nofet/anduril.h
@@ -5,7 +5,7 @@
// (and Noctigon KR1)
// (and Emisar D4v2 E21A, a.k.a. "D4v2.5")
-#define HWDEF_C_FILE hank/noctigon-kr4/nofet/hwdef.c
+#define HWDEF_C hank/noctigon-kr4/nofet/hwdef.c
#include "hank/noctigon-kr4/anduril.h"
// brightness w/ SST-20 4000K LEDs:
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.