aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
-rw-r--r--spaghetti-monster/fsm-main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index bc41cd6..5efcd4c 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -40,6 +40,12 @@ int main() {
// Don't allow interrupts while booting
cli();
+ #ifdef HALFSPEED
+ // run at half speed
+ CLKPR = 1<<CLKPCE;
+ CLKPR = 1;
+ #endif
+
// configure PWM channels
#if PWM_CHANNELS >= 1
DDRB |= (1 << PWM1_PIN);