Use K_MSEC macro in k_sleep calls

This is required by Zephyr 2.3, otherwise getting compile error.
This commit is contained in:
Martin Jäger
2020-05-11 12:26:41 +02:00
parent 9a5004e81d
commit 1bd8734a2e
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ void daq_setup()
k_timer_init(&adc_trigger_timer, adc_trigger_conversion, NULL);
k_timer_start(&adc_trigger_timer, K_MSEC(1), K_MSEC(1)); // 1 kHz
k_sleep(500); // wait for ADC to collect some measurement values
k_sleep(K_MSEC(500)); // wait for ADC to collect some measurement values
daq_update();
calibrate_current_sensors();
}
+1 -1
View File
@@ -71,7 +71,7 @@ void start_stm32_bootloader()
gpio_pin_configure(dev, DT_OUTPUTS_BOOT0_GPIOS_PIN,
DT_OUTPUTS_BOOT0_GPIOS_FLAGS | GPIO_OUTPUT_ACTIVE);
k_sleep(100); // wait for capacitor at BOOT0 pin to charge up
k_sleep(K_MSEC(100)); // wait for capacitor at BOOT0 pin to charge up
reset_device();
#elif defined (CONFIG_SOC_SERIES_STM32F0X)
// place magic code at end of RAM and initiate reset
+1 -1
View File
@@ -81,7 +81,7 @@ void leds_update_thread()
led_count++;
flicker_count++;
k_sleep(SLEEP_TIME_MS);
k_sleep(K_MSEC(SLEEP_TIME_MS));
}
}
+4 -4
View File
@@ -72,7 +72,7 @@ void main(void)
#endif
// wait until all threads are spawned before activating the watchdog
k_sleep(2500);
k_sleep(K_MSEC(2500));
watchdog_start();
while (1) {
@@ -89,7 +89,7 @@ void main(void)
eeprom_update();
k_sleep(1000);
k_sleep(K_MSEC(1000));
}
}
@@ -161,7 +161,7 @@ void control_thread()
}
#endif
}
k_sleep(100);
k_sleep(K_MSEC(100));
}
}
@@ -182,7 +182,7 @@ void ext_mgr_thread()
last_call = now;
ext_mgr.process_1s();
}
k_sleep(1);
k_sleep(K_MSEC(1));
}
}