FreeRTOS introduced

This commit is contained in:
Attila Body 2020-12-03 17:19:53 +01:00
parent e7fdc831a4
commit d54d0a8992
49 changed files with 29101 additions and 151 deletions

View file

@ -19,6 +19,7 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
#include "dma.h"
#include "spi.h"
#include "gpio.h"
@ -47,12 +48,12 @@
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
volatile uint32_t g_tick = 0;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
void MX_FREERTOS_Init(void);
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
void App();
@ -60,11 +61,6 @@ void App();
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
void DoNothing()
{
static volatile uint32_t cntr = 0;
++ cntr;
}
/* USER CODE END 0 */
@ -114,10 +110,16 @@ int main(void)
/* USER CODE END 2 */
/* Init scheduler */
osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */
MX_FREERTOS_Init();
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while(1) {
App();
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */