RMUL2025/User/bsp/a/bsp_delay.c

21 lines
757 B
C
Raw Normal View History

2025-03-09 17:01:52 +08:00
/* Includes ----------------------------------------------------------------- */
#include "bsp_delay.h"
#include "cmsis_os.h"
#include "main.h"
/* Private define ----------------------------------------------------------- */
/* Private macro ------------------------------------------------------------ */
/* Private typedef ---------------------------------------------------------- */
/* Private variables -------------------------------------------------------- */
/* Private function -------------------------------------------------------- */
/* Exported functions ------------------------------------------------------- */
uint8_t BSP_Delay(uint32_t ms) {
if (osKernelRunning()) {
osDelay(ms);
} else {
HAL_Delay(ms);
}
return 0;
}