aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-08-30 23:07:55 -0600
committerSelene ToyKeeper2017-08-30 23:07:55 -0600
commit15d5b2cbe807029c7493691a1877a1898d100455 (patch)
treee13b8410d5d694f5256bbb3c62c534a9262c3745
parentUpdated anduril.txt to match current code. (diff)
downloadanduril-15d5b2cbe807029c7493691a1877a1898d100455.tar.gz
anduril-15d5b2cbe807029c7493691a1877a1898d100455.tar.bz2
anduril-15d5b2cbe807029c7493691a1877a1898d100455.zip
Replaced FSM_*_LAYOUT with FSM_*_DRIVER because I think it makes more sense.
Made momentary.c compile again. Updated fsm-main to use whichever delay function is available.
-rw-r--r--spaghetti-monster/anduril.c2
-rw-r--r--spaghetti-monster/baton.c2
-rw-r--r--spaghetti-monster/darkhorse.c2
-rw-r--r--spaghetti-monster/fsm-main.c4
-rw-r--r--spaghetti-monster/momentary.c3
-rw-r--r--spaghetti-monster/ramping-ui.c2
-rw-r--r--tk-attiny.h22
7 files changed, 21 insertions, 16 deletions
diff --git a/spaghetti-monster/anduril.c b/spaghetti-monster/anduril.c
index 6c21bf3..998c0c5 100644
--- a/spaghetti-monster/anduril.c
+++ b/spaghetti-monster/anduril.c
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define FSM_EMISAR_D4_LAYOUT
+#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 45
diff --git a/spaghetti-monster/baton.c b/spaghetti-monster/baton.c
index 2489f4e..4ba329e 100644
--- a/spaghetti-monster/baton.c
+++ b/spaghetti-monster/baton.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define FSM_EMISAR_D4_LAYOUT
+#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 45
diff --git a/spaghetti-monster/darkhorse.c b/spaghetti-monster/darkhorse.c
index 2aa1b7b..2aa3e90 100644
--- a/spaghetti-monster/darkhorse.c
+++ b/spaghetti-monster/darkhorse.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define FSM_EMISAR_D4_LAYOUT
+#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 45
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index ae63126..9505322 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -89,7 +89,11 @@ int main() {
push_state(default_state, 0);
// in case any spurious button presses were detected at boot
+ #ifdef USE_DELAY_MS
delay_ms(1);
+ #else
+ delay_4ms(1);
+ #endif
empty_event_sequence();
// call recipe's setup
diff --git a/spaghetti-monster/momentary.c b/spaghetti-monster/momentary.c
index fc26db3..6b049f4 100644
--- a/spaghetti-monster/momentary.c
+++ b/spaghetti-monster/momentary.c
@@ -19,9 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define FSM_EMISAR_D4_LAYOUT
+#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_DEBUG_BLINK
+#define USE_DELAY_4MS
#include "spaghetti-monster.h"
volatile uint8_t brightness;
diff --git a/spaghetti-monster/ramping-ui.c b/spaghetti-monster/ramping-ui.c
index 2369686..527a824 100644
--- a/spaghetti-monster/ramping-ui.c
+++ b/spaghetti-monster/ramping-ui.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define FSM_EMISAR_D4_LAYOUT
+#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 32
diff --git a/tk-attiny.h b/tk-attiny.h
index 2cfe4fd..7939ccc 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -59,7 +59,7 @@
/******************** I/O pin and register layout ************************/
#ifdef FET_7135_LAYOUT
-#define LAYOUT_DEFINED
+#define DRIVER_TYPE_DEFINED
/*
* ----
* Reset -|1 8|- VCC
@@ -95,7 +95,7 @@
#endif // FET_7135_LAYOUT
#ifdef TRIPLEDOWN_LAYOUT
-#define LAYOUT_DEFINED
+#define DRIVER_TYPE_DEFINED
/*
* ----
* Reset -|1 8|- VCC
@@ -132,7 +132,7 @@
#endif // TRIPLEDOWN_LAYOUT
#ifdef FERRERO_ROCHER_LAYOUT
-#define LAYOUT_DEFINED
+#define DRIVER_TYPE_DEFINED
/*
* ----
* Reset -|1 8|- VCC
@@ -147,7 +147,7 @@
#endif // FERRERO_ROCHER_LAYOUT
#ifdef NANJG_LAYOUT
-#define LAYOUT_DEFINED
+#define DRIVER_TYPE_DEFINED
#define STAR2_PIN PB0
#define STAR3_PIN PB4
#define STAR4_PIN PB3
@@ -165,8 +165,8 @@
#endif // NANJG_LAYOUT
-#ifdef FSM_EMISAR_D4_LAYOUT
-#define LAYOUT_DEFINED
+#ifdef FSM_EMISAR_D4_DRIVER
+#define DRIVER_TYPE_DEFINED
/*
* ----
* Reset -|1 8|- VCC
@@ -199,11 +199,11 @@
#define FAST 0xA3 // fast PWM both channels
#define PHASE 0xA1 // phase-correct PWM both channels
-#endif
+#endif // ifdef FSM_EMISAR_D4_DRIVER
-#ifdef FSM_TKSABER_LAYOUT
-#define LAYOUT_DEFINED
+#ifdef FSM_TKSABER_DRIVER
+#define DRIVER_TYPE_DEFINED
/*
* ----
* Reset -|1 8|- VCC
@@ -233,10 +233,10 @@
#define FAST 0xA3 // fast PWM both channels
#define PHASE 0xA1 // phase-correct PWM both channels
-#endif // TKSABER_LAYOUT
+#endif // TKSABER_DRIVER
-#ifndef LAYOUT_DEFINED
+#ifndef DRIVER_TYPE_DEFINED
#error Hey, you need to define an I/O pin layout.
#endif