File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#ifndef __COMMON_FREERTOS_H__
22#define __COMMON_FREERTOS_H__
33
4- #include "FreeRTOS.h"
5- #include "cmsis_os2.h"
6-
7- #include "atomic.h"
8- #include "list.h"
9- #include "queue.h"
10- #include "semphr.h"
11- #include "task.h"
12- #include "timers.h"
4+ #define myIDENT (x ) x
5+ #define myXSTR (x ) #x
6+ #define mySTR (x ) myXSTR(x)
7+ #define __FREERTOS_PATH (x ,y ) mySTR(myIDENT(x)y)
8+ #define _FREERTOS_PATH (y ) __FREERTOS_PATH(_FREERTOS_DIR, y)
9+
10+ #if defined(STM32F407xx )
11+ #define _FREERTOS_DIR common/STM32CubeF4/Middlewares/Third_Party/FreeRTOS/Source/
12+ #elif defined(STM32F732xx)
13+ #define _FREERTOS_DIR common/STM32CubeF7/Middlewares/Third_Party/FreeRTOS/Source/
14+ #else
15+ #error "Unsupported MCU arch"
16+ #endif
17+
18+ #include _FREERTOS_PATH (include /FreeRTOS .h )
19+ #include _FREERTOS_PATH (CMSIS_RTOS_V2 /cmsis_os2 .h )
20+
21+ #include _FREERTOS_PATH (include /atomic .h )
22+ #include _FREERTOS_PATH (include /list .h )
23+ #include _FREERTOS_PATH (include /queue .h )
24+ #include _FREERTOS_PATH (include /semphr .h )
25+ #include _FREERTOS_PATH (include /task .h )
26+ #include _FREERTOS_PATH (include /timers .h )
1327
1428#include <stdint.h>
1529
You can’t perform that action at this time.
0 commit comments