Move LedBlaster::setup to be the top-most function.
This commit is contained in:
+5
-5
@@ -14,6 +14,11 @@ namespace LedBlaster {
|
|||||||
uint16_t led_on_ms;
|
uint16_t led_on_ms;
|
||||||
uint16_t led_off_ms;
|
uint16_t led_off_ms;
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
pinMode(LED_PIN, OUTPUT);
|
||||||
|
enable_fast_mode(false);
|
||||||
|
}
|
||||||
|
|
||||||
void enable_fast_mode(bool fast_mode_enabled) {
|
void enable_fast_mode(bool fast_mode_enabled) {
|
||||||
if (fast_mode_enabled) {
|
if (fast_mode_enabled) {
|
||||||
led_on_ms = LED_ON_MS_FAST;
|
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() {
|
void emit_0() {
|
||||||
digitalWrite(LED_PIN, HIGH);
|
digitalWrite(LED_PIN, HIGH);
|
||||||
delayMicroseconds(led_on_ms);
|
delayMicroseconds(led_on_ms);
|
||||||
|
|||||||
Reference in New Issue
Block a user