optical/EMBOS/Users/tasks.c
2025-09-04 09:45:08 +08:00

35 lines
604 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "tasks.h"
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
#include "boottasks.h"
#else
#include "apptasks.h"
#endif
void SetVectorTable(void)
{
#if (__CORTEX_M == 0)
// 在使用STM32F0XX时若增加IAP则必须在APP中将中断向量表拷贝到SRAM并将系统重映射到SRAM这样才能使中断恢复正常工作。
#else
CLEAR_ALL_INT();
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
SCB->VTOR = FLASH_BASE | 0;
#else
SCB->VTOR = FLASH_BASE | STM32_BOOT_SIZE;
#endif
SET_ALL_INT();
#endif
}
void MainTasks(void)
{
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
BootMainTask(); // 启动代码
#else
AppMainTask(); // 应用代码
#endif
}