/** ****************************************************************************** * @file GPIO/GPIO_EXTI/Inc/main.h * @author MCD Application Team * @brief Header for main.c module ****************************************************************************** * @attention * *

© Copyright (c) 2016 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H /* Includes ------------------------------------------------------------------*/ #include "stm32f7xx_hal.h" #include "stm32f769i_discovery.h" /* Exported types ------------------------------------------------------------*/ /* Task state structure. In our simple scheduler, the task is determined only by its stack pointer and the start address (i.e. pointer to a function that implements the task) but in general, the structure should contain a task's state variable (flags) (e.g. RUNNING, STOPED, ACTIVE, ....) Pa3cio Bulic, 26.10.2021 */ typedef struct { void* sp; // task's stack pointer void (*pTask)(void); // start address of the task } task_table_t; /* Hardware Stack Frame structure. Pa3cio Bulic, 26.10.2021 */ typedef struct { uint32_t r0; uint32_t r1; uint32_t r2; uint32_t r3; uint32_t r12; uint32_t lr; uint32_t pc; uint32_t psr; } hw_stack_frame_t; /* Software Stack Frame structure. Pa3cio Bulic, 26.10.2021 */ typedef struct { uint32_t r4; uint32_t r5; uint32_t r6; uint32_t r7; uint32_t r8; uint32_t r9; uint32_t r10; uint32_t r11; } sw_stack_frame_t; /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void switch_context (void); void create_task (int task_id, void* task_stack_base_address, void (*pTask)(void)); void init_tasks (void); void Opravilo1 (void); void Opravilo2 (void); void Joze(void); #endif /* __MAIN_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/