Blink LED on startup

Afterwards, the LED shows whether the fan is (or should be) currently on.
This commit is contained in:
Thomas Kolb 2024-02-09 19:20:52 +01:00
parent 0846a0572d
commit b6c7888321

View file

@ -79,10 +79,16 @@ int main(void)
timebase_ms += 1000 / SYSTICK_FREQ;
//uint32_t timebase_ms_fast = timebase_ms & 0xFFFFFFFF;
uint32_t timebase_ms_fast = timebase_ms & 0xFFFFFFFF;
// start the measurement in the background.
temp_sensor_trigger_update();
if(timebase_ms_fast <= 1000) {
if((timebase_ms_fast % 100) == 0) {
gpio_toggle(LED_PORT, LED_PIN);
}
} else {
// start the measurement in the background.
temp_sensor_trigger_update();
}
}
// check for completion of a measurement