/* FreeRTOS V8.0.0:rc2 - Copyright (C) 2014 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * * robust, strictly quality controlled, supported, and cross * * platform software that has become a de facto standard. * * * * Help yourself get started quickly and support the FreeRTOS * * project by purchasing a FreeRTOS tutorial book, reference * * manual, or both from: http://www.FreeRTOS.org/Documentation * * * * Thank you! * * * *************************************************************************** This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. >>! NOTE: The modification to the GPL is included to allow you to distribute >>! a combined work that includes FreeRTOS without being obliged to provide >>! the source code for proprietary components outside of the FreeRTOS >>! kernel. FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Full license text is available from the following link: http://www./a00114.html 1 tab == 4 spaces! *************************************************************************** * * * Having a problem? Start by reading the FAQ "My application does * * not run, what could be wrong?" * * * * http://www.FreeRTOS.org/FAQHelp.html * * * *************************************************************************** http://www.FreeRTOS.org - Documentation, books, training, latest versions, license and Real Time Engineers Ltd. contact details. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and mission critical applications that require provable dependability. 1 tab == 4 spaces! */ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H /*----------------------------------------------------------- * Application specific definitions. * * These definitions should be adjusted for your particular hardware and * application requirements. * * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. * * See http://www./a00110.html. *----------------------------------------------------------*/ #define configUSE_PREEMPTION 1/* 是否配置成搶先式多任務(wù)內(nèi)核,是1的時(shí)候,優(yōu)先級(jí)高的任務(wù)優(yōu)先執(zhí)行。 為0任務(wù)就沒(méi)有優(yōu)先級(jí)之說(shuō),用時(shí)間片輪流執(zhí)行 */ #define configUSE_IDLE_HOOK 0/* IDLE任務(wù)的HOOK函數(shù),用于OS功能擴(kuò)展,需要你自己編相應(yīng)函數(shù), 名字是void vApplicationIdleHook( void ) */ #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 )/* 系統(tǒng)CPU頻率,單位是Hz */ #define configTICK_RATE_HZ ( ( portTickType ) 1000 )/* 系統(tǒng)SYSTEM TICK每秒鐘的發(fā)生次數(shù), 數(shù)值越大系統(tǒng)反應(yīng)越快,但是CPU用在任務(wù)切換的開(kāi)銷就越多 */ #define configMAX_PRIORITIES ( 5 )/* 系統(tǒng)任務(wù)優(yōu)先級(jí)數(shù)。5 說(shuō)明任務(wù)有5級(jí)優(yōu)先度。這個(gè)數(shù)目越大耗費(fèi)RAM越多 */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )/* 系統(tǒng)最小堆棧尺寸,注意128不是128字節(jié),而是128個(gè)入棧。比如ARM32位,128個(gè)入棧就是512字節(jié) */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )/* 系統(tǒng)可用內(nèi)存。一般設(shè)成除了操作系統(tǒng)和你的程序所用RAM外的最大RAM。 比如20KRAM你用了2K,系統(tǒng)用了3K,剩下15就是最大HEAP 尺寸。你可以先設(shè)小然后看編譯結(jié)果往大里加*/ #define configMAX_TASK_NAME_LEN ( 16 )/* 任務(wù)的PC名字最大長(zhǎng)度,因?yàn)楹瘮?shù)名編譯完了就不見(jiàn)了,所以追蹤時(shí)不知道哪個(gè)名字。16表示16個(gè)char */ #define configUSE_TRACE_FACILITY 0/* 是否設(shè)定成追蹤,由PC端TraceCon.exe記錄,也可以轉(zhuǎn)到系統(tǒng)顯示屏上 */ #define configUSE_16_BIT_TICKS 0/* 就是SYSTEM TICK的長(zhǎng)度,16是16位,如果是16位以下CPU, 一般選1;如果是32位系統(tǒng),一般選0 */ #define configIDLE_SHOULD_YIELD 1/* 簡(jiǎn)單理解以下就是和IDLE TASK同樣優(yōu)先級(jí)的任務(wù)執(zhí)行情況。建議設(shè)成1,對(duì)系統(tǒng)影響不大 */ /* Co-routine definitions. */ #define configUSE_CO_ROUTINES 0/* 是用用協(xié)程。協(xié)程公用堆棧,節(jié)省RAM,但是沒(méi)有任務(wù)優(yōu)先級(jí)高,也無(wú)法和任務(wù)通訊 */ /* 設(shè)置為1則包含co-routines 功能,如果包含了co-routines功能,則編譯時(shí)需包含croutine.c 文件 */ #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) /* co-routines 可以使用的優(yōu)先級(jí)的數(shù)量 */ /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ #define INCLUDE_vTaskPrioritySet 1/* 設(shè)定可以改變?nèi)蝿?wù)優(yōu)先度 */ #define INCLUDE_uxTaskPriorityGet 1/* 設(shè)定可以查詢?nèi)蝿?wù)優(yōu)先度 */ #define INCLUDE_vTaskDelete 1/* 設(shè)定可以刪除任務(wù) */ #define INCLUDE_vTaskCleanUpResources 0/* 據(jù)說(shuō)是可以回收刪除任務(wù)后的資源(RAM等)*/ #define INCLUDE_vTaskSuspend 1/* 設(shè)置可以把任務(wù)掛起 */ #define INCLUDE_vTaskDelayUntil 1/* 設(shè)置任務(wù)延遲的絕對(duì)時(shí)間,比如現(xiàn)在4:30,延遲到5:00。時(shí)間都是絕對(duì)時(shí)間 */ #define INCLUDE_vTaskDelay 1/* 設(shè)置任務(wù)延時(shí),比如延遲30分鐘,相對(duì)的時(shí)間,現(xiàn)在什么時(shí)間,不需要知道 */ /* This is the raw value as per the Cortex-M3 NVIC. Values can be 255 (lowest) to 0 (1?) (highest). */ #define configKERNEL_INTERRUPT_PRIORITY 255/* 系統(tǒng)內(nèi)核的中斷優(yōu)先級(jí),中斷優(yōu)先級(jí)越低,越不會(huì)影響其他中斷。一般設(shè)成最低 */ /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xb0, or priority 11. */ /* This is the value being used as per the ST library which permits 16 priority values, 0 to 15. This must correspond to the configKERNEL_INTERRUPT_PRIORITY setting. Here 15 corresponds to the lowest NVIC value of 255. */ #define configLIBRARY_KERNEL_INTERRUPT_PRIORITY 15 #endif /* FREERTOS_CONFIG_H */ |
|