pikapython/package/STM32/STM32_Time.c

15 lines
279 B
C
Raw Normal View History

2021-10-01 20:00:15 +08:00
#include "STM32_Time.h"
#include <stdint.h>
#include "BaseObj.h"
#include "STM32_common.h"
void STM32_Time_sleep_ms(PikaObj* self, int ms) {
HAL_Delay(ms);
}
void STM32_Time_sleep_s(PikaObj* self, int s) {
for (int i = 0; i < s; i++) {
HAL_Delay(1000);
}
2021-11-14 19:22:45 +08:00
}