diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/croutine.c b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/croutine.c old mode 100644 new mode 100755 index 2521ff97f..f180a8774 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/croutine.c +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/croutine.c @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -55,15 +55,6 @@ #include "task.h" #include "croutine.h" -/** - * @file croutine.c - * @author FreeRTOS - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - */ - /* * Some kernel aware debuggers require data to be viewed to be global, rather * than file scope. diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/FreeRTOS.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/FreeRTOS.h old mode 100644 new mode 100755 index 1ad821d92..f440a16d1 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/FreeRTOS.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/FreeRTOS.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -33,9 +33,9 @@ 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. See the GNU General Public License for - more details. You should have received a copy of the GNU General Public - License and the FreeRTOS license exception along with FreeRTOS; if not it - can be viewed here: http://www.freertos.org/a00114.html and also obtained + more details. You should have received a copy of the GNU General Public + License and the FreeRTOS license exception along with FreeRTOS; if not it + can be viewed here: http://www.freertos.org/a00114.html and also obtained by writing to Richard Barry, contact details for whom are available on the FreeRTOS WEB site. @@ -54,14 +54,6 @@ #ifndef INC_FREERTOS_H #define INC_FREERTOS_H -/** - * @file FreeRTOS.h - * @author FreeRTOS - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - */ /* * Include the generic headers required for the FreeRTOS port being used. @@ -247,17 +239,17 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #endif #ifndef traceBLOCKING_ON_QUEUE_RECEIVE - /* Task is about to block because it cannot read from a + /* Task is about to block because it cannot read from a queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore - upon which the read was attempted. pxCurrentTCB points to the TCB of the + upon which the read was attempted. pxCurrentTCB points to the TCB of the task that attempted the read. */ #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ) #endif #ifndef traceBLOCKING_ON_QUEUE_SEND - /* Task is about to block because it cannot write to a + /* Task is about to block because it cannot write to a queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore - upon which the write was attempted. pxCurrentTCB points to the TCB of the + upon which the write was attempted. pxCurrentTCB points to the TCB of the task that attempted the write. */ #define traceBLOCKING_ON_QUEUE_SEND( pxQueue ) #endif @@ -296,6 +288,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #define traceTAKE_MUTEX_RECURSIVE( pxMutex ) #endif +#ifndef traceTAKE_MUTEX_RECURSIVE_FAILED + #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex ) +#endif + #ifndef traceCREATE_COUNTING_SEMAPHORE #define traceCREATE_COUNTING_SEMAPHORE() #endif @@ -349,7 +345,7 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #endif #ifndef traceTASK_CREATE_FAILED - #define traceTASK_CREATE_FAILED( pxNewTCB ) + #define traceTASK_CREATE_FAILED() #endif #ifndef traceTASK_DELETE @@ -395,7 +391,9 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */ #ifndef portGET_RUN_TIME_COUNTER_VALUE - #error If configGENERATE_RUN_TIME_STATS is defined then portGET_RUN_TIME_COUNTER_VALUE must also be defined. portGET_RUN_TIME_COUNTER_VALUE should evaluate to the counter value of the timer/counter peripheral used as the run time counter time base. + #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE + #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined. See the examples provided and the FreeRTOS web site for more information. + #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */ #endif /* portGET_RUN_TIME_COUNTER_VALUE */ #endif /* configGENERATE_RUN_TIME_STATS */ @@ -417,7 +415,7 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #endif #ifndef pvPortMallocAligned - #define pvPortMallocAligned( xSize, pvBuffer ) pvPortMalloc( xSize ); ( void ) pvBuffer + #define pvPortMallocAligned( x, puxStackBuffer ) ( ( puxStackBuffer == NULL ) ? ( pvPortMalloc( x ) ) : ( puxStackBuffer ) ) #endif #ifndef vPortFreeAligned diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/StackMacros.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/StackMacros.h old mode 100644 new mode 100755 index 255e57870..00645e895 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/StackMacros.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/StackMacros.h @@ -1,14 +1,5 @@ -/** - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - * @file StackMacros.h - * @author FreeRTOS - */ - /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -19,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -42,9 +33,9 @@ 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. See the GNU General Public License for - more details. You should have received a copy of the GNU General Public - License and the FreeRTOS license exception along with FreeRTOS; if not it - can be viewed here: http://www.freertos.org/a00114.html and also obtained + more details. You should have received a copy of the GNU General Public + License and the FreeRTOS license exception along with FreeRTOS; if not it + can be viewed here: http://www.freertos.org/a00114.html and also obtained by writing to Richard Barry, contact details for whom are available on the FreeRTOS WEB site. @@ -72,7 +63,7 @@ * the current stack state only - comparing the current top of stack value to * the stack limit. Setting configCHECK_FOR_STACK_OVERFLOW to greater than 1 * will also cause the last few stack bytes to be checked to ensure the value - * to which the bytes were set when the task was created have not been + * to which the bytes were set when the task was created have not been * overwritten. Note this second test does not guarantee that an overflowed * stack will always be recognised. */ @@ -102,7 +93,7 @@ /* Only the current stack state is to be checked. */ #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \ { \ - extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ + extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ \ /* Is the currently saved stack pointer within the stack limit? */ \ if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \ @@ -111,7 +102,7 @@ } \ } -#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */ +#endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */ /*-----------------------------------------------------------*/ #if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) ) @@ -119,7 +110,7 @@ /* Only the current stack state is to be checked. */ #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \ { \ - extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ + extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ \ /* Is the currently saved stack pointer within the stack limit? */ \ if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \ @@ -135,8 +126,8 @@ #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ { \ - extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ - static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ + extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ + static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ @@ -157,9 +148,9 @@ #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ { \ - extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ - char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \ - static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ + extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ + char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \ + static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/croutine.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/croutine.h old mode 100644 new mode 100755 index a6d3f0ddd..64c64a754 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/croutine.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/croutine.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -52,17 +52,10 @@ */ #ifndef INC_FREERTOS_H - #error "#include FreeRTOS.h" must appear in source files before "#include croutine.h" + #error "include FreeRTOS.h must appear in source files before include croutine.h" #endif -/** - * @file croutine.h - * @author FreeRTOS - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - */ + #ifndef CO_ROUTINE_H @@ -126,7 +119,7 @@ typedef struct corCoRoutineControlBlock // Variables in co-routines must be declared static if they must maintain value across a blocking call. // This may not be necessary for const variables. static const char cLedToFlash[ 2 ] = { 5, 6 }; - static const portTickType xTimeToDelay[ 2 ] = { 200, 400 }; + static const portTickType uxFlashRates[ 2 ] = { 200, 400 }; // Must start every co-routine with a call to crSTART(); crSTART( xHandle ); diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/list.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/list.h old mode 100644 new mode 100755 index b337ec22d..5a09fd1d6 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/list.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/list.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/mpu_wrappers.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/mpu_wrappers.h old mode 100644 new mode 100755 index 6f13f5af3..6f5287fd2 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/mpu_wrappers.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/mpu_wrappers.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -59,7 +59,7 @@ only for ports that are using the MPU. */ #ifdef portUSING_MPU_WRAPPERS /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is - included from queue.c or task.c to prevent it from having an effict within + included from queue.c or task.c to prevent it from having an effect within those files. */ #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/portable.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/portable.h old mode 100644 new mode 100755 index 5ec907c4a..b4f37f336 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/portable.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/portable.h @@ -1,14 +1,5 @@ -/** - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - * @file portable.h - * @author FreeRTOS - */ - /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -19,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -67,7 +58,6 @@ #ifndef PORTABLE_H #define PORTABLE_H - /* Include the macro file relevant to the port being used. */ #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/projdefs.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/projdefs.h old mode 100644 new mode 100755 index 05a1fd41e..d00d6195d --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/projdefs.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/projdefs.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/queue.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/queue.h old mode 100644 new mode 100755 index b8c6e43ef..53790f676 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/queue.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/queue.h @@ -1,14 +1,5 @@ -/** - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - * @file queue.h - * @author FreeRTOS - */ - /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -19,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -65,6 +56,8 @@ #endif + + #ifndef QUEUE_H #define QUEUE_H diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/semphr.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/semphr.h old mode 100644 new mode 100755 index 87b71b4b8..8674096ad --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/semphr.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/semphr.h @@ -1,14 +1,5 @@ -/** - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - * @file tasks.c - * @author FreeRTOS - */ - /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -19,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -67,8 +58,6 @@ #ifndef SEMAPHORE_H #define SEMAPHORE_H - - #include "queue.h" typedef xQueueHandle xSemaphoreHandle; @@ -126,7 +115,7 @@ typedef xQueueHandle xSemaphoreHandle; /** * semphr. h - * xSemaphoreTake( + *
xSemaphoreTake( * xSemaphoreHandle xSemaphore, * portTickType xBlockTime * )@@ -465,7 +454,7 @@ typedef xQueueHandle xSemaphoreHandle; *
xSemaphoreGiveFromISR( xSemaphoreHandle xSemaphore, - portBASE_TYPE *pxHigherPriorityTaskWoken + signed portBASE_TYPE *pxHigherPriorityTaskWoken )* * Macro to release a semaphore. The semaphore must have previously been @@ -489,8 +478,8 @@ typedef xQueueHandle xSemaphoreHandle; * * Example usage:
- #define LONG_TIME 0xffff - #define TICKS_TO_WAIT 10 + \#define LONG_TIME 0xffff + \#define TICKS_TO_WAIT 10 xSemaphoreHandle xSemaphore = NULL; // Repetitive task. @@ -520,7 +509,7 @@ typedef xQueueHandle xSemaphoreHandle; void vTimerISR( void * pvParameters ) { static unsigned char ucLocalTickCount = 0; - static portBASE_TYPE xHigherPriorityTaskWoken; + static signed portBASE_TYPE xHigherPriorityTaskWoken; // A timer tick has occurred. @@ -720,7 +709,3 @@ typedef xQueueHandle xSemaphoreHandle; #endif /* SEMAPHORE_H */ -/** - * @} - * @} - */ \ No newline at end of file diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/task.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/task.h old mode 100644 new mode 100755 index 753ac3f76..1f29ef46f --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/task.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/include/task.h @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -33,9 +33,9 @@ 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. See the GNU General Public License for - more details. You should have received a copy of the GNU General Public - License and the FreeRTOS license exception along with FreeRTOS; if not it - can be viewed here: http://www.freertos.org/a00114.html and also obtained + more details. You should have received a copy of the GNU General Public + License and the FreeRTOS license exception along with FreeRTOS; if not it + can be viewed here: http://www.freertos.org/a00114.html and also obtained by writing to Richard Barry, contact details for whom are available on the FreeRTOS WEB site. @@ -53,16 +53,9 @@ #ifndef INC_FREERTOS_H - #error "#include FreeRTOS.h" must appear in source files before "#include task.h" + #error "include FreeRTOS.h must appear in source files before include task.h" #endif -/** - * @author FreeRTOS - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - */ #ifndef TASK_H @@ -79,7 +72,7 @@ extern "C" { * MACROS AND DEFINITIONS *----------------------------------------------------------*/ -#define tskKERNEL_VERSION_NUMBER "V6.0.0" +#define tskKERNEL_VERSION_NUMBER "V6.1.1" /** * task. h @@ -213,10 +206,10 @@ typedef struct xTASK_PARAMTERS );* * Create a new task and add it to the list of tasks that are ready to run. - * + * * xTaskCreate() can only be used to create a task that has unrestricted * access to the entire microcontroller memory map. Systems that include MPU - * support can alternatively create an MPU constrained task using + * support can alternatively create an MPU constrained task using * xTaskCreateRestricted(). * * @param pvTaskCode Pointer to the task entry function. Tasks @@ -281,7 +274,7 @@ typedef struct xTASK_PARAMTERS /** * task. h *
- portBASE_TYPE xTaskCreateRestricted( xTaskParameters *pxTaskDefinition, xTaskHandle pxCreatedTask );+ portBASE_TYPE xTaskCreateRestricted( xTaskParameters *pxTaskDefinition, xTaskHandle *pxCreatedTask ); * * xTaskCreateRestricted() should only be used in systems that include an MPU * implementation. @@ -292,13 +285,9 @@ typedef struct xTASK_PARAMTERS * * @param pxTaskDefinition Pointer to a structure that contains a member * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API - * documentation) plus an optional stack buffer and the memory region + * documentation) plus an optional stack buffer and the memory region * definitions. * - * @param pcName A descriptive name for the task. This is mainly used to - * facilitate debugging. Max length defined by tskMAX_TASK_NAME_LEN - default - * is 16. - * * @param pxCreatedTask Used to pass back a handle by which the created task * can be referenced. * @@ -359,7 +348,7 @@ xTaskHandle xHandle; * Memory regions are assigned to a restricted task when the task is created by * a call to xTaskCreateRestricted(). These regions can be redefined using * vTaskAllocateMPURegions(). - * + * * @param xTask The handle of the task being updated. * * @param xRegions A pointer to an xMemoryRegion structure that contains the @@ -382,7 +371,7 @@ static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = void vATask( void *pvParameters ) { // This task was created such that it has access to certain regions of - // memory as defined by the MPU configuration. At some point it is + // memory as defined by the MPU configuration. At some point it is // desired that these MPU regions are replaced with that defined in the // xAltRegions const struct above. Use a call to vTaskAllocateMPURegions() // for this purpose. NULL is used as the task handle to indicate that this @@ -974,7 +963,7 @@ signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ) PRIVILEGED_FUNCTI /** * task. h - *
volatile portTickType xTaskGetTickCount( void );+ *
portTickType xTaskGetTickCount( void );* * @return The count of ticks since vTaskStartScheduler was called. * @@ -983,6 +972,22 @@ signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ) PRIVILEGED_FUNCTI */ portTickType xTaskGetTickCount( void ) PRIVILEGED_FUNCTION; +/** + * task. h + *
portTickType xTaskGetTickCountFromISR( void );+ * + * @return The count of ticks since vTaskStartScheduler was called. + * + * This is a version of xTaskGetTickCount() that is safe to be called from an + * ISR - provided that portTickType is the natural word size of the + * microcontroller being used or interrupt nesting is either not supported or + * not being used. + * + * \page xTaskGetTickCount xTaskGetTickCount + * \ingroup TaskUtils + */ +portTickType xTaskGetTickCountFromISR( void ) PRIVILEGED_FUNCTION; + /** * task. h *
unsigned short uxTaskGetNumberOfTasks( void );@@ -1097,9 +1102,9 @@ unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION; * this function to be available. * * Returns the high water mark of the stack associated with xTask. That is, - * the minimum free stack space there has been (in bytes) since the task - * started. The smaller the returned number the closer the task has come - * to overflowing its stack. + * the minimum free stack space there has been (in words, so on a 32 bit machine + * a value of 1 means 4 bytes) since the task started. The smaller the returned + * number the closer the task has come to overflowing its stack. * * @param xTask Handle of the task associated with the stack to be checked. * Set xTask to NULL to check the stack of the calling task. @@ -1109,23 +1114,33 @@ unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION; */ unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask ) PRIVILEGED_FUNCTION; -/** - * task.h - *
void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );- * - * Sets pxHookFunction to be the task hook function used by the task xTask. - * Passing xTask as NULL has the effect of setting the calling tasks hook - * function. - */ -void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction ) PRIVILEGED_FUNCTION; +/* When using trace macros it is sometimes necessary to include tasks.h before +FreeRTOS.h. When this is done pdTASK_HOOK_CODE will not yet have been defined, +so the following two prototypes will cause a compilation error. This can be +fixed by simply guarding against the inclusion of these two prototypes unless +they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration +constant. */ +#ifdef configUSE_APPLICATION_TASK_TAG + #if configUSE_APPLICATION_TASK_TAG == 1 + /** + * task.h + *
void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );+ * + * Sets pxHookFunction to be the task hook function used by the task xTask. + * Passing xTask as NULL has the effect of setting the calling tasks hook + * function. + */ + void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction ) PRIVILEGED_FUNCTION; -/** - * task.h - *
void xTaskGetApplicationTaskTag( xTaskHandle xTask );- * - * Returns the pxHookFunction value assigned to the task xTask. - */ -pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( xTaskHandle xTask ) PRIVILEGED_FUNCTION; + /** + * task.h + *
void xTaskGetApplicationTaskTag( xTaskHandle xTask );+ * + * Returns the pxHookFunction value assigned to the task xTask. + */ + pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( xTaskHandle xTask ) PRIVILEGED_FUNCTION; + #endif /* configUSE_APPLICATION_TASK_TAG ==1 */ +#endif /* ifdef configUSE_APPLICATION_TASK_TAG */ /** * task.h @@ -1261,7 +1276,7 @@ void vTaskPriorityDisinherit( xTaskHandle * const pxMutexHolder ) PRIVILEGED_FUN /* * Generic version of the task creation function which is in turn called by the - * xTaskCreate() and xTaskCreateProtected() macros. + * xTaskCreate() and xTaskCreateRestricted() macros. */ signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION; diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/list.c b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/list.c old mode 100644 new mode 100755 index 76598be1d..a800c030a --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/list.c +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/list.c @@ -1,5 +1,5 @@ /* - FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd. + FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd. *************************************************************************** * * @@ -10,7 +10,7 @@ * + Looking for basic training, * * + Wanting to improve your FreeRTOS skills and productivity * * * - * then take a look at the FreeRTOS eBook * + * then take a look at the FreeRTOS books - available as PDF or paperback * * * * "Using the FreeRTOS Real Time Kernel - a Practical Guide" * * http://www.FreeRTOS.org/Documentation * @@ -51,14 +51,6 @@ licensing and training services. */ -/** - * @file list.c - * @author FreeRTOS - * @addtogroup PIOS PIOS Core hardware abstraction layer - * @{ - * @addtogroup FreeRTOS FreeRTOS Operating system - * @{ - */ #include