14 lines
278 B
C
Raw Normal View History

2021-10-01 00:21:50 +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) {
2021-10-02 19:20:18 +08:00
HAL_Delay(ms);
2021-10-01 00:21:50 +08:00
}
void STM32_Time_sleep_s(PikaObj* self, int s) {
2021-10-02 19:20:18 +08:00
for (int i = 0; i < s; i++) {
HAL_Delay(1000);
}
2021-10-01 00:21:50 +08:00
}