Skip to content

Commit aef441a

Browse files
committed
updated comment
1 parent e1d18e8 commit aef441a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

example/main/main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,18 @@ static void setup()
4040

4141
// Custom mode of operation
4242
bool status_led = true;
43-
TickType_t started = xTaskGetTickCount();
43+
const TickType_t started = xTaskGetTickCount();
4444

4545
// NOTE since double reset, due to its imperfect implementation, can be triggered randomly, special mode should always
4646
// drop to normal mode after some timeout
47-
while ((xTaskGetTickCount() - started) < 60000 / portTICK_PERIOD_MS)
47+
while (xTaskGetTickCount() - started < 60000 / portTICK_PERIOD_MS)
4848
{
4949
gpio_set_level(STATUS_LED_GPIO, (status_led = !status_led) ? STATUS_LED_ON : STATUS_LED_OFF);
5050
vTaskDelay(50 / portTICK_PERIOD_MS);
5151
}
5252
}
5353

54-
// Wait for reset
55-
// NOTE this is trivial implementation, delaying startup, just to turn of status led, you might want more sophisticated logic
54+
// Wait for reset - usually not needed
5655
double_reset_wait();
5756
gpio_set_level(STATUS_LED_GPIO, STATUS_LED_OFF);
5857

0 commit comments

Comments
 (0)