/* USER CODE BEGIN Includes */
#include <app_cfg.h>
#include <cpu_core.h>
#include <os.h>
#include <os_app_hooks.h>
#include <cpu.h>
/* USER CODE END Includes */
/* USER CODE BEGIN PD */
//#warning "Modify this value to match the number of external interrupts in your MCU"
#define EXT_INT_MAX_NBR 22u
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
CPU_IntDis();
for (int_id = CPU_INT_EXT0; int_id <= (EXT_INT_MAX_NBR - 1u); int_id++)
{
/* Set all external intr. to KA interrupt priority boundary */
CPU_IntSrcPrioSet(int_id, CPU_CFG_KA_IPL_BOUNDARY/*, CPU_INT_KA*/);
}
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
OSInit(&os_err);
if (os_err != OS_ERR_NONE)
{
while (1);
}
App_OS_SetAllHooks();
OSTaskCreate(&StartupTaskTCB,
"Startup Task",
StartupTask,
0u,
APP_CFG_STARTUP_TASK_PRIO,
&StartupTaskStk[0u],
StartupTaskStk[APP_CFG_STARTUP_TASK_STK_SIZE / 10u],
APP_CFG_STARTUP_TASK_STK_SIZE,
0u,
0u,
0u,
(OS_OPT_TASK_STK_CHK | OS_OPT_TASK_STK_CLR),
&os_err);
if (os_err != OS_ERR_NONE)
{
while (1);
}
OSStart(&os_err);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// HAL_GPIO_TogglePin(BUZZER_GPIO_Port,BUZZER_Pin);
// HAL_Delay(1000);
}
/* USER CODE END 3 */
}