Added sleep_ticks to C interface

This commit is contained in:
Benjamin Vedder 2024-03-01 12:47:59 +01:00
parent d0ed43709c
commit 28bb9ceb70
3 changed files with 3 additions and 2 deletions

View File

@ -620,6 +620,7 @@ typedef struct {
// Use ts_to_age_s to get the age of a timestamp in
// seconds. ts_to_age_s should hanlde overflows.
systime_t (*system_time_ticks)(void);
void (*sleep_ticks)(systime_t ticks);
// FOC Audio
bool (*foc_beep)(float freq, float time, float voltage);

View File

@ -934,6 +934,7 @@ lbm_value ext_load_native_lib(lbm_value *args, lbm_uint argn) {
// System time
cif.cif.system_time_ticks = chVTGetSystemTimeX;
cif.cif.sleep_ticks = chThdSleep;
// FOC Audio
cif.cif.foc_beep = mcpwm_foc_beep;

View File

@ -113,8 +113,7 @@ typedef struct {
#endif
#ifdef PIN_HW_2
lbm_uint pin_hw_2;
#endif
#endif
// Settings
lbm_uint l_current_min;