Let hello_double_tap run without an LED defined
This commit is contained in:
parent
4d7882bc59
commit
6c6881a2a1
@ -13,9 +13,7 @@
|
|||||||
// `pico_bootsel_via_double_reset` library!
|
// `pico_bootsel_via_double_reset` library!
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
#ifndef PICO_DEFAULT_LED_PIN
|
#ifdef PICO_DEFAULT_LED_PIN
|
||||||
#warning system/hello_double_tap example requires a board with a regular LED
|
|
||||||
#else
|
|
||||||
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
|
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
|
||||||
gpio_init(LED_PIN);
|
gpio_init(LED_PIN);
|
||||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||||
@ -25,5 +23,9 @@ int main() {
|
|||||||
gpio_put(LED_PIN, 0);
|
gpio_put(LED_PIN, 0);
|
||||||
sleep_ms(250);
|
sleep_ms(250);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
while (true) {
|
||||||
|
sleep_ms(250);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user