48 lines
995 B
C
48 lines
995 B
C
//-------------------------------------------------------------------------------
|
||
// File Name: tasks.c
|
||
// Brief:
|
||
// Version: 1.1.0
|
||
// Create Date: 2021/07/20
|
||
// Create by: Marshal Lee
|
||
// Copyright:
|
||
// Copyright (c) 2021, Richpeace Co., LTD.
|
||
// All rights reserved.
|
||
//
|
||
// Modify by: Marshal Lee
|
||
// Modify Date: 2021/07/20
|
||
//-------------------------------------------------------------------------------
|
||
|
||
|
||
#include "tasks.h"
|
||
|
||
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
|
||
#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
|
||
}
|
||
|
||
|