pikapython/package/STM32F4/STM32F4_Time.c

14 lines
261 B
C
Raw Normal View History

2022-02-27 19:45:37 +08:00
#include <stdint.h>
#include "BaseObj.h"
#include "STM32F4_common.h"
void STM32F4_Time_sleep_ms(PikaObj* self, int ms) {
HAL_Delay(ms);
}
void STM32F4_Time_sleep_s(PikaObj* self, int s) {
for (int i = 0; i < s; i++) {
HAL_Delay(1000);
}
}