| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE.md file. | |
| 4 | |
| 5 #ifndef PLATFORMS_STM_DISCO_FLETCH_SRC_FREERTOSCONFIG_H_ | |
| 6 #define PLATFORMS_STM_DISCO_FLETCH_SRC_FREERTOSCONFIG_H_ | |
| 7 | |
| 8 extern uint32_t SystemCoreClock; | |
| 9 | |
| 10 #define configUSE_PREEMPTION 1 | |
| 11 #define configUSE_IDLE_HOOK 0 | |
| 12 #define configUSE_TICK_HOOK 0 | |
| 13 #define configCPU_CLOCK_HZ (SystemCoreClock) | |
| 14 #define configTICK_RATE_HZ ((TickType_t)1000) | |
| 15 #define configMAX_PRIORITIES (7) | |
| 16 #define configMINIMAL_STACK_SIZE ((uint16_t)128) | |
| 17 // No heap here as we are using heap_3 at the moment. | |
| 18 #define configTOTAL_HEAP_SIZE 0 | |
| 19 #define configMAX_TASK_NAME_LEN (16) | |
| 20 #define configUSE_TRACE_FACILITY 1 | |
| 21 #define configUSE_16_BIT_TICKS 0 | |
| 22 #define configUSE_MUTEXES 1 | |
| 23 #define configQUEUE_REGISTRY_SIZE 8 | |
| 24 #define configCHECK_FOR_STACK_OVERFLOW 2 | |
| 25 #define configUSE_RECURSIVE_MUTEXES 1 | |
| 26 #define configUSE_MALLOC_FAILED_HOOK 1 | |
| 27 #define configUSE_COUNTING_SEMAPHORES 1 | |
| 28 #define configUSE_CO_ROUTINES 0 | |
| 29 #define configMAX_CO_ROUTINE_PRIORITIES (2) | |
| 30 | |
| 31 #define INCLUDE_vTaskPrioritySet 1 | |
| 32 #define INCLUDE_uxTaskPriorityGet 1 | |
| 33 #define INCLUDE_vTaskDelete 1 | |
| 34 #define INCLUDE_vTaskCleanUpResources 0 | |
| 35 #define INCLUDE_vTaskSuspend 1 | |
| 36 #define INCLUDE_vTaskDelayUntil 0 | |
| 37 #define INCLUDE_vTaskDelay 1 | |
| 38 #define INCLUDE_xTaskGetSchedulerState 1 | |
| 39 | |
| 40 // Cortex-M specific definitions. | |
| 41 #ifdef __NVIC_PRIO_BITS | |
| 42 // __NVIC_PRIO_BITS will be specified when CMSIS is being used. | |
| 43 #define configPRIO_BITS __NVIC_PRIO_BITS | |
| 44 #else | |
| 45 #define configPRIO_BITS 4 | |
| 46 #endif | |
| 47 | |
| 48 // The lowest interrupt priority that can be used in a call to a "set | |
| 49 // priority" function. | |
| 50 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 | |
| 51 | |
| 52 // The highest interrupt priority that can be used by any interrupt | |
| 53 // service routine that makes calls to interrupt safe FreeRTOS API | |
| 54 // functions. DO NOT CALL INTERRUPT SAFE FREERTOS API FUNCTIONS FROM | |
| 55 // ANY INTERRUPT THAT HAS A HIGHER PRIORITY THAN THIS! (higher | |
| 56 // priorities are lower numeric values. */ | |
| 57 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 | |
| 58 | |
| 59 // Interrupt priorities used by the kernel port layer itself. These | |
| 60 // are generic to all Cortex-M ports, and do not rely on any | |
| 61 // particular library functions. | |
| 62 #define configKERNEL_INTERRUPT_PRIORITY \ | |
| 63 (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) | |
| 64 // configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero. | |
| 65 // See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ | |
| 66 #define configMAX_SYSCALL_INTERRUPT_PRIORITY \ | |
| 67 (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) | |
| 68 | |
| 69 #define configASSERT(x) if ((x) == 0) { taskDISABLE_INTERRUPTS(); for (;;); } | |
| 70 | |
| 71 // Definitions that map the FreeRTOS port interrupt handlers to their | |
| 72 // CMSIS standard names. | |
| 73 #define vPortSVCHandler SVC_Handler | |
| 74 #define xPortPendSVHandler PendSV_Handler | |
| 75 | |
| 76 // Allocate a newlib reent structure for each created task. | |
| 77 #define configUSE_NEWLIB_REENTRANT 1 | |
| 78 | |
| 79 #endif // PLATFORMS_STM_DISCO_FLETCH_SRC_FREERTOSCONFIG_H_ | |
| OLD | NEW |