diff --git a/src/daq_driver.c b/src/daq_driver.c index 188456f..dd35cef 100644 --- a/src/daq_driver.c +++ b/src/daq_driver.c @@ -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(); } diff --git a/src/hardware.cpp b/src/hardware.cpp index bcf98e6..ad706ca 100644 --- a/src/hardware.cpp +++ b/src/hardware.cpp @@ -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 diff --git a/src/leds.cpp b/src/leds.cpp index 3225658..005b4e2 100644 --- a/src/leds.cpp +++ b/src/leds.cpp @@ -81,7 +81,7 @@ void leds_update_thread() led_count++; flicker_count++; - k_sleep(SLEEP_TIME_MS); + k_sleep(K_MSEC(SLEEP_TIME_MS)); } } diff --git a/src/main.cpp b/src/main.cpp index 953f353..68b307e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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)); } }