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
|
@ -79,11 +79,17 @@ int main(void)
|
||||||
|
|
||||||
timebase_ms += 1000 / SYSTICK_FREQ;
|
timebase_ms += 1000 / SYSTICK_FREQ;
|
||||||
|
|
||||||
//uint32_t timebase_ms_fast = timebase_ms & 0xFFFFFFFF;
|
uint32_t timebase_ms_fast = timebase_ms & 0xFFFFFFFF;
|
||||||
|
|
||||||
|
if(timebase_ms_fast <= 1000) {
|
||||||
|
if((timebase_ms_fast % 100) == 0) {
|
||||||
|
gpio_toggle(LED_PORT, LED_PIN);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// start the measurement in the background.
|
// start the measurement in the background.
|
||||||
temp_sensor_trigger_update();
|
temp_sensor_trigger_update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check for completion of a measurement
|
// check for completion of a measurement
|
||||||
if(temp_sensor_has_new_values()) {
|
if(temp_sensor_has_new_values()) {
|
||||||
|
|
Loading…
Reference in a new issue