pikapython/package/STM32F1/STM32F1_Time.c

14 lines
261 B
C
Raw Normal View History

2021-12-05 22:13:32 +08:00
#include <stdint.h>
#include "BaseObj.h"
2021-12-11 20:12:20 +08:00
#include "STM32F1_common.h"
2021-12-05 22:13:32 +08:00
void STM32F1_Time_sleep_ms(PikaObj* self, int ms) {
2021-12-11 18:29:13 +08:00
HAL_Delay(ms);
2021-12-05 22:13:32 +08:00
}
void STM32F1_Time_sleep_s(PikaObj* self, int s) {
for (int i = 0; i < s; i++) {
2021-12-11 18:29:13 +08:00
HAL_Delay(1000);
2021-12-05 22:13:32 +08:00
}
2021-12-12 00:30:04 +08:00
}