#ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H #include "hardware/clocks.h" /* ================= CPU & Core Settings ================= */ #define configCPU_CLOCK_HZ ( 125000000 ) #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configUSE_16_BIT_TICKS 0 #define configENABLE_MPU 0 /* マルチコア(SMP)対応をオフにし、コア1つで動作させる設定 */ #define configNUMBER_OF_CORES 1 #define configRUN_MULTIPLE_PRIORITIES_AT_ONCE 0 /* ================= Scheduler ================= */ #define configUSE_PREEMPTION 1 #define configUSE_TIME_SLICING 1 #define configMAX_PRIORITIES 5 #define configIDLE_SHOULD_YIELD 1 /* ================= Memory ================= */ #define configSUPPORT_DYNAMIC_ALLOCATION 1 #define configSUPPORT_STATIC_ALLOCATION 0 #define configTOTAL_HEAP_SIZE ( 16 * 1024 ) /* ================= Tasks ================= */ #define configMAX_TASK_NAME_LEN 16 #define configMINIMAL_STACK_SIZE ( 256 ) #define configCHECK_FOR_STACK_OVERFLOW 0 #define configUSE_MUTEXES 1 #define configUSE_RECURSIVE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 0 /* ================= Timers ================= */ #define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) #define configTIMER_QUEUE_LENGTH 8 #define configTIMER_TASK_STACK_DEPTH 256 /* ================= Features (DISABLED) ================= */ #define configUSE_CO_ROUTINES 0 /* 経験則に基づき、event_groups を完全に無効化 */ #define configUSE_EVENT_GROUPS 0 /* ================= Hooks ================= */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configUSE_MALLOC_FAILED_HOOK 0 /* ================= Interrupts ================= */ #ifdef __NVIC_PRIO_BITS #define configPRIO_BITS __NVIC_PRIO_BITS #else #define configPRIO_BITS 2 #endif #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 3 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 1 #define configKERNEL_INTERRUPT_PRIORITY \ ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) #define configMAX_SYSCALL_INTERRUPT_PRIORITY \ ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) /* ================= Assert ================= */ /* taskDISABLE_INTERRUPTS の未定義エラーを避けるため port 側を使用 */ #define configASSERT( x ) if( ( x ) == 0 ) { portDISABLE_INTERRUPTS(); for( ;; ); } /* ================= API ================= */ #define INCLUDE_vTaskDelay 1 #define INCLUDE_vTaskDelete 1 #define INCLUDE_vTaskSuspend 1 #define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_xTaskGetCurrentTaskHandle 1 #define INCLUDE_xTaskGetSchedulerState 1 #endif /* FREERTOS_CONFIG_H */