aboutsummaryrefslogtreecommitdiff
path: root/tk-attiny.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-10-21 06:44:40 -0600
committerSelene ToyKeeper2017-10-21 06:44:40 -0600
commitd0219fc267b3741e9ff84643a5f381d3c229f18a (patch)
tree10857054e31c21df3b2b083e1214bb76bb9f4294 /tk-attiny.h
parentMade indicator LED turn on/off in lightning mode along with main LED. (diff)
downloadanduril-d0219fc267b3741e9ff84643a5f381d3c229f18a.tar.gz
anduril-d0219fc267b3741e9ff84643a5f381d3c229f18a.tar.bz2
anduril-d0219fc267b3741e9ff84643a5f381d3c229f18a.zip
Made DELAY_ZERO_TIME a per-MCU option; hopefully will sync to PWM better that way.
Added BLF Q8 driver type, but it's basically identical to the D4 except in name. (can be used to auto-detect whether to use indicator LED, and what the diode drop constant should be)
Diffstat (limited to 'tk-attiny.h')
-rw-r--r--tk-attiny.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tk-attiny.h b/tk-attiny.h
index e58c4bb..ea784f5 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -32,6 +32,7 @@
#define V_REF REFS0
#define BOGOMIPS 950
#define ADMUX_VCC 0b00001100
+ #define DELAY_ZERO_TIME 252
#elif (ATTINY == 25)
// TODO: Use 6.4 MHz instead of 8 MHz?
#define F_CPU 8000000UL
@@ -40,6 +41,7 @@
#define BOGOMIPS (F_CPU/4000)
#define ADMUX_VCC 0b00001100
#define ADMUX_THERM 0b10001111
+ #define DELAY_ZERO_TIME 1020
#elif (ATTINY == 85)
// TODO: Use 6.4 MHz instead of 8 MHz?
#define F_CPU 8000000UL
@@ -50,6 +52,7 @@
#define ADMUX_VCC 0b00001100
// (1 << V_REF) | (0 << ADLAR) | (THERM_CHANNEL)
#define ADMUX_THERM 0b10001111
+ #define DELAY_ZERO_TIME 1020
#else
#error Hey, you need to define ATTINY.
#endif
@@ -165,6 +168,12 @@
#endif // NANJG_LAYOUT
+// Q8 driver is the same as a D4, basically
+#ifdef FSM_BLF_Q8_DRIVER
+#define FSM_EMISAR_D4_DRIVER
+#endif
+
+
#ifdef FSM_EMISAR_D4_DRIVER
#define DRIVER_TYPE_DEFINED
/*