Blink LED on startup
Afterwards, the LED shows whether the fan is (or should be) currently on.
This commit is contained in:
parent
0846a0572d
commit
b6c7888321
12
src/main.c
12
src/main.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue