Use `gpio_read` to toggle led state, saves 24 bytes of flash.

This commit is contained in:
Matthew Nielsen 2021-05-03 17:09:57 -06:00
parent 65cc6244a3
commit 83f040dc40
1 changed files with 2 additions and 6 deletions

View File

@ -535,9 +535,7 @@ void onFalseInit(void)
LOG_FILE.sync();
while(true) {
for(int i = 0; i < 3; i++) {
gpio_write(LED, high);
delay(250);
gpio_write(LED, low);
gpio_write(LED, !gpio_read(LED));
delay(250);
}
delay(3000);
@ -551,9 +549,7 @@ void noSDCardFound(void)
{
while(true) {
for(int i = 0; i < 5; i++) {
gpio_write(LED, high);
delay(250);
gpio_write(LED, low);
gpio_write(LED, !gpio_read(LED));
delay(250);
}
delay(3000);