aboutsummaryrefslogtreecommitdiff
path: root/hwdef-nanjg.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-08-06 21:27:45 -0600
committerSelene ToyKeeper2018-08-06 21:27:45 -0600
commitce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4 (patch)
treeab5b14203adad80505368f31f8dfa6a87a1cb356 /hwdef-nanjg.h
parentMade it easier to change ramp shape in bin/level_calc.py . (diff)
parentAdded more driver types to Anduril. (diff)
downloadanduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.tar.gz
anduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.tar.bz2
anduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.zip
merged updates from fsm branch, including RampingIOS V3 and Werner UIs...
... plus a bunch of other updates, fixes, improvements, etc.
Diffstat (limited to 'hwdef-nanjg.h')
-rw-r--r--hwdef-nanjg.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/hwdef-nanjg.h b/hwdef-nanjg.h
new file mode 100644
index 0000000..add10d1
--- /dev/null
+++ b/hwdef-nanjg.h
@@ -0,0 +1,16 @@
+/* NANJG driver layout
+ */
+#define STAR2_PIN PB0
+#define STAR3_PIN PB4
+#define STAR4_PIN PB3
+#define PWM_PIN PB1
+#define VOLTAGE_PIN PB2
+#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2
+#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2
+#define ADC_PRSCL 0x06 // clk/64
+
+#define PWM_LVL OCR0B // OCR0B is the output compare register for PB1
+
+#define FAST 0x23 // fast PWM channel 1 only
+#define PHASE 0x21 // phase-correct PWM channel 1 only
+