Move LedBlaster::setup to be the top-most function.

This commit is contained in:
Maxwell Pray
2023-02-21 04:54:54 -08:00
parent 94dec03e03
commit 7bd69af66e
+5 -5
View File
@@ -14,6 +14,11 @@ namespace LedBlaster {
uint16_t led_on_ms;
uint16_t led_off_ms;
void setup() {
pinMode(LED_PIN, OUTPUT);
enable_fast_mode(false);
}
void enable_fast_mode(bool fast_mode_enabled) {
if (fast_mode_enabled) {
led_on_ms = LED_ON_MS_FAST;
@@ -24,11 +29,6 @@ namespace LedBlaster {
}
}
void setup() {
pinMode(LED_PIN, OUTPUT);
enable_fast_mode(false);
}
void emit_0() {
digitalWrite(LED_PIN, HIGH);
delayMicroseconds(led_on_ms);