Use K_MSEC macro in k_sleep calls
This is required by Zephyr 2.3, otherwise getting compile error.
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user