|
| 1 | +#ifndef FREERTOS_CONFIG_H |
| 2 | +#define FREERTOS_CONFIG_H |
| 3 | + |
| 4 | +#include <stdint.h> |
| 5 | + |
| 6 | +#define configCPU_CLOCK_HZ 144000000UL |
| 7 | +#define configTICK_RATE_HZ 1000U |
| 8 | +#define configUSE_PREEMPTION 1 |
| 9 | +#define configUSE_TIME_SLICING 0 |
| 10 | +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 |
| 11 | +#define configUSE_TICKLESS_IDLE 1 |
| 12 | +#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2 |
| 13 | + |
| 14 | +#define configMAX_PRIORITIES 4 |
| 15 | +#define configMINIMAL_STACK_SIZE 192U |
| 16 | +#define configMAX_TASK_NAME_LEN 16 |
| 17 | +#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_32_BITS |
| 18 | +#define configIDLE_SHOULD_YIELD 0 |
| 19 | +#define configTASK_NOTIFICATION_ARRAY_ENTRIES 1 |
| 20 | +#define configQUEUE_REGISTRY_SIZE 0 |
| 21 | +#define configENABLE_BACKWARD_COMPATIBILITY 0 |
| 22 | +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0 |
| 23 | +#define configUSE_MINI_LIST_ITEM 0 |
| 24 | +#define configSTACK_DEPTH_TYPE uint32_t |
| 25 | +#define configMESSAGE_BUFFER_LENGTH_TYPE uint32_t |
| 26 | +#define configUSE_NEWLIB_REENTRANT 0 |
| 27 | + |
| 28 | +#define configUSE_TIMERS 0 |
| 29 | +#define configUSE_EVENT_GROUPS 0 |
| 30 | +#define configUSE_STREAM_BUFFERS 0 |
| 31 | +#define configUSE_CO_ROUTINES 0 |
| 32 | + |
| 33 | +#define configUSE_TASK_NOTIFICATIONS 1 |
| 34 | +#define configUSE_MUTEXES 1 |
| 35 | +#define configUSE_RECURSIVE_MUTEXES 0 |
| 36 | +#define configUSE_COUNTING_SEMAPHORES 0 |
| 37 | +#define configUSE_QUEUE_SETS 0 |
| 38 | + |
| 39 | +#define configSUPPORT_STATIC_ALLOCATION 1 |
| 40 | +#define configSUPPORT_DYNAMIC_ALLOCATION 0 |
| 41 | + |
| 42 | +#define configUSE_IDLE_HOOK 0 |
| 43 | +#define configUSE_TICK_HOOK 0 |
| 44 | +#define configCHECK_FOR_STACK_OVERFLOW 2 |
| 45 | +#define configUSE_MALLOC_FAILED_HOOK 0 |
| 46 | + |
| 47 | +#define configUSE_TRACE_FACILITY 0 |
| 48 | +#define configGENERATE_RUN_TIME_STATS 0 |
| 49 | +#define configUSE_STATS_FORMATTING_FUNCTIONS 0 |
| 50 | +#define configUSE_POSIX_ERRNO 0 |
| 51 | + |
| 52 | +#ifndef configENABLE_FPU |
| 53 | + #define configENABLE_FPU 1 |
| 54 | +#endif |
| 55 | +#ifndef configENABLE_VPU |
| 56 | + #define configENABLE_VPU 0 |
| 57 | +#endif |
| 58 | + |
| 59 | +/* CH32V30x uses its vendor SysTick/PFIC block, not a standard CLINT. */ |
| 60 | +#define configMTIME_BASE_ADDRESS 0 |
| 61 | +#define configMTIMECMP_BASE_ADDRESS 0 |
| 62 | + |
| 63 | +#define INCLUDE_vTaskPrioritySet 0 |
| 64 | +#define INCLUDE_uxTaskPriorityGet 0 |
| 65 | +#define INCLUDE_vTaskDelete 0 |
| 66 | +#define INCLUDE_vTaskSuspend 1 |
| 67 | +#define INCLUDE_vTaskDelayUntil 0 |
| 68 | +#define INCLUDE_vTaskDelay 1 |
| 69 | +#define INCLUDE_xTaskAbortDelay 0 |
| 70 | +#define INCLUDE_xTaskGetHandle 0 |
| 71 | +#define INCLUDE_xTaskGetCurrentTaskHandle 1 |
| 72 | +#define INCLUDE_xTaskGetSchedulerState 0 |
| 73 | +#define INCLUDE_uxTaskGetStackHighWaterMark 1 |
| 74 | +#define INCLUDE_uxTaskGetStackHighWaterMark2 1 |
| 75 | +#define INCLUDE_eTaskGetState 0 |
| 76 | +#define INCLUDE_xTimerPendFunctionCall 0 |
| 77 | + |
| 78 | +#ifdef __cplusplus |
| 79 | +extern "C" { |
| 80 | +#endif |
| 81 | +void vFreeRTOSAssert(const char *file, int line); |
| 82 | +#ifdef __cplusplus |
| 83 | +} |
| 84 | +#endif |
| 85 | + |
| 86 | +#define configASSERT(condition) \ |
| 87 | + do \ |
| 88 | + { \ |
| 89 | + if(!(condition)) \ |
| 90 | + { \ |
| 91 | + vFreeRTOSAssert(__FILE__, __LINE__); \ |
| 92 | + } \ |
| 93 | + } while(0) |
| 94 | + |
| 95 | +#endif |
0 commit comments