pikapython/package/STM32G0/STM32G0_Time.c
2021-11-21 16:33:57 +08:00

15 lines
287 B
C

#include "STM32G0_Time.h"
#include <stdint.h>
#include "BaseObj.h"
#include "STM32G0_common.h"
void STM32G0_Time_sleep_ms(PikaObj* self, int ms) {
HAL_Delay(ms);
}
void STM32G0_Time_sleep_s(PikaObj* self, int s) {
for (int i = 0; i < s; i++) {
HAL_Delay(1000);
}
}