From 758848cd92bc5b99ef94165052f0f537833ce1d7 Mon Sep 17 00:00:00 2001 From: rtel Date: Fri, 27 Dec 2013 14:43:48 +0000 Subject: [PATCH] Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2143 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c | 72 +++---- .../RTOSDemo/webserver/httpd-cgi.c | 22 +- FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c | 78 +++---- FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c | 14 +- .../Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c | 64 +++--- .../RTOSDemo/webserver/httpd-cgi.c | 24 +-- FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c | 20 +- .../ARM7_LPC2368_Rowley/webserver/httpd-cgi.c | 24 +-- FreeRTOS/Demo/ARM7_STR75x_GCC/main.c | 66 +++--- FreeRTOS/Demo/ARM7_STR75x_IAR/main.c | 66 +++--- .../Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c | 16 +- .../ARM9_STR91X_IAR/lwip/netif/ethernetif.c | 28 +-- .../ARM9_STR91X_IAR/webserver/httpd-cgi.c | 20 +- FreeRTOS/Demo/AVR32_UC3/main.c | 6 +- FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c | 46 ++-- FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c | 12 +- .../WebServer/httpd-cgi.c | 14 +- .../CORTEX_A2F200_IAR_and_Keil/main-blinky.c | 16 +- .../CORTEX_A2F200_IAR_and_Keil/main-full.c | 28 +-- .../CORTEX_A2F200_IAR_and_Keil/uIP_Task.c | 4 +- .../WebServer/httpd-cgi.c | 14 +- .../CORTEX_A2F200_SoftConsole/main-blinky.c | 16 +- .../CORTEX_A2F200_SoftConsole/main-full.c | 50 ++--- .../Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c | 12 +- .../Source/Blinky-Demo/main_blinky.c | 18 +- .../Source/Full-Demo/Sample-CLI-commands.c | 14 +- .../Source/Full-Demo/main_full.c | 8 +- FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c | 28 +-- .../src/Common-Demo-Source/comtest.c | 6 +- .../src/main_blinky.c | 8 +- .../src/main_full.c | 54 ++--- .../src/Common-Demo-Source/comtest.c | 6 +- .../src/main_blinky.c | 8 +- .../src/main_full.c | 54 ++--- .../FreeRTOS_Demo.cydsn/main.c | 40 ++-- .../FreeRTOS_Demo.cydsn/main.c | 40 ++-- .../FreeRTOS_Demo.cydsn/main.c | 40 ++-- .../CORTEX_Kinetis_K60_Tower_IAR/main-full.c | 152 ++++++------- .../main_blinky.c | 54 ++--- .../CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c | 12 +- .../webserver/httpd-cgi.c | 10 +- .../CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c | 8 +- .../RTOSDemo/webserver/emac.c | 46 ++-- .../RTOSDemo/webserver/httpd-cgi.c | 8 +- FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c | 6 +- .../CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c | 48 ++--- .../webserver/httpd-cgi.c | 4 +- FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c | 6 +- .../CORTEX_LM3Sxxxx_Rowley/webserver/emac.c | 4 +- .../webserver/httpd-cgi.c | 8 +- .../CORTEX_LPC1768_GCC_RedSuite/src/main.c | 46 ++-- .../src/webserver/httpd-cgi.c | 8 +- .../Demo/CORTEX_LPC1768_GCC_Rowley/main.c | 10 +- .../webserver/httpd-cgi.c | 8 +- FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c | 72 +++---- .../CORTEX_LPC1768_IAR/webserver/httpd-cgi.c | 8 +- .../RTOSDemo/src/Sample-CLI-commands.c | 12 +- .../RTOSDemo/src/UARTCommandConsole.c | 2 +- .../RTOSDemo/src/main-blinky.c | 4 +- .../RTOSDemo/src/main-full.c | 6 +- .../main-blinky.c | 6 +- .../main-full.c | 26 +-- .../RTOSDemo/Source/main-blinky.c | 8 +- .../RTOSDemo/Source/main-full.c | 16 +- .../CORTEX_M0_STM32F0518_IAR/main-blinky.c | 6 +- .../Demo/CORTEX_M0_STM32F0518_IAR/main-full.c | 30 +-- .../main_blinky.c | 6 +- .../main_full.c | 38 ++-- .../CORTEX_M4F_Infineon_XMC4000_IAR/main.c | 4 +- .../main_blinky.c | 6 +- .../main_full.c | 8 +- .../main_blinky.c | 6 +- .../main_full.c | 38 ++-- .../main_blinky.c | 6 +- .../main_full.c | 22 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 6 +- .../CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c | 14 +- .../Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c | 40 ++-- .../Demo/CORTEX_M4F_STM32F407ZG-SK/main.c | 72 +++---- .../src/main_blinky.c | 24 +-- .../src/main_full.c | 12 +- .../src/main_full.c | 12 +- .../src/main_low_power.c | 6 +- .../src/Common-Demo-Source/comtest.c | 6 +- .../src/main_blinky.c | 8 +- .../src/main_full.c | 12 +- .../Demo/CORTEX_MB9A310_IAR_Keil/main-full.c | 64 +++--- .../CORTEX_MB9A310_IAR_Keil/main_blinky.c | 30 +-- .../Demo/CORTEX_MB9B500_IAR_Keil/main-full.c | 62 +++--- .../CORTEX_MB9B500_IAR_Keil/main_blinky.c | 30 +-- .../Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c | 12 +- .../src/main.c | 202 +++++++++--------- .../flop_hercules.c | 74 +++---- .../CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c | 8 +- .../CORTEX_R4_RM48_TMS570_CCS5/main_full.c | 44 ++-- .../Simple_Demo_Source/main.c | 82 +++---- .../Demo/CORTEX_STM32F103_GCC_Rowley/main.c | 58 ++--- FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c | 30 +-- FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c | 30 +-- .../Demo/CORTEX_STM32F103_Primer_GCC/main.c | 30 +-- .../Demo/CORTEX_STM32F107_GCC_Rowley/main.c | 6 +- .../webserver/httpd-cgi.c | 8 +- .../main_full.c | 10 +- .../main_low_power.c | 4 +- FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c | 72 +++---- .../RTOSDemo/Blinky-Demo/main_blinky.c | 6 +- .../RTOSDemo/Full-Demo/Sample-CLI-commands.c | 14 +- .../RTOSDemo/Full-Demo/UARTCommandConsole.c | 14 +- .../RTOSDemo/Full-Demo/main_full.c | 12 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c | 6 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c | 6 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c | 4 +- .../Sources/httpd/httpd-cgi.c | 6 +- .../Sources/main.c | 40 ++-- .../sources/main.c | 12 +- .../ColdFire_MCF52233_Eclipse/RTOSDemo/main.c | 12 +- .../RTOSDemo/webserver/httpd-cgi.c | 6 +- .../ColdFire_MCF52259_CodeWarrior/HTTPDemo.c | 14 +- .../Demo/ColdFire_MCF52259_CodeWarrior/main.c | 8 +- .../ColdFire_MCF5282_Eclipse/RTOSDemo/main.c | 8 +- FreeRTOS/Demo/Common/Minimal/AltBlckQ.c | 12 +- FreeRTOS/Demo/Common/Minimal/AltBlock.c | 6 +- FreeRTOS/Demo/Common/Minimal/AltPollQ.c | 6 +- FreeRTOS/Demo/Common/Minimal/AltQTest.c | 12 +- FreeRTOS/Demo/Common/Minimal/BlockQ.c | 12 +- .../Demo/Common/Minimal/EventGroupsDemo.c | 8 +- FreeRTOS/Demo/Common/Minimal/GenQTest.c | 12 +- FreeRTOS/Demo/Common/Minimal/IntQueue.c | 16 +- FreeRTOS/Demo/Common/Minimal/PollQ.c | 6 +- FreeRTOS/Demo/Common/Minimal/QPeek.c | 10 +- FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c | 2 +- FreeRTOS/Demo/Common/Minimal/QueueSet.c | 4 +- FreeRTOS/Demo/Common/Minimal/TimerDemo.c | 28 +-- FreeRTOS/Demo/Common/Minimal/blocktim.c | 6 +- FreeRTOS/Demo/Common/Minimal/comtest.c | 8 +- .../Demo/Common/Minimal/comtest_strings.c | 30 +-- FreeRTOS/Demo/Common/Minimal/countsem.c | 8 +- FreeRTOS/Demo/Common/Minimal/death.c | 6 +- FreeRTOS/Demo/Common/Minimal/dynamic.c | 12 +- FreeRTOS/Demo/Common/Minimal/flash.c | 2 +- FreeRTOS/Demo/Common/Minimal/flash_timer.c | 12 +- FreeRTOS/Demo/Common/Minimal/flop.c | 8 +- FreeRTOS/Demo/Common/Minimal/integer.c | 2 +- FreeRTOS/Demo/Common/Minimal/recmutex.c | 8 +- FreeRTOS/Demo/Common/Minimal/semtest.c | 12 +- FreeRTOS/Demo/Common/Minimal/sp_flop.c | 16 +- .../FreeRTOS/ColdFire/MCF5225x_ethernetif.c | 2 +- .../port/FreeRTOS/ColdFire/__sys_arch.c | 8 +- .../lwIP_130/contrib/port/FreeRTOS/sys_arch.c | 44 ++-- .../lwIP_130/src/netif/stf91x_ethernetif.c | 2 +- .../ports/MicroBlaze-Ethernet-Lite/sys_arch.c | 10 +- .../lwip-1.4.0/ports/win32/WinPCap/arch.c | 2 +- .../lwip-1.4.0/ports/win32/ethernetif.c | 2 +- .../lwip-1.4.0/ports/win32/sys_arch.c | 16 +- FreeRTOS/Demo/H8S/RTOSDemo/main.c | 64 +++--- FreeRTOS/Demo/MB91460_Softune/SRC/main.c | 104 ++++----- .../MB91460_Softune/SRC/utility/taskutility.c | 6 +- .../MB91460_Softune/SRC/watchdog/watchdog.c | 22 +- .../FreeRTOS_96348hs_SK16FX100PMC/Src/main.c | 46 ++-- .../Src/utility/taskutility.c | 6 +- .../Src/watchdog/watchdog.c | 2 +- .../SegmentToggleTasks.c | 8 +- FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c | 32 +-- FreeRTOS/Demo/MCF5235_GCC/demo.c | 10 +- .../Demo_Source/main.c | 10 +- FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c | 60 +++--- .../FreeRTOS_Hello_World/src/FreeRTOS-main.c | 16 +- .../RTOSDemo/lwIP/lwIP_Apps/lwIP_Apps.c | 14 +- .../SDKProjects/RTOSDemo/main-blinky.c | 56 ++--- .../SDKProjects/RTOSDemo/main-full.c | 108 +++++----- FreeRTOS/Demo/PIC18_MPLAB/main1.c | 40 ++-- FreeRTOS/Demo/PIC18_MPLAB/main2.c | 28 +-- FreeRTOS/Demo/PIC18_MPLAB/main3.c | 34 +-- FreeRTOS/Demo/PIC18_WizC/Demo2/main.c | 32 +-- FreeRTOS/Demo/PIC18_WizC/Demo3/main.c | 30 +-- FreeRTOS/Demo/PIC18_WizC/Demo4/main.c | 30 +-- FreeRTOS/Demo/PIC18_WizC/Demo5/main.c | 32 +-- FreeRTOS/Demo/PIC18_WizC/Demo6/main.c | 28 +-- FreeRTOS/Demo/PIC18_WizC/Demo7/main.c | 32 +-- FreeRTOS/Demo/PIC24_MPLAB/lcd.c | 2 +- FreeRTOS/Demo/PIC24_MPLAB/main.c | 2 +- FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c | 2 +- FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c | 26 +-- FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c | 94 ++++---- .../Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c | 12 +- FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c | 14 +- FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c | 18 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop.c | 16 +- .../RTOSDemo/main.c | 6 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop.c | 16 +- .../PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c | 6 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop.c | 16 +- .../RTOSDemo/main.c | 6 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop.c | 16 +- .../RTOSDemo/main.c | 6 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop.c | 16 +- .../PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c | 6 +- .../src/Common-Demo-Tasks/blocktim.c | 16 +- .../src/FreeRTOS_Source/timers.c | 4 +- .../Demo/RL78_E2Studio_GCC/src/main_full.c | 34 +-- .../Demo/RL78_RL78G13_Promo_Board_IAR/main.c | 4 +- FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c | 18 +- FreeRTOS/Demo/RL78_multiple_IAR/main_full.c | 18 +- .../RTOSDemo/main_full.c | 2 +- FreeRTOS/Demo/RX100-RSK_IAR/main_full.c | 2 +- .../RTOSDemo/main_full.c | 2 +- .../RTOSDemo/main-full.c | 2 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 8 +- .../RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c | 24 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../RX600_RX62N-RDK_IAR/webserver/httpd-cgi.c | 14 +- .../RTOSDemo/uIP_Task.c | 24 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 8 +- .../RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c | 24 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../RX600_RX62N-RSK_IAR/webserver/httpd-cgi.c | 14 +- .../RTOSDemo/uIP_Task.c | 24 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../RTOSDemo/main-full.c | 2 +- .../RTOSDemo/uIP_Task.c | 24 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../RTOSDemo/uIP_Task.c | 34 +-- .../RTOSDemo/webserver/httpd-cgi.c | 14 +- .../SuperH_SH7216_Renesas/RTOSDemo/flop.c | 16 +- .../RTOSDemo/webserver/httpd-cgi.c | 12 +- .../RTOSDemo/InterruptNestTest.c | 2 +- .../RTOSDemo/main.c | 6 +- .../WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c | 6 +- FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c | 4 +- .../DemosModifiedForLowTickRate/recmutex.c | 8 +- FreeRTOS/Demo/WIN32-MSVC/main.c | 11 +- FreeRTOS/Demo/WIN32-MSVC/main_blinky.c | 38 ++-- FreeRTOS/Demo/WIN32-MSVC/main_full.c | 58 ++--- .../DemosModifiedForLowTickRate/recmutex.c | 8 +- FreeRTOS/Demo/WIN32-MingW/main.c | 20 +- FreeRTOS/Demo/WIN32-MingW/main_blinky.c | 4 +- FreeRTOS/Demo/WIN32-MingW/main_full.c | 8 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c | 32 +-- FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c | 24 +-- FreeRTOS/Demo/dsPIC_MPLAB/lcd.c | 98 ++++----- FreeRTOS/Demo/dsPIC_MPLAB/main.c | 36 ++-- .../NETWORK/BasicWEB/BasicWEB.c | 2 +- .../NETWORK/lwip-port/AT32UC3A/ethernetif.c | 2 +- .../NETWORK/lwip-port/AT32UC3A/sys_arch.c | 28 +-- .../Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c | 28 +-- .../port/FreeRTOS/AT91SAM7X/sys_arch.c | 66 +++--- .../lwip-1.1.0/src/netif/ethernetif.c | 62 +++--- FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c | 32 +-- FreeRTOS/Demo/lwIP_MCF5235_GCC/demo.c | 10 +- FreeRTOS/Demo/lwIP_MCF5235_GCC/web.c | 8 +- FreeRTOS/Demo/msp430_CrossWorks/main.c | 48 ++--- FreeRTOS/Demo/msp430_IAR/main.c | 6 +- 261 files changed, 2824 insertions(+), 2817 deletions(-) diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c index fde25852d..278ac2196 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -63,9 +63,9 @@ 1 tab == 4 spaces! */ -/* +/* NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used. @@ -75,21 +75,21 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * - * Main.c also creates a task called "Check". This only executes every three - * seconds but has the highest priority so is guaranteed to get processor time. + * + * Main.c also creates a task called "Check". This only executes every three + * seconds but has the highest priority so is guaranteed to get processor time. * Its main function is to check that all the other tasks are still operational. - * Each task (other than the "flash" tasks) maintains a unique count that is - * incremented each time the task successfully completes its function. Should - * any error occur within such a task the count is permanently halted. The + * Each task (other than the "flash" tasks) maintains a unique count that is + * incremented each time the task successfully completes its function. Should + * any error occur within such a task the count is permanently halted. The * check task inspects the count of each task to ensure it has changed since - * the last time the check task executed. If all the count variables have + * the last time the check task executed. If all the count variables have * changed all the tasks are still executing error free, and the check task - * toggles the onboard LED. Should any task contain an error at any time + * toggles the onboard LED. Should any task contain an error at any time * the LED toggle rate will change from 3 seconds to 500ms. * - * To check the operation of the memory allocator the check task also - * dynamically creates a task before delaying, and deletes it again when it + * To check the operation of the memory allocator the check task also + * dynamically creates a task before delaying, and deletes it again when it * wakes. If memory cannot be allocated for the new task the call to xTaskCreate * will fail and an error is signalled. The dynamically created task itself * allocates and frees memory just to give the allocator a bit more exercise. @@ -134,7 +134,7 @@ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) -/* The rate at which the on board LED will toggle when there is/is not an +/* The rate at which the on board LED will toggle when there is/is not an error. */ #define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) #define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) @@ -171,7 +171,7 @@ static const unsigned long ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] = static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ); /* - * The task that executes at the highest priority and calls + * The task that executes at the highest priority and calls * prvCheckOtherTasksAreStillRunning(). See the description at the top * of the file. */ @@ -193,7 +193,7 @@ static void prvSetupHardware( void ); /*-----------------------------------------------------------*/ /* - * Starts all the other tasks, then starts the scheduler. + * Starts all the other tasks, then starts the scheduler. */ int main( void ) { @@ -207,16 +207,16 @@ int main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); - vStartDynamicPriorityTasks(); + vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used here. */ @@ -239,24 +239,24 @@ xTaskHandle xCreatedTask; /* Cycle for ever, delaying then checking all the other tasks are still operating without error. If an error is detected then the delay period is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so - the on board LED flash rate will increase. - + the on board LED flash rate will increase. + In addition to the standard tests the memory allocator is tested through - the dynamic creation and deletion of a task each cycle. Each time the + the dynamic creation and deletion of a task each cycle. Each time the task is created memory must be allocated for its stack. When the task is - deleted this memory is returned to the heap. If the task cannot be created + deleted this memory is returned to the heap. If the task cannot be created then it is likely that the memory allocation failed. */ for( ;; ) { - /* Reset xCreatedTask. This is modified by the task about to be + /* Reset xCreatedTask. This is modified by the task about to be created so we can tell if it is executing correctly or not. */ xCreatedTask = mainNO_TASK; - /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a + /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a parameter. */ - ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; - if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) + ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; + if( xTaskCreate( vMemCheckTask, "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { /* Could not create the task - we have probably run out of heap. */ xDelayPeriod = mainERROR_FLASH_PERIOD; @@ -271,7 +271,7 @@ xTaskHandle xCreatedTask; vTaskDelete( xCreatedTask ); } - /* Check all the standard demo application tasks are executing without + /* Check all the standard demo application tasks are executing without error. ulMemCheckTaskRunningCount is checked to ensure it was modified by the task just deleted. */ if( prvCheckOtherTasksAreStillRunning( ulMemCheckTaskRunningCount ) != pdPASS ) @@ -323,7 +323,7 @@ long lCount; ulCSRWaitValue = WaitState5; AT91C_BASE_EBI->EBI_CSR[ 0 ] = ulCSRWaitValue | DataBus16 | WaitStateEnable - | PageSize1M | tDF_0cycle + | PageSize1M | tDF_0cycle | ByteWriteAccessType | CSEnable | 0x00000000 /* Base Address */; } @@ -352,7 +352,7 @@ long lCount; /* Clear all interrupts at the AIC level initially... */ AT91C_BASE_AIC->AIC_ICCR = 0xFFFFFFFF; - /* Perform 8 "End Of Interrupt" cmds to make sure AIC will not Lock out + /* Perform 8 "End Of Interrupt" cmds to make sure AIC will not Lock out nIRQ */ for( lCount = 0; lCount < 8; lCount++ ) { @@ -428,10 +428,10 @@ static long lErrorOccurred = pdFALSE; vErrorChecks task to check the operation of the memory allocator. Each time the task is created memory is allocated for the stack and TCB. Each time the task is deleted this memory is returned to the heap. This task itself - exercises the allocator by allocating and freeing blocks. - - The task executes at the idle priority so does not require a delay. - + exercises the allocator by allocating and freeing blocks. + + The task executes at the idle priority so does not require a delay. + pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the vErrorChecks() task that this task is still executing without error. */ @@ -446,12 +446,12 @@ static long lErrorOccurred = pdFALSE; } else { - /* There has been an error so reset the counter so the check task + /* There has been an error so reset the counter so the check task can tell that an error occurred. */ *pulMemCheckTaskRunningCounter = mainCOUNT_INITIAL_VALUE; } - /* Allocate some memory - just to give the allocator some extra + /* Allocate some memory - just to give the allocator some extra exercise. This has to be in a critical section to ensure the task does not get deleted while it has memory allocated. */ vTaskSuspendAll(); diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c index 43b7afba2..14bf2c8ef 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c @@ -98,7 +98,7 @@ PT_THREAD(file_stats(struct httpd_state *s, char *ptr)) PSOCK_BEGIN(&s->sout); PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1); - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -139,14 +139,14 @@ static const char *states[] = { closing, time_wait, last_ack}; - + static unsigned short generate_tcp_stats(void *arg) { struct uip_conn *conn; struct httpd_state *s = (struct httpd_state *)arg; - + conn = &uip_conns[s->count]; return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE, "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", @@ -166,7 +166,7 @@ generate_tcp_stats(void *arg) static PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr)) { - + PSOCK_BEGIN(&s->sout); for(s->count = 0; s->count < UIP_CONNS; ++s->count) { @@ -197,14 +197,14 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) ++s->count) { PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s); } - + #endif /* UIP_STATISTICS */ - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -212,9 +212,9 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %ld", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); - + return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ @@ -224,7 +224,7 @@ static PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr)) { PSOCK_BEGIN(&s->sout); - PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); + PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -247,7 +247,7 @@ static unsigned short generate_io_state( void *arg ) sprintf( uip_appdata, "LED DS4,"\ "

", - pcStatus ); + pcStatus ); return strlen( uip_appdata ); } diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c index 4acb43e0e..f7ef6102d 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -63,9 +63,9 @@ 1 tab == 4 spaces! */ -/* +/* NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used. @@ -75,36 +75,36 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * - * Main.c also creates a task called "Check". This only executes every three - * seconds but has the highest priority so is guaranteed to get processor time. + * + * Main.c also creates a task called "Check". This only executes every three + * seconds but has the highest priority so is guaranteed to get processor time. * Its main function is to check that all the other tasks are still operational. - * Each task (other than the "flash" tasks) maintains a unique count that is - * incremented each time the task successfully completes its function. Should - * any error occur within such a task the count is permanently halted. The + * Each task (other than the "flash" tasks) maintains a unique count that is + * incremented each time the task successfully completes its function. Should + * any error occur within such a task the count is permanently halted. The * check task inspects the count of each task to ensure it has changed since - * the last time the check task executed. If all the count variables have + * the last time the check task executed. If all the count variables have * changed all the tasks are still executing error free, and the check task - * toggles the onboard LED. Should any task contain an error at any time + * toggles the onboard LED. Should any task contain an error at any time * the LED toggle rate will change from 3 seconds to 500ms. * - * To check the operation of the memory allocator the check task also - * dynamically creates a task before delaying, and deletes it again when it + * To check the operation of the memory allocator the check task also + * dynamically creates a task before delaying, and deletes it again when it * wakes. If memory cannot be allocated for the new task the call to xTaskCreate * will fail and an error is signalled. The dynamically created task itself * allocates and frees memory just to give the allocator a bit more exercise. * */ -/* +/* Changes from V2.4.2 + The vErrorChecks() task now dynamically creates then deletes a task each cycle. This tests the operation of the memory allocator. Changes from V2.5.2 - - + vParTestInitialise() is called during initialisation to ensure all the + + + vParTestInitialise() is called during initialisation to ensure all the LED's start off. */ @@ -165,7 +165,7 @@ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 0 ) #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) -/* The rate at which the on board LED will toggle when there is/is not an +/* The rate at which the on board LED will toggle when there is/is not an error. */ #define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) #define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) @@ -184,7 +184,7 @@ error. */ /* * The Olimex demo board has a single built in LED. This function simply - * toggles its state. + * toggles its state. */ void prvToggleOnBoardLED( void ); @@ -195,7 +195,7 @@ void prvToggleOnBoardLED( void ); static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ); /* - * The task that executes at the highest priority and calls + * The task that executes at the highest priority and calls * prvCheckOtherTasksAreStillRunning(). See the description at the top * of the file. */ @@ -217,7 +217,7 @@ static void prvSetupHardware( void ); /*-----------------------------------------------------------*/ /* - * Starts all the other tasks, then starts the scheduler. + * Starts all the other tasks, then starts the scheduler. */ int main( void ) { @@ -235,12 +235,12 @@ int main( void ) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used here. */ @@ -263,22 +263,22 @@ xTaskHandle xCreatedTask; /* Cycle for ever, delaying then checking all the other tasks are still operating without error. If an error is detected then the delay period is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so - the on board LED flash rate will increase. - + the on board LED flash rate will increase. + In addition to the standard tests the memory allocator is tested through - the dynamic creation and deletion of a task each cycle. Each time the + the dynamic creation and deletion of a task each cycle. Each time the task is created memory must be allocated for its stack. When the task is - deleted this memory is returned to the heap. If the task cannot be created + deleted this memory is returned to the heap. If the task cannot be created then it is likely that the memory allocation failed. */ for( ;; ) { - /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a + /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a parameter. */ ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; xCreatedTask = mainNO_TASK; - if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) + if( xTaskCreate( vMemCheckTask, "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { /* Could not create the task - we have probably run out of heap. */ xDelayPeriod = mainERROR_FLASH_PERIOD; @@ -286,14 +286,14 @@ xTaskHandle xCreatedTask; /* Delay until it is time to execute again. */ vTaskDelay( xDelayPeriod ); - + /* Delete the dynamically created task. */ if( xCreatedTask != mainNO_TASK ) { vTaskDelete( xCreatedTask ); } - /* Check all the standard demo application tasks are executing without + /* Check all the standard demo application tasks are executing without error. ulMemCheckTaskRunningCount is checked to ensure it was modified by the task just deleted. */ if( prvCheckOtherTasksAreStillRunning( ulMemCheckTaskRunningCount ) != pdPASS ) @@ -318,8 +318,8 @@ static void prvSetupHardware( void ) PCB_PINSEL0 |= mainTX_ENABLE; PCB_PINSEL0 |= mainRX_ENABLE; - /* Set all GPIO to output other than the P0.14 (BSL), and the JTAG pins. - The JTAG pins are left as input as I'm not sure what will happen if the + /* Set all GPIO to output other than the P0.14 (BSL), and the JTAG pins. + The JTAG pins are left as input as I'm not sure what will happen if the Wiggler is connected after powerup - not that it would be a good idea to do that anyway. */ GPIO_IODIR = ~( mainP0_14 + mainJTAG_PORT ); @@ -349,7 +349,7 @@ static void prvSetupHardware( void ) /* Setup the peripheral bus to be the same as the PLL output. */ SCB_VPBDIV = mainBUS_CLK_FULL; - + /* Initialise LED outputs. */ vParTestInitialise(); } @@ -367,7 +367,7 @@ unsigned long ulState; else { GPIO_IOSET = mainON_BOARD_LED_BIT; - } + } } /*-----------------------------------------------------------*/ @@ -435,10 +435,10 @@ static long lErrorOccurred = pdFALSE; vErrorChecks task to check the operation of the memory allocator. Each time the task is created memory is allocated for the stack and TCB. Each time the task is deleted this memory is returned to the heap. This task itself - exercises the allocator by allocating and freeing blocks. - - The task executes at the idle priority so does not require a delay. - + exercises the allocator by allocating and freeing blocks. + + The task executes at the idle priority so does not require a delay. + pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the vErrorChecks() task that this task is still executing without error. */ @@ -452,7 +452,7 @@ static long lErrorOccurred = pdFALSE; ( *pulMemCheckTaskRunningCounter )++; } - /* Allocate some memory - just to give the allocator some extra + /* Allocate some memory - just to give the allocator some extra exercise. This has to be in a critical section to ensure the task does not get deleted while it has memory allocated. */ vTaskSuspendAll(); diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c index f66977fcb..c13b5462f 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -217,10 +217,10 @@ int main( void ) vStartRecursiveMutexTasks(); /* Start the tasks defined within this file. */ - xTaskCreate( vLEDTask, ( signed char * ) "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL ); - xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( vPrintTask, ( signed char * ) "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL ); - xTaskCreate( vButtonHandlerTask, ( signed char * ) "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vLEDTask, "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vPrintTask, "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL ); + xTaskCreate( vButtonHandlerTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -357,8 +357,8 @@ char *pcMessage; static void vButtonHandlerTask( void *pvParameters ) { -static signed char cListBuffer[ mainLIST_BUFFER_SIZE ]; -const signed char *pcList = &( cListBuffer[ 0 ] ); +static char cListBuffer[ mainLIST_BUFFER_SIZE ]; +const char *pcList = &( cListBuffer[ 0 ] ); const char * const pcHeader = "\nTask State Priority Stack #\n************************************************"; extern void (vButtonISRWrapper) ( void ); diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c index 973e73254..e6357c411 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -76,10 +76,10 @@ * for messages - waking and displaying the messages as they arrive. * * "Check" hook - This only executes every five seconds from the tick hook. - * Its main function is to check that all the standard demo tasks are still - * operational. Should any unexpected behaviour within a demo task be discovered - * the tick hook will write an error to the LCD (via the LCD task). If all the - * demo tasks are executing with their expected behaviour then the check task + * Its main function is to check that all the standard demo tasks are still + * operational. Should any unexpected behaviour within a demo task be discovered + * the tick hook will write an error to the LCD (via the LCD task). If all the + * demo tasks are executing with their expected behaviour then the check task * writes PASS to the LCD (again via the LCD task), as described above. * * "uIP" task - This is the task that handles the uIP stack. All TCP/IP @@ -114,7 +114,7 @@ #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define mainFLASH_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) -#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) +#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) /* Constants to setup the PLL. */ #define mainPLL_MUL ( ( unsigned portLONG ) ( 8 - 1 ) ) @@ -134,15 +134,15 @@ #define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 ) #define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 ) -/* +/* * The task that handles the uIP stack. All TCP/IP processing is performed in * this task. */ extern void vuIP_Task( void *pvParameters ); /* - * The LCD is written two by more than one task so is controlled by a - * 'gatekeeper' task. This is the only task that is actually permitted to + * The LCD is written two by more than one task so is controlled by a + * 'gatekeeper' task. This is the only task that is actually permitted to * access the LCD directly. Other tasks wanting to display a message send * the message to the gatekeeper. */ @@ -159,31 +159,31 @@ xQueueHandle xLCDQueue; int main( void ) { prvSetupHardware(); - + /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) ); /* Create the uIP task. This uses the lwIP RTOS abstraction layer.*/ - xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* Start the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartLEDFlashTasks( mainFLASH_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); - vStartQueuePeekTasks(); + vStartQueuePeekTasks(); vStartDynamicPriorityTasks(); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* Will only get here if there was insufficient memory to create the idle task. */ - return 0; + return 0; } /*-----------------------------------------------------------*/ @@ -200,7 +200,7 @@ static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( ulTicksSinceLastDisplay >= mainCHECK_DELAY ) { ulTicksSinceLastDisplay = 0; - + /* Has an error been found in any task? */ if( xAreBlockingQueuesStillRunning() != pdTRUE ) @@ -217,17 +217,17 @@ static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; { xMessage.pcMessage = "ERROR - GENQ"; } - + if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - PEEKQ"; - } - + } + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - DYNAMIC"; } - + xMessage.xColumn++; /* Send the message to the LCD gatekeeper for display. */ @@ -244,7 +244,7 @@ xLCDMessage xMessage; /* Initialise the LCD and display a startup message. */ LCD_init(); LCD_cur_off(); - LCD_cls(); + LCD_cls(); LCD_gotoxy( 1, 1 ); LCD_puts( "www.FreeRTOS.org" ); @@ -252,7 +252,7 @@ xLCDMessage xMessage; { /* Wait for a message to arrive that requires displaying. */ while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS ); - + /* Display the message. Print each message to a different position. */ LCD_cls(); LCD_gotoxy( ( xMessage.xColumn & 0x07 ) + 1, ( xMessage.xColumn & 0x01 ) + 1 ); @@ -268,17 +268,17 @@ static void prvSetupHardware( void ) /* Remap the interrupt vectors to RAM if we are are running from RAM. */ SCB_MEMMAP = 2; #endif - + /* Disable the PLL. */ PLLCON = 0; PLLFEED = mainPLL_FEED_BYTE1; PLLFEED = mainPLL_FEED_BYTE2; - + /* Configure clock source. */ SCS |= mainOSC_ENABLE; while( !( SCS & mainOSC_STAT ) ); - CLKSRCSEL = mainOSC_SELECT; - + CLKSRCSEL = mainOSC_SELECT; + /* Setup the PLL to multiply the XTAL input by 4. */ PLLCFG = ( mainPLL_MUL | mainPLL_DIV ); PLLFEED = mainPLL_FEED_BYTE1; @@ -288,20 +288,20 @@ static void prvSetupHardware( void ) PLLCON = mainPLL_ENABLE; PLLFEED = mainPLL_FEED_BYTE1; PLLFEED = mainPLL_FEED_BYTE2; - CCLKCFG = mainCPU_CLK_DIV; + CCLKCFG = mainCPU_CLK_DIV; while( !( PLLSTAT & mainPLL_LOCK ) ); - + /* Connecting the clock. */ PLLCON = mainPLL_CONNECT; PLLFEED = mainPLL_FEED_BYTE1; PLLFEED = mainPLL_FEED_BYTE2; - while( !( PLLSTAT & mainPLL_CONNECTED ) ); - - /* + while( !( PLLSTAT & mainPLL_CONNECTED ) ); + + /* This code is commented out as the MAM does not work on the original revision LPC2368 chips. If using Rev B chips then you can increase the speed though the use of the MAM. - + Setup and turn on the MAM. Three cycle access is used due to the fast PLL used. It is possible faster overall performance could be obtained by tuning the MAM and PLL settings. @@ -309,7 +309,7 @@ static void prvSetupHardware( void ) MAMTIM = mainMAM_TIM_3; MAMCR = mainMAM_MODE_FULL; */ - + /* Setup the led's on the MCB2300 board */ vParTestInitialise(); } diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/httpd-cgi.c index 7126f6cd5..02cf3b9f2 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/httpd-cgi.c @@ -98,7 +98,7 @@ PT_THREAD(file_stats(struct httpd_state *s, char *ptr)) PSOCK_BEGIN(&s->sout); PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1); - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -139,14 +139,14 @@ static const char *states[] = { closing, time_wait, last_ack}; - + static unsigned short generate_tcp_stats(void *arg) { struct uip_conn *conn; struct httpd_state *s = (struct httpd_state *)arg; - + conn = &uip_conns[s->count]; return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE, "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", @@ -166,7 +166,7 @@ generate_tcp_stats(void *arg) static PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr)) { - + PSOCK_BEGIN(&s->sout); for(s->count = 0; s->count < UIP_CONNS; ++s->count) { @@ -197,14 +197,14 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) ++s->count) { PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s); } - + #endif /* UIP_STATISTICS */ - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -212,9 +212,9 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %ld", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); - + return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ @@ -224,7 +224,7 @@ static PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr)) { PSOCK_BEGIN(&s->sout); - PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); + PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -253,8 +253,8 @@ static unsigned short generate_io_state( void *arg ) "LED 2.7"\ "

"\ "", - pcStatus[ 0 ], - pcStatus[ 1 ], + pcStatus[ 0 ], + pcStatus[ 1 ], pcStatus[ 2 ] ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c index 14d588a65..afcb87fa3 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -109,15 +109,15 @@ */ static void vCheckTask( void *pvParameters ); -/* +/* * The task that handles the uIP stack. All TCP/IP processing is performed in * this task. */ extern void vuIP_Task( void *pvParameters ); /* - * The LCD is written two by more than one task so is controlled by a - * 'gatekeeper' task. This is the only task that is actually permitted to + * The LCD is written two by more than one task so is controlled by a + * 'gatekeeper' task. This is the only task that is actually permitted to * access the LCD directly. Other tasks wanting to display a message send * the message to the gatekeeper. */ @@ -138,7 +138,7 @@ int main (void) xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) ); /* Create the lwIP task. This uses the lwIP RTOS abstraction layer.*/ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* Start the standard demo tasks - these serve no useful purpose other than to demonstrate the FreeRTOS API being used and to test the port. */ @@ -150,8 +150,8 @@ int main (void) vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( vLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether @@ -163,7 +163,7 @@ int main (void) /* Will only get here if there was insufficient memory to create the idle task. */ - return 0; + return 0; } /*-----------------------------------------------------------*/ @@ -238,7 +238,7 @@ xLCDMessage xMessage; /* Initialise the LCD and display a startup message. */ LCD_init(); LCD_cur_off(); - LCD_cls(); + LCD_cls(); LCD_gotoxy( 1, 1 ); LCD_puts( ( signed char * ) "www.FreeRTOS.org" ); @@ -246,7 +246,7 @@ xLCDMessage xMessage; { /* Wait for a message to arrive that requires displaying. */ while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS ); - + /* Display the message. Print each message to a different position. */ LCD_cls(); LCD_gotoxy( ( xMessage.xColumn & 0x07 ) + 1, ( xMessage.xColumn & 0x01 ) + 1 ); diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c index fb87c478f..2f9f9e0a2 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/httpd-cgi.c @@ -98,7 +98,7 @@ PT_THREAD(file_stats(struct httpd_state *s, char *ptr)) PSOCK_BEGIN(&s->sout); PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1); - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -139,14 +139,14 @@ static const char *states[] = { closing, time_wait, last_ack}; - + static unsigned short generate_tcp_stats(void *arg) { struct uip_conn *conn; struct httpd_state *s = (struct httpd_state *)arg; - + conn = &uip_conns[s->count]; return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE, "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", @@ -166,7 +166,7 @@ generate_tcp_stats(void *arg) static PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr)) { - + PSOCK_BEGIN(&s->sout); for(s->count = 0; s->count < UIP_CONNS; ++s->count) { @@ -197,14 +197,14 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) ++s->count) { PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s); } - + #endif /* UIP_STATISTICS */ - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -212,9 +212,9 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); - + return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ @@ -224,7 +224,7 @@ static PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr)) { PSOCK_BEGIN(&s->sout); - PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); + PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -253,8 +253,8 @@ static unsigned short generate_io_state( void *arg ) "LED 2.7"\ "

"\ "", - pcStatus[ 0 ], - pcStatus[ 1 ], + pcStatus[ 0 ], + pcStatus[ 1 ], pcStatus[ 2 ] ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c index 1529c225c..0ad51e301 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -180,8 +180,8 @@ int main( void ) vParTestInitialise(); /* Create the queue used to communicate with the LCD print task. */ - xLCDQueue = xQueueCreate( mainLCD_QUEUE_LENGTH, sizeof( LCDMessage ) ); - + xLCDQueue = xQueueCreate( mainLCD_QUEUE_LENGTH, sizeof( LCDMessage ) ); + /* Create the standard demo application tasks. See the WEB documentation for more information on these tasks. */ vCreateBlockTimeTasks(); @@ -190,13 +190,13 @@ int main( void ) vStartDynamicPriorityTasks(); vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); - + /* Create the tasks defined within this file. */ - xTaskCreate( vPrintTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); - xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - + xTaskCreate( vPrintTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + vTaskStartScheduler(); - + /* Execution will only reach here if there was insufficient heap to start the scheduler. */ return 0; @@ -205,7 +205,7 @@ int main( void ) static void vCheckTask( void *pvParameters ) { -static unsigned long ulErrorDetected = pdFALSE; +static unsigned long ulErrorDetected = pdFALSE; portTickType xLastExecutionTime; unsigned char *ucErrorMessage = ( unsigned char * )" FAIL"; unsigned char *ucSuccessMessage = ( unsigned char * )" PASS"; @@ -222,7 +222,7 @@ LCDMessage xMessage; vTaskDelayUntil( &xLastExecutionTime, mainCHECK_TASK_CYCLE_TIME ); /* Has an error been found in any of the standard demo tasks? */ - + if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; @@ -237,17 +237,17 @@ LCDMessage xMessage; { ulErrorDetected = pdTRUE; } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; - } - + } + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; - } - + } + /* Calculate the LCD line on which we would like the message to be displayed. The column variable is used for convenience as it is incremented each cycle anyway. */ @@ -256,19 +256,19 @@ LCDMessage xMessage; /* The message displayed depends on whether an error was found or not. Any discovered error is latched. Here the column variable is used as an index into the text string as a simple way of moving - the text from column to column. */ + the text from column to column. */ if( ulErrorDetected == pdFALSE ) { xMessage.pucString = ucSuccessMessage + uxColumn; } else { - xMessage.pucString = ucErrorMessage + uxColumn; - } + xMessage.pucString = ucErrorMessage + uxColumn; + } /* Send the message to the print task for display. */ xQueueSend( xLCDQueue, ( void * ) &xMessage, mainNO_DELAY ); - + /* Make sure the message is printed in a different column the next time around. */ uxColumn--; @@ -289,7 +289,7 @@ LCDMessage xMessage; { /* Wait until a message arrives. */ while( xQueueReceive( xLCDQueue, ( void * ) &xMessage, portMAX_DELAY ) != pdPASS ); - + /* The message contains the text to display, and the line on which the text should be displayed. */ LCD_Clear(); @@ -300,51 +300,51 @@ LCDMessage xMessage; static void prvSetupHardware(void) { -ErrorStatus OSC4MStartUpStatus01; +ErrorStatus OSC4MStartUpStatus01; /* ST provided routine. */ /* MRCC system reset */ MRCC_DeInit(); - + /* Wait for OSC4M start-up */ OSC4MStartUpStatus01 = MRCC_WaitForOSC4MStartUp(); - + if(OSC4MStartUpStatus01 == SUCCESS) { /* Set HCLK to 60MHz */ MRCC_HCLKConfig(MRCC_CKSYS_Div1); - + /* Set CKTIM to 60MHz */ MRCC_CKTIMConfig(MRCC_HCLK_Div1); - + /* Set PCLK to 30MHz */ MRCC_PCLKConfig(MRCC_CKTIM_Div2); - + /* Enable Flash Burst mode */ CFG_FLASHBurstConfig(CFG_FLASHBurst_Enable); - + /* Set CK_SYS to 60 MHz */ MRCC_CKSYSConfig(MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_15); } - + /* GPIO pins optimized for 3V3 operation */ MRCC_IOVoltageRangeConfig(MRCC_IOVoltageRange_3V3); - + /* GPIO clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_GPIO, ENABLE); - + /* EXTIT clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_EXTIT, ENABLE); /* TB clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_TB, ENABLE); - + /* Initialize the demonstration menu */ LCD_Init(); - + LCD_DisplayString(Line1, ( unsigned char * ) "www.FreeRTOS.org", BlackText); LCD_DisplayString(Line2, ( unsigned char * ) " STR750 Demo ", BlackText); - + EIC_IRQCmd(ENABLE); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c index a66542b31..b6a6de29f 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -180,8 +180,8 @@ void main( void ) vParTestInitialise(); /* Create the queue used to communicate with the LCD print task. */ - xLCDQueue = xQueueCreate( mainLCD_QUEUE_LENGTH, sizeof( LCDMessage ) ); - + xLCDQueue = xQueueCreate( mainLCD_QUEUE_LENGTH, sizeof( LCDMessage ) ); + /* Create the standard demo application tasks. See the WEB documentation for more information on these tasks. */ vCreateBlockTimeTasks(); @@ -190,13 +190,13 @@ void main( void ) vStartDynamicPriorityTasks(); vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); - + /* Create the tasks defined within this file. */ - xTaskCreate( vPrintTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); - xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - + xTaskCreate( vPrintTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + vTaskStartScheduler(); - + /* Execution will only reach here if there was insufficient heap to start the scheduler. */ } @@ -204,7 +204,7 @@ void main( void ) static void vCheckTask( void *pvParameters ) { -static unsigned long ulErrorDetected = pdFALSE; +static unsigned long ulErrorDetected = pdFALSE; portTickType xLastExecutionTime; unsigned char *cErrorMessage = " FAIL"; unsigned char *cSuccessMessage = " PASS"; @@ -221,7 +221,7 @@ LCDMessage xMessage; vTaskDelayUntil( &xLastExecutionTime, mainCHECK_TASK_CYCLE_TIME ); /* Has an error been found in any of the standard demo tasks? */ - + if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; @@ -236,17 +236,17 @@ LCDMessage xMessage; { ulErrorDetected = pdTRUE; } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; - } - + } + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; - } - + } + /* Calculate the LCD line on which we would like the message to be displayed. The column variable is used for convenience as it is incremented each cycle anyway. */ @@ -255,19 +255,19 @@ LCDMessage xMessage; /* The message displayed depends on whether an error was found or not. Any discovered error is latched. Here the column variable is used as an index into the text string as a simple way of moving - the text from column to column. */ + the text from column to column. */ if( ulErrorDetected == pdFALSE ) { xMessage.pucString = cSuccessMessage + uxColumn; } else { - xMessage.pucString = cErrorMessage + uxColumn; - } + xMessage.pucString = cErrorMessage + uxColumn; + } /* Send the message to the print task for display. */ xQueueSend( xLCDQueue, ( void * ) &xMessage, mainNO_DELAY ); - + /* Make sure the message is printed in a different column the next time around. */ uxColumn--; @@ -287,7 +287,7 @@ LCDMessage xMessage; { /* Wait until a message arrives. */ while( xQueueReceive( xLCDQueue, ( void * ) &xMessage, portMAX_DELAY ) != pdPASS ); - + /* The message contains the text to display, and the line on which the text should be displayed. */ LCD_Clear(); @@ -298,51 +298,51 @@ LCDMessage xMessage; static void prvSetupHardware(void) { -ErrorStatus OSC4MStartUpStatus01; +ErrorStatus OSC4MStartUpStatus01; /* ST provided routine. */ /* MRCC system reset */ MRCC_DeInit(); - + /* Wait for OSC4M start-up */ OSC4MStartUpStatus01 = MRCC_WaitForOSC4MStartUp(); - + if(OSC4MStartUpStatus01 == SUCCESS) { /* Set HCLK to 60MHz */ MRCC_HCLKConfig(MRCC_CKSYS_Div1); - + /* Set CKTIM to 60MHz */ MRCC_CKTIMConfig(MRCC_HCLK_Div1); - + /* Set PCLK to 30MHz */ MRCC_PCLKConfig(MRCC_CKTIM_Div2); - + /* Enable Flash Burst mode */ CFG_FLASHBurstConfig(CFG_FLASHBurst_Enable); - + /* Set CK_SYS to 60 MHz */ MRCC_CKSYSConfig(MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_15); } - + /* GPIO pins optimized for 3V3 operation */ MRCC_IOVoltageRangeConfig(MRCC_IOVoltageRange_3V3); - + /* GPIO clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_GPIO, ENABLE); - + /* EXTIT clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_EXTIT, ENABLE); /* TB clock source enable */ MRCC_PeripheralClockConfig(MRCC_Peripheral_TB, ENABLE); - + /* Initialize the demonstration menu */ LCD_Init(); - + LCD_DisplayString(Line1, "www.FreeRTOS.org", BlackText); LCD_DisplayString(Line2, " STR750 Demo ", BlackText); - + EIC_IRQCmd(ENABLE); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c index 968ac860b..0fb46cd50 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c @@ -123,7 +123,7 @@ portTickType StartTime, EndTime, Elapsed; { msg = &dummyptr; } - + if( timeout != 0 ) { if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) ) @@ -154,7 +154,7 @@ portTickType StartTime, EndTime, Elapsed; { Elapsed = 1; } - return ( Elapsed ); // return time blocked TBD test + return ( Elapsed ); // return time blocked TBD test } } @@ -217,7 +217,7 @@ portTickType StartTime, EndTime, Elapsed; { Elapsed = 1; } - return (Elapsed); // return time blocked TBD test + return (Elapsed); // return time blocked TBD test } else { @@ -237,8 +237,8 @@ portTickType StartTime, EndTime, Elapsed; Elapsed = 1; } - return ( Elapsed ); // return time blocked - + return ( Elapsed ); // return time blocked + } } @@ -275,7 +275,7 @@ sys_init(void) // keep track of how many threads have been created nextthread = 0; - + s_sys_arch_state.nTaskCount = 0; sys_set_default_state(); } @@ -329,7 +329,7 @@ sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio) xTaskHandle CreatedTask; int result; - result = xTaskCreate(thread, ( signed char * ) s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask ); + result = xTaskCreate(thread, s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask ); // For each task created, store the task handle (pid) in the timers array. // This scheme doesn't allow for threads to be deleted @@ -338,7 +338,7 @@ int result; if(result == pdPASS) { ++s_sys_arch_state.nTaskCount; - + return CreatedTask; } else diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c index 53a91c212..5dbd0452c 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c @@ -116,23 +116,23 @@ static void low_level_init(struct netif *netif) ENET_InitClocksGPIO(); ENET_Init(); ENET_Start(); - + portENTER_CRITICAL(); { /*set MAC physical*/ ENET_MAC->MAH = (MAC_ADDR5<<8) + MAC_ADDR4; ENET_MAC->MAL = (MAC_ADDR3<<24) + (MAC_ADDR2<<16) + (MAC_ADDR1<<8) + MAC_ADDR0; - + VIC_Config( ENET_ITLine, VIC_IRQ, 1 ); - VIC_ITCmd( ENET_ITLine, ENABLE ); + VIC_ITCmd( ENET_ITLine, ENABLE ); ENET_DMA->ISR = DMI_RX_CURRENT_DONE; ENET_DMA->IER = DMI_RX_CURRENT_DONE; } portEXIT_CRITICAL(); /* Create the task that handles the EMAC. */ - xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); -} + xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); +} /* @@ -303,17 +303,17 @@ static void ethernetif_input( void * pvParameters ) do { ethernetif = s_pxNetIf->state; - + /* move received packet into a new pbuf */ p = low_level_input( s_pxNetIf ); - + if( p == NULL ) { /* No packet could be read. Wait a for an interrupt to tell us there is more data available. */ vEMACWaitForInput(); } - + } while( p == NULL ); /* points to packet payload, which starts with an Ethernet header */ @@ -336,12 +336,12 @@ static void ethernetif_input( void * pvParameters ) /* pass to network layer */ s_pxNetIf->input(p, s_pxNetIf); break; - + case ETHTYPE_ARP: /* pass p to ARP module */ etharp_arp_input(s_pxNetIf, ethernetif->ethaddr, p); break; - + default: pbuf_free(p); p = NULL; @@ -394,7 +394,7 @@ ethernetif_init(struct netif *netif) netif->ifoutnucastpkts = 0; netif->ifoutdiscards = 0; #endif - + netif->state = ethernetif; netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; @@ -419,11 +419,11 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Give the semaphore in case the lwIP task needs waking. */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); - + /* Clear the interrupt. */ ENET_DMA->ISR = DMI_RX_CURRENT_DONE; - - /* Switch tasks if necessary. */ + + /* Switch tasks if necessary. */ portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/httpd-cgi.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/httpd-cgi.c index 6ad2b9b2d..ecbe93822 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/httpd-cgi.c @@ -97,7 +97,7 @@ PT_THREAD(file_stats(struct httpd_state *s, char *ptr)) PSOCK_BEGIN(&s->sout); PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1); - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ @@ -138,14 +138,14 @@ static const char *states[] = { closing, time_wait, last_ack}; - + static unsigned short generate_tcp_stats(void *arg) { struct uip_conn *conn; struct httpd_state *s = (struct httpd_state *)arg; - + conn = &uip_conns[s->count]; return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE, "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", @@ -165,7 +165,7 @@ generate_tcp_stats(void *arg) static PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr)) { - + PSOCK_BEGIN(&s->sout); for(s->count = 0; s->count < UIP_CONNS; ++s->count) { @@ -196,14 +196,14 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) ++s->count) { PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s); } - + #endif /* UIP_STATISTICS */ - + PSOCK_END(&s->sout); } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -211,9 +211,9 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); - + return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ @@ -225,7 +225,7 @@ PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr)) PSOCK_BEGIN(&s->sout); // for( s->count = 0; s->count < 4; ++s->count ) // { - PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); + PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL); // } PSOCK_END(&s->sout); } diff --git a/FreeRTOS/Demo/AVR32_UC3/main.c b/FreeRTOS/Demo/AVR32_UC3/main.c index 4ecb23c1a..fefab0cf6 100644 --- a/FreeRTOS/Demo/AVR32_UC3/main.c +++ b/FreeRTOS/Demo/AVR32_UC3/main.c @@ -30,7 +30,7 @@ *****************************************************************************/ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -223,7 +223,7 @@ int main( void ) task as described at the top of this file. */ xTaskCreate( vErrorChecks - , (const signed portCHAR *)"ErrCheck" + , "ErrCheck" , configMINIMAL_STACK_SIZE , NULL , mainCHECK_TASK_PRIORITY @@ -288,7 +288,7 @@ portBASE_TYPE bSuicidalTask = 0; ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; if( xTaskCreate( vMemCheckTask, - ( signed portCHAR * ) "MEM_CHECK", + "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c index d101306df..0ae0020d9 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -66,15 +66,15 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * - * Main. c also creates a task called "Check". This only executes every three - * seconds but has the highest priority so is guaranteed to get processor time. - * Its main function is to check that all the other tasks are still operational. - * Each task that does not flash an LED maintains a unique count that is - * incremented each time the task successfully completes its function. Should - * any error occur within such a task the count is permanently halted. The + * + * Main. c also creates a task called "Check". This only executes every three + * seconds but has the highest priority so is guaranteed to get processor time. + * Its main function is to check that all the other tasks are still operational. + * Each task that does not flash an LED maintains a unique count that is + * incremented each time the task successfully completes its function. Should + * any error occur within such a task the count is permanently halted. The * check task inspects the count of each task to ensure it has changed since - * the last time the check task executed. If all the count variables have + * the last time the check task executed. If all the count variables have * changed all the tasks are still executing error free, and the check task * toggles an LED. Should any task contain an error at any time the LED toggle * will stop. @@ -84,12 +84,12 @@ /* Changes from V1.2.0 - + + Changed the baud rate for the serial test from 19200 to 57600. Changes from V1.2.3 - + The integer and comtest tasks are now used when the cooperative scheduler + + The integer and comtest tasks are now used when the cooperative scheduler is being used. Previously they were only used with the preemptive scheduler. @@ -118,7 +118,7 @@ Changes from V4.0.5 #ifdef GCC_MEGA_AVR /* EEPROM routines used only with the WinAVR compiler. */ - #include + #include #endif /* Scheduler include files. */ @@ -173,12 +173,12 @@ static void vErrorChecks( void *pvParameters ); /* * Checks the unique counts of other tasks to ensure they are still operational. - * Flashes an LED if everything is okay. + * Flashes an LED if everything is okay. */ static void prvCheckOtherTasksAreStillRunning( void ); /* - * Called on boot to increment a count stored in the EEPROM. This is used to + * Called on boot to increment a count stored in the EEPROM. This is used to * ensure the CPU does not reset unexpectedly. */ static void prvIncrementResetCount( void ); @@ -202,15 +202,15 @@ short main( void ) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartRegTestTasks(); - + /* Create the tasks defined within this file. */ - xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the co-routines that flash the LED's. */ vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES ); - - /* In this port, to use preemptive scheduler define configUSE_PREEMPTION - as 1 in portmacro.h. To use the cooperative scheduler define + + /* In this port, to use preemptive scheduler define configUSE_PREEMPTION + as 1 in portmacro.h. To use the cooperative scheduler define configUSE_PREEMPTION as 0. */ vTaskStartScheduler(); @@ -231,11 +231,11 @@ static volatile unsigned long ulDummyVariable = 3UL; { vTaskDelay( mainCHECK_PERIOD ); - /* Perform a bit of 32bit maths to ensure the registers used by the - integer tasks get some exercise. The result here is not important - + /* Perform a bit of 32bit maths to ensure the registers used by the + integer tasks get some exercise. The result here is not important - see the demo application documentation for more info. */ ulDummyVariable *= 3; - + prvCheckOtherTasksAreStillRunning(); } } @@ -264,7 +264,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE; { xErrorHasOccurred = pdTRUE; } - + if( xErrorHasOccurred == pdFALSE ) { /* Toggle the LED if everything is okay so we know if an error occurs even if not diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c index 273920dc7..71c2c69f1 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -84,8 +84,8 @@ portBASE_TYPE xRegTestError = pdFALSE; void vStartRegTestTasks( void ) { - xTaskCreate( prvRegisterCheck1, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegisterCheck2, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegisterCheck1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegisterCheck2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ @@ -103,7 +103,7 @@ portBASE_TYPE xReturn; { xReturn = pdFALSE; } - + return xReturn; } /*-----------------------------------------------------------*/ @@ -114,7 +114,7 @@ static void prvRegisterCheck1( void *pvParameters ) for( ;; ) { - asm( "LDI r31, 5" ); + asm( "LDI r31, 5" ); asm( "MOV r0, r31" ); asm( "LDI r31, 6" ); asm( "MOV r1, r31" ); @@ -257,7 +257,7 @@ static void prvRegisterCheck2( void *pvParameters ) for( ;; ) { - asm( "LDI r31, 1" ); + asm( "LDI r31, 1" ); asm( "MOV r0, r31" ); asm( "LDI r31, 2" ); asm( "MOV r1, r31" ); diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c index 4fb459b25..494396e4f 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c @@ -105,7 +105,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -178,7 +178,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -187,7 +187,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -225,22 +225,22 @@ static unsigned short generate_io_state( void *arg ) pcStatus = ""; } - usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel ); + usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel ); sprintf( uip_appdata, "LED

Raw voltage input is %d", pcStatus, usRawVoltage ); return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static unsigned short generate_runtime_stats( void *arg ) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - - vTaskGetRunTimeStats( uip_appdata ); + + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c index b0d7049cd..8c2095e36 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -188,17 +188,17 @@ int main(void) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c index 2948390e6..9c3626af7 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c @@ -302,27 +302,27 @@ int main(void) { /* Start the three application specific demo tasks, as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - xTaskCreate( prvOLEDTask, ( signed char * ) "OLED", configMINIMAL_STACK_SIZE, NULL, mainOLED_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvOLEDTask, "OLED", configMINIMAL_STACK_SIZE, NULL, mainOLED_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create a lot of 'standard demo' tasks. */ @@ -336,7 +336,7 @@ int main(void) vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); /* Create the web server task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* The suicide tasks must be created last, as they need to know how many tasks were running prior to their creation in order to ascertain whether diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c index b23e38aa7..5f56642c3 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c @@ -300,14 +300,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; xEMACEventQueue = xQueueCreate( uipEVENT_QUEUE_LENGTH, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( signed char * ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( signed char * ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 500UL / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/WebServer/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/WebServer/httpd-cgi.c index 4fb459b25..494396e4f 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/WebServer/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/WebServer/httpd-cgi.c @@ -105,7 +105,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -178,7 +178,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -187,7 +187,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -225,22 +225,22 @@ static unsigned short generate_io_state( void *arg ) pcStatus = ""; } - usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel ); + usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel ); sprintf( uip_appdata, "LED

Raw voltage input is %d", pcStatus, usRawVoltage ); return strlen( uip_appdata ); } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static unsigned short generate_runtime_stats( void *arg ) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - - vTaskGetRunTimeStats( uip_appdata ); + + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c index b0d7049cd..9fab43017 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -188,17 +188,17 @@ int main(void) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c index 2948390e6..eaead7667 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -302,27 +302,27 @@ int main(void) { /* Start the three application specific demo tasks, as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - xTaskCreate( prvOLEDTask, ( signed char * ) "OLED", configMINIMAL_STACK_SIZE, NULL, mainOLED_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvOLEDTask, "OLED", configMINIMAL_STACK_SIZE, NULL, mainOLED_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create a lot of 'standard demo' tasks. */ @@ -336,8 +336,8 @@ int main(void) vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); /* Create the web server task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); - + xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); + /* The suicide tasks must be created last, as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given @@ -462,8 +462,8 @@ const unsigned long ulValueToSend = 100UL; /* The timer command queue will have been filled when the timer test tasks were created in main() (this is part of the test they perform). Therefore, - while the check timer can be created in main(), it cannot be started from - main(). Once the scheduler has started, the timer service task will drain + while the check timer can be created in main(), it cannot be started from + main(). Once the scheduler has started, the timer service task will drain the command queue, and now the check timer can be started successfully. */ xTimerStart( xCheckTimer, portMAX_DELAY ); @@ -539,10 +539,10 @@ static portTickType xLastScrollTime = 0UL; { /* Wait until it is time to update the OLED again. */ vTaskDelayUntil( &xLastScrollTime, mainOLED_PERIOD_MS ); - + xOLEDData.char_offset1 = ucOffset1++; xOLEDData.char_offset2 = ucOffset2++; - + OLED_write_data( &xOLEDData, BOTH_LINES ); } } @@ -551,13 +551,13 @@ static portTickType xLastScrollTime = 0UL; static void prvSetupHardware( void ) { SystemCoreClockUpdate(); - + /* Disable the Watch Dog Timer */ MSS_WD_disable( ); /* Configure the GPIO for the LEDs. */ vParTestInitialise(); - + /* ACE Initialization */ ACE_init(); @@ -646,12 +646,12 @@ unsigned long *pulHighWord, *pulLowWord; pulHighWord = ( unsigned long * ) &ullCurrentValue; pulLowWord = pulHighWord++; - + MSS_TIM64_get_current_value( ( uint32_t * ) pulHighWord, ( uint32_t * ) pulLowWord ); - + /* Convert the down count into an upcount. */ ullCurrentValue = ulMax64BitValue - ullCurrentValue; - + /* Scale to a 32bit number of suitable frequency. */ ullCurrentValue >>= 13; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c index b23e38aa7..0098d3aea 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -192,7 +192,7 @@ long lPacketLength; if( ( lPacketLength > 0 ) && ( uip_buf != NULL ) ) { uip_len = ( u16_t ) lPacketLength; - + /* Standard uIP loop taken from the uIP manual. */ if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { @@ -237,7 +237,7 @@ long lPacketLength; for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); - + /* If the above function invocation resulted in data that should be sent out on the network, the global variable uip_len is set to a value > 0. */ @@ -300,14 +300,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; xEMACEventQueue = xQueueCreate( uipEVENT_QUEUE_LENGTH, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( signed char * ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( signed char * ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 500UL / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -418,7 +418,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c index 21214a388..011577b1f 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -154,14 +154,14 @@ void main_blinky( void ) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ - NULL, /* The parameter passed to the task - not used in this case. */ - mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ - NULL ); /* The task handle is not required, so NULL is passed. */ - - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ + NULL, /* The parameter passed to the task - not used in this case. */ + mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ + NULL ); /* The task handle is not required, so NULL is passed. */ + + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c index b1c0f5ece..cc529774d 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT @@ -205,7 +205,7 @@ void vRegisterSampleCLICommands( void ) static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n"; +const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -215,8 +215,8 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac configASSERT( pcWriteBuffer ); /* Generate a table of task stats. */ - strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskList( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + strcpy( ( char * ) pcWriteBuffer, pcHeader ); + vTaskList( pcWriteBuffer + strlen( pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ @@ -226,7 +226,7 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n"; +const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -236,8 +236,8 @@ const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Ti configASSERT( pcWriteBuffer ); /* Generate a table of task stats. */ - strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskGetRunTimeStats( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + strcpy( ( char * ) pcWriteBuffer, pcHeader ); + vTaskGetRunTimeStats( ( ( char * ) pcWriteBuffer ) + strlen( pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c index d89e08f08..ae04a9e98 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -317,12 +317,12 @@ void main_full( void ) /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( prvRegTestTaskEntry1, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTaskEntry2, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c index de336cd98..27fe55a81 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -194,17 +194,17 @@ int main( void ) port and provide some APU usage examples. */ vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); - vStartRecursiveMutexTasks(); + vStartRecursiveMutexTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); - vStartQueuePeekTasks(); - vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); + vStartQueuePeekTasks(); + vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_RATE, mainCOM_TEST_LED ); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", mainLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvLCDTask, "LCD", mainLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -234,7 +234,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( ulTicksSinceLastDisplay >= mainCHECK_DELAY ) { ulTicksSinceLastDisplay = 0; - + /* Has an error been found in any task? */ if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { @@ -263,16 +263,16 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR IN PEEK Q"; - } + } else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR IN REC MUTEX"; - } + } else if( xAreComTestTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR IN COMTEST"; } - + /* Send the message to the LCD gatekeeper for display. */ xHigherPriorityTaskWoken = pdFALSE; xQueueSendFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken ); @@ -300,10 +300,10 @@ const unsigned long ulMaxY = 250, ulYIncrement = 22, ulWidth = 250, ulHeight = 2 /* Initialize LCD. */ LCDD_Initialize(); - LCDD_Start(); + LCDD_Start(); LCDD_Fill( ( void * ) BOARD_LCD_BASE, COLOR_WHITE ); LCDD_DrawString( ( void * ) BOARD_LCD_BASE, 1, ulY + 3, " www.FreeRTOS.org", COLOR_BLACK ); - + for( ;; ) { /* Wait for a message from the check function (which is executed in @@ -312,10 +312,10 @@ const unsigned long ulMaxY = 250, ulYIncrement = 22, ulWidth = 250, ulHeight = 2 /* Clear the space where the old message was. */ LCDD_DrawRectangle( ( void * ) BOARD_LCD_BASE, 0, ulY, ulWidth, ulHeight, COLOR_WHITE ); - + /* Increment to the next drawing position. */ ulY += ulYIncrement; - + /* Have the Y position moved past the end of the LCD? */ if( ulY >= ulMaxY ) { @@ -324,7 +324,7 @@ const unsigned long ulMaxY = 250, ulYIncrement = 22, ulWidth = 250, ulHeight = 2 /* Draw a new rectangle, in which the message will be written. */ LCDD_DrawRectangle( ( void * ) BOARD_LCD_BASE, 0, ulY, ulWidth, ulHeight, COLOR_GREEN ); - + /* Write the message. */ LCDD_DrawString( ( void * ) BOARD_LCD_BASE, ulX, ulY + 3, xMessage.pcMessage, COLOR_BLACK ); } diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c index d7d38c885..d611d7cd4 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -158,8 +158,8 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c index daf616980..8a433acd0 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -127,7 +127,7 @@ will remove items as they are added, meaning the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) -/* Values passed to the two tasks just to check the task parameter +/* Values passed to the two tasks just to check the task parameter functionality. */ #define mainQUEUE_SEND_PARAMETER ( 0x1111UL ) #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) @@ -163,13 +163,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c index 5af883b04..7d608d457 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -76,8 +76,8 @@ ****************************************************************************** * * main_full() creates all the demo application tasks and a software timer, then - * starts the scheduler. The web documentation provides more details of the - * standard demo application tasks, which provide no particular functionality, + * starts the scheduler. The web documentation provides more details of the + * standard demo application tasks, which provide no particular functionality, * but do provide a good example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are @@ -85,18 +85,18 @@ * * "Check" timer - The check software timer period is initially set to three * seconds. The callback function associated with the check software timer - * checks that all the standard demo tasks are not only still executing, but - * are executing without reporting any errors. If the check software timer - * discovers that a task has either stalled, or reported an error, then it - * changes its own execution period from the initial three seconds, to just - * 200ms. The check software timer callback function also toggles the green - * LED each time it is called. This provides a visual indication of the system - * status: If the green LED toggles every three seconds, then no issues have - * been discovered. If the green LED toggles every 200ms, then an issue has + * checks that all the standard demo tasks are not only still executing, but + * are executing without reporting any errors. If the check software timer + * discovers that a task has either stalled, or reported an error, then it + * changes its own execution period from the initial three seconds, to just + * 200ms. The check software timer callback function also toggles the green + * LED each time it is called. This provides a visual indication of the system + * status: If the green LED toggles every three seconds, then no issues have + * been discovered. If the green LED toggles every 200ms, then an issue has * been discovered with at least one task. * * See the documentation page for this demo on the FreeRTOS.org web site for - * full information, including hardware setup requirements. + * full information, including hardware setup requirements. */ /* Standard includes. */ @@ -191,35 +191,35 @@ xTimerHandle xCheckTimer = NULL; vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); - + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } - /* The set of tasks created by the following function call have to be - created last as they keep account of the number of tasks they expect to see + /* The set of tasks created by the following function call have to be + created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -275,7 +275,7 @@ unsigned long ulErrorFound = pdFALSE; { ulErrorFound = pdTRUE; } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; @@ -285,7 +285,7 @@ unsigned long ulErrorFound = pdFALSE; the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ vParTestToggleLED( mainCHECK_LED ); - + /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -295,7 +295,7 @@ unsigned long ulErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c index d7d38c885..d611d7cd4 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -158,8 +158,8 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c index daf616980..8a433acd0 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -127,7 +127,7 @@ will remove items as they are added, meaning the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) -/* Values passed to the two tasks just to check the task parameter +/* Values passed to the two tasks just to check the task parameter functionality. */ #define mainQUEUE_SEND_PARAMETER ( 0x1111UL ) #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) @@ -163,13 +163,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c index 5af883b04..7d608d457 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -76,8 +76,8 @@ ****************************************************************************** * * main_full() creates all the demo application tasks and a software timer, then - * starts the scheduler. The web documentation provides more details of the - * standard demo application tasks, which provide no particular functionality, + * starts the scheduler. The web documentation provides more details of the + * standard demo application tasks, which provide no particular functionality, * but do provide a good example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are @@ -85,18 +85,18 @@ * * "Check" timer - The check software timer period is initially set to three * seconds. The callback function associated with the check software timer - * checks that all the standard demo tasks are not only still executing, but - * are executing without reporting any errors. If the check software timer - * discovers that a task has either stalled, or reported an error, then it - * changes its own execution period from the initial three seconds, to just - * 200ms. The check software timer callback function also toggles the green - * LED each time it is called. This provides a visual indication of the system - * status: If the green LED toggles every three seconds, then no issues have - * been discovered. If the green LED toggles every 200ms, then an issue has + * checks that all the standard demo tasks are not only still executing, but + * are executing without reporting any errors. If the check software timer + * discovers that a task has either stalled, or reported an error, then it + * changes its own execution period from the initial three seconds, to just + * 200ms. The check software timer callback function also toggles the green + * LED each time it is called. This provides a visual indication of the system + * status: If the green LED toggles every three seconds, then no issues have + * been discovered. If the green LED toggles every 200ms, then an issue has * been discovered with at least one task. * * See the documentation page for this demo on the FreeRTOS.org web site for - * full information, including hardware setup requirements. + * full information, including hardware setup requirements. */ /* Standard includes. */ @@ -191,35 +191,35 @@ xTimerHandle xCheckTimer = NULL; vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); - + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } - /* The set of tasks created by the following function call have to be - created last as they keep account of the number of tasks they expect to see + /* The set of tasks created by the following function call have to be + created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -275,7 +275,7 @@ unsigned long ulErrorFound = pdFALSE; { ulErrorFound = pdTRUE; } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; @@ -285,7 +285,7 @@ unsigned long ulErrorFound = pdFALSE; the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ vParTestToggleLED( mainCHECK_LED ); - + /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -295,7 +295,7 @@ unsigned long ulErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c index f49dfcc80..548f042c5 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -122,7 +122,7 @@ extern void vSetupTimerTest( void ); /* * The Check task periodical interrogates each of the running tests to * ensure that they are still executing correctly. - * If all the tests pass, then the LCD is updated with Pass, the number of + * If all the tests pass, then the LCD is updated with Pass, the number of * iterations and the Jitter time calculated but the Fast Interrupt Test. * If any one of the tests fail, it is indicated with an error code printed on * the display. This indicator won't disappear until the device is reset. @@ -157,7 +157,7 @@ void main( void ) vStartInterruptQueueTasks(); /* Start the error checking task. */ - ( void ) xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + ( void ) xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); @@ -204,14 +204,14 @@ extern cyisraddress CyRamVectors[]; /* Start the UART. */ UART_1_Start(); - + /* Initialise the LEDs. */ vParTestInitialise(); - + /* Start the PWM modules that drive the IntQueue tests. */ High_Frequency_PWM_0_Start(); High_Frequency_PWM_1_Start(); - + /* Start the timers for the Jitter test. */ Timer_20KHz_Start(); Timer_48MHz_Start(); @@ -228,73 +228,73 @@ extern unsigned portSHORT usMaxJitter; /* Intialise the sleeper. */ xDelay = xTaskGetTickCount(); - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ vTaskDelayUntil( &xDelay, mainCHECK_DELAY ); - + /* Check that all of the Demo tasks are still running. */ if( pdTRUE != xAreBlockingQueuesStillRunning() ) { usErrorCode |= 0x1; } - + if( pdTRUE != xAreBlockTimeTestTasksStillRunning() ) { usErrorCode |= 0x2; } - + if( pdTRUE != xAreCountingSemaphoreTasksStillRunning() ) { usErrorCode |= 0x4; } - + if( pdTRUE != xIsCreateTaskStillRunning() ) { usErrorCode |= 0x8; } - + if( pdTRUE != xAreDynamicPriorityTasksStillRunning() ) { usErrorCode |= 0x10; } - + if( pdTRUE != xAreMathsTaskStillRunning() ) { usErrorCode |= 0x20; } - + if( pdTRUE != xAreGenericQueueTasksStillRunning() ) { usErrorCode |= 0x40; } - + if( pdTRUE != xAreIntegerMathsTaskStillRunning() ) { usErrorCode |= 0x80; } - + if( pdTRUE != xArePollingQueuesStillRunning() ) { usErrorCode |= 0x100; } - + if( pdTRUE != xAreQueuePeekTasksStillRunning() ) { usErrorCode |= 0x200; } - + if( pdTRUE != xAreSemaphoreTasksStillRunning() ) { usErrorCode |= 0x400; } - + if( pdTRUE != xAreComTestTasksStillRunning() ) { usErrorCode |= 0x800; } - + if( pdTRUE != xAreIntQueueTasksStillRunning() ) { usErrorCode |= 0x1000; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c index f49dfcc80..548f042c5 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -122,7 +122,7 @@ extern void vSetupTimerTest( void ); /* * The Check task periodical interrogates each of the running tests to * ensure that they are still executing correctly. - * If all the tests pass, then the LCD is updated with Pass, the number of + * If all the tests pass, then the LCD is updated with Pass, the number of * iterations and the Jitter time calculated but the Fast Interrupt Test. * If any one of the tests fail, it is indicated with an error code printed on * the display. This indicator won't disappear until the device is reset. @@ -157,7 +157,7 @@ void main( void ) vStartInterruptQueueTasks(); /* Start the error checking task. */ - ( void ) xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + ( void ) xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); @@ -204,14 +204,14 @@ extern cyisraddress CyRamVectors[]; /* Start the UART. */ UART_1_Start(); - + /* Initialise the LEDs. */ vParTestInitialise(); - + /* Start the PWM modules that drive the IntQueue tests. */ High_Frequency_PWM_0_Start(); High_Frequency_PWM_1_Start(); - + /* Start the timers for the Jitter test. */ Timer_20KHz_Start(); Timer_48MHz_Start(); @@ -228,73 +228,73 @@ extern unsigned portSHORT usMaxJitter; /* Intialise the sleeper. */ xDelay = xTaskGetTickCount(); - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ vTaskDelayUntil( &xDelay, mainCHECK_DELAY ); - + /* Check that all of the Demo tasks are still running. */ if( pdTRUE != xAreBlockingQueuesStillRunning() ) { usErrorCode |= 0x1; } - + if( pdTRUE != xAreBlockTimeTestTasksStillRunning() ) { usErrorCode |= 0x2; } - + if( pdTRUE != xAreCountingSemaphoreTasksStillRunning() ) { usErrorCode |= 0x4; } - + if( pdTRUE != xIsCreateTaskStillRunning() ) { usErrorCode |= 0x8; } - + if( pdTRUE != xAreDynamicPriorityTasksStillRunning() ) { usErrorCode |= 0x10; } - + if( pdTRUE != xAreMathsTaskStillRunning() ) { usErrorCode |= 0x20; } - + if( pdTRUE != xAreGenericQueueTasksStillRunning() ) { usErrorCode |= 0x40; } - + if( pdTRUE != xAreIntegerMathsTaskStillRunning() ) { usErrorCode |= 0x80; } - + if( pdTRUE != xArePollingQueuesStillRunning() ) { usErrorCode |= 0x100; } - + if( pdTRUE != xAreQueuePeekTasksStillRunning() ) { usErrorCode |= 0x200; } - + if( pdTRUE != xAreSemaphoreTasksStillRunning() ) { usErrorCode |= 0x400; } - + if( pdTRUE != xAreComTestTasksStillRunning() ) { usErrorCode |= 0x800; } - + if( pdTRUE != xAreIntQueueTasksStillRunning() ) { usErrorCode |= 0x1000; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c index f49dfcc80..548f042c5 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -122,7 +122,7 @@ extern void vSetupTimerTest( void ); /* * The Check task periodical interrogates each of the running tests to * ensure that they are still executing correctly. - * If all the tests pass, then the LCD is updated with Pass, the number of + * If all the tests pass, then the LCD is updated with Pass, the number of * iterations and the Jitter time calculated but the Fast Interrupt Test. * If any one of the tests fail, it is indicated with an error code printed on * the display. This indicator won't disappear until the device is reset. @@ -157,7 +157,7 @@ void main( void ) vStartInterruptQueueTasks(); /* Start the error checking task. */ - ( void ) xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + ( void ) xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); @@ -204,14 +204,14 @@ extern cyisraddress CyRamVectors[]; /* Start the UART. */ UART_1_Start(); - + /* Initialise the LEDs. */ vParTestInitialise(); - + /* Start the PWM modules that drive the IntQueue tests. */ High_Frequency_PWM_0_Start(); High_Frequency_PWM_1_Start(); - + /* Start the timers for the Jitter test. */ Timer_20KHz_Start(); Timer_48MHz_Start(); @@ -228,73 +228,73 @@ extern unsigned portSHORT usMaxJitter; /* Intialise the sleeper. */ xDelay = xTaskGetTickCount(); - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ vTaskDelayUntil( &xDelay, mainCHECK_DELAY ); - + /* Check that all of the Demo tasks are still running. */ if( pdTRUE != xAreBlockingQueuesStillRunning() ) { usErrorCode |= 0x1; } - + if( pdTRUE != xAreBlockTimeTestTasksStillRunning() ) { usErrorCode |= 0x2; } - + if( pdTRUE != xAreCountingSemaphoreTasksStillRunning() ) { usErrorCode |= 0x4; } - + if( pdTRUE != xIsCreateTaskStillRunning() ) { usErrorCode |= 0x8; } - + if( pdTRUE != xAreDynamicPriorityTasksStillRunning() ) { usErrorCode |= 0x10; } - + if( pdTRUE != xAreMathsTaskStillRunning() ) { usErrorCode |= 0x20; } - + if( pdTRUE != xAreGenericQueueTasksStillRunning() ) { usErrorCode |= 0x40; } - + if( pdTRUE != xAreIntegerMathsTaskStillRunning() ) { usErrorCode |= 0x80; } - + if( pdTRUE != xArePollingQueuesStillRunning() ) { usErrorCode |= 0x100; } - + if( pdTRUE != xAreQueuePeekTasksStillRunning() ) { usErrorCode |= 0x200; } - + if( pdTRUE != xAreSemaphoreTasksStillRunning() ) { usErrorCode |= 0x400; } - + if( pdTRUE != xAreComTestTasksStillRunning() ) { usErrorCode |= 0x800; } - + if( pdTRUE != xAreIntQueueTasksStillRunning() ) { usErrorCode |= 0x1000; diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c index bcb3dd493..80800ccea 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,21 +70,21 @@ * main-full.c (this file) defines a comprehensive demo that creates many * tasks, queues, semaphores and timers. It also demonstrates how Cortex-M3 * interrupts can interact with FreeRTOS tasks/timers, a simple web server, and - * run time statistics gathering functionality. ***IF YOU ARE LOOKING FOR A + * run time statistics gathering functionality. ***IF YOU ARE LOOKING FOR A * SIMPLER STARTING POINT THEN USE THE "BLINKY" BUILD CONFIGURATION FIRST.*** * - * If the Ethernet functionality is excluded, then this demo will run 'stand - * alone' (without the rest of the tower system) on the TWR-K60N512 tower + * If the Ethernet functionality is excluded, then this demo will run 'stand + * alone' (without the rest of the tower system) on the TWR-K60N512 tower * module. If the Ethernet functionality is included, then the full Freescale - * K60 tower kit, including both the TWR-K60N512 and TWR-SER modules, is - * required (as the Ethernet connector is on the TWR-SER). The TWR-K60N512 is + * K60 tower kit, including both the TWR-K60N512 and TWR-SER modules, is + * required (as the Ethernet connector is on the TWR-SER). The TWR-K60N512 is * populated with a K60N512 Cortex-M4 microcontroller. * * The main() Function: * main() creates four demo specific software timers, and one demo specific * task (the web server task). It also creates a whole host of 'standard - * demo' tasks/queues/semaphores/timers, before starting the scheduler. The - * demo specific tasks and timers are described in the comments here. The + * demo' tasks/queues/semaphores/timers, before starting the scheduler. The + * demo specific tasks and timers are described in the comments here. The * standard demo tasks are described on the FreeRTOS.org web site. * * The standard demo tasks provide no specific functionality. They are @@ -97,33 +97,33 @@ * * The Demo Specific "LED" Timers and Callback Function: * Two very simple LED timers are created. All they do is toggle an LED each - * when the timer callback function is executed. The two timers share a - * callback function, so the callback function parameter is used to determine - * which timer actually expired, and therefore, which LED to toggle. Both - * timers use a different frequency, one toggles the blue LED and the other the + * when the timer callback function is executed. The two timers share a + * callback function, so the callback function parameter is used to determine + * which timer actually expired, and therefore, which LED to toggle. Both + * timers use a different frequency, one toggles the blue LED and the other the * green LED. * * The LED/Button Software Timer and the Button Interrupt: * The user button SW2 is configured to generate an interrupt each time it is - * pressed. The interrupt service routine switches the orange/yellow LED on, - * and resets the LED software timer. The LED timer has a 5000 millisecond (5 - * second) period, and uses a callback function that is defined to just turn the - * LED off again. Therefore, pressing the user button will turn the LED on, and - * the LED will remain on until a full five seconds pass without the button + * pressed. The interrupt service routine switches the orange/yellow LED on, + * and resets the LED software timer. The LED timer has a 5000 millisecond (5 + * second) period, and uses a callback function that is defined to just turn the + * LED off again. Therefore, pressing the user button will turn the LED on, and + * the LED will remain on until a full five seconds pass without the button * being pressed. * * The Demo Specific "Check" Timer and Callback Function: - * The check timer period is initially set to three seconds. The check timer - * callback function checks that all the standard demo tasks are not only still - * executing, but are executing without reporting any errors. If the check - * timer discovers that a task has either stalled, or reported an error, then it - * changes its own period from the initial three seconds, to just 200ms. The - * check timer callback function also toggles the orange/red LED each time it is - * called. This provides a visual indication of the system status: If the LED - * toggles every three seconds, then no issues have been discovered. If the LED - * toggles every 200ms, then an issue has been discovered with at least one - * task. The last reported issue is latched into the pcStatusMessage variable, - * and displayed at the bottom of the "task stats" web page served by the + * The check timer period is initially set to three seconds. The check timer + * callback function checks that all the standard demo tasks are not only still + * executing, but are executing without reporting any errors. If the check + * timer discovers that a task has either stalled, or reported an error, then it + * changes its own period from the initial three seconds, to just 200ms. The + * check timer callback function also toggles the orange/red LED each time it is + * called. This provides a visual indication of the system status: If the LED + * toggles every three seconds, then no issues have been discovered. If the LED + * toggles every 200ms, then an issue has been discovered with at least one + * task. The last reported issue is latched into the pcStatusMessage variable, + * and displayed at the bottom of the "task stats" web page served by the * embedded web server task. * * The web server task: @@ -142,7 +142,7 @@ * The Demo Specific Tick Hook Function: * The tick hook function is used to test the interrupt safe software timer * functionality. - * + * */ /* Kernel includes. */ @@ -204,7 +204,7 @@ reported in one of the standard demo tasks. ms are converted to the equivalent in ticks using the portTICK_RATE_MS constant. */ #define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) -/* The LED that is turned on by pressing SW2 remains on until the button has not +/* The LED that is turned on by pressing SW2 remains on until the button has not been pushed for a full 5000ms. */ #define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) @@ -234,7 +234,7 @@ static void prvSetupHardware( void ); static void prvCreateDemoSpecificTimers( void ); /* - * The LED/button timer callback function. This does nothing but switch an LED + * The LED/button timer callback function. This does nothing but switch an LED * off. */ static void prvButtonLEDTimerCallback( xTimerHandle xTimer ); @@ -258,7 +258,7 @@ extern void vuIP_Task( void *pvParameters ); /*-----------------------------------------------------------*/ -/* The LED/Button software timer. This uses prvButtonLEDTimerCallback() as it's +/* The LED/Button software timer. This uses prvButtonLEDTimerCallback() as it's callback function. */ static xTimerHandle xLEDButtonTimer = NULL; @@ -302,7 +302,7 @@ void main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); - + /* The web server task. */ xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); @@ -381,12 +381,12 @@ static long lChangedTimerPeriodAlready = pdFALSE; { pcStatusMessage = "Error: CountSem\n"; } - + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: DynamicPriority\n"; } - + /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ @@ -401,9 +401,9 @@ static long lChangedTimerPeriodAlready = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - - /* This call to xTimerChangePeriod() uses a zero block time. - Functions called from inside of a timer callback function must + + /* This call to xTimerChangePeriod() uses a zero block time. + Functions called from inside of a timer callback function must *never* attempt to block. */ xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); } @@ -464,11 +464,11 @@ static void prvSetupHardware( void ) taskDISABLE_INTERRUPTS(); PORTE_PCR26 = PORT_PCR_MUX( 1 ) | PORT_PCR_IRQC( 0xA ) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK; enable_irq( mainGPIO_E_VECTOR ); - + /* The interrupt calls an interrupt safe API function - so its priority must be equal to or lower than configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY. */ set_irq_priority( mainGPIO_E_VECTOR, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); - + /* Configure the LED outputs. */ vParTestInitialise(); } @@ -477,48 +477,48 @@ static void prvSetupHardware( void ) static void prvCreateDemoSpecificTimers( void ) { /* This function creates the timers, but does not start them. This is - because the standard demo timer test is started from main(), after this - function is called. The standard demo timer test will deliberately fill the - timer command queue - and will fail the test if the command queue already - holds start commands for the timers created here. Instead, the timers - created in this function are started from the idle task, at which time, the - timer service/daemon task will be running, and will have drained the timer + because the standard demo timer test is started from main(), after this + function is called. The standard demo timer test will deliberately fill the + timer command queue - and will fail the test if the command queue already + holds start commands for the timers created here. Instead, the timers + created in this function are started from the idle task, at which time, the + timer service/daemon task will be running, and will have drained the timer command queue. */ - + /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDButtonTimer = xTimerCreate( ( const signed char * ) "ButtonLEDTimer", /* A text name, purely to help debugging. */ - ( mainBUTTON_LED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvButtonLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDButtonTimer = xTimerCreate( "ButtonLEDTimer", /* A text name, purely to help debugging. */ + ( mainBUTTON_LED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvButtonLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); - + /* Create the software timers used to simply flash LEDs. These two timers share a callback function, so the callback parameter is used to pass in the LED that should be toggled. */ - xLED1Timer = xTimerCreate( ( const signed char * ) "LED1Timer",/* A text name, purely to help debugging. */ - ( mainLED1_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) mainLED0, /* The ID is used to pass in the number of the LED to be toggled. */ - prvLEDTimerCallback /* The callback function simply toggles the LED specified by its parameter. */ + xLED1Timer = xTimerCreate( "LED1Timer", /* A text name, purely to help debugging. */ + ( mainLED1_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) mainLED0, /* The ID is used to pass in the number of the LED to be toggled. */ + prvLEDTimerCallback /* The callback function simply toggles the LED specified by its parameter. */ ); - xLED2Timer = xTimerCreate( ( const signed char * ) "LED2Timer",/* A text name, purely to help debugging. */ - ( mainLED2_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) mainLED1, /* The ID is used to pass in the number of the LED to be toggled. */ - prvLEDTimerCallback /* The callback function simply toggles the LED specified by its parameter. */ + xLED2Timer = xTimerCreate( "LED2Timer", /* A text name, purely to help debugging. */ + ( mainLED2_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) mainLED1, /* The ID is used to pass in the number of the LED to be toggled. */ + prvLEDTimerCallback /* The callback function simply toggles the LED specified by its parameter. */ ); } /*-----------------------------------------------------------*/ @@ -570,9 +570,9 @@ volatile size_t xFreeHeapSpace; xTimerStart( xCheckTimer, portMAX_DELAY ); xTimerStart( xLED1Timer, portMAX_DELAY ); xTimerStart( xLED2Timer, portMAX_DELAY ); - + xFreeHeapSpace = xPortGetFreeHeapSize(); - + if( xFreeHeapSpace > 100 ) { /* By now, the kernel has allocated everything it is going to, so @@ -589,12 +589,12 @@ void vApplicationTickHook( void ) /* Call the periodic timer test, which tests the timer API functions that can be called from an ISR. */ vTimerPeriodicISRTests(); -} +} /*-----------------------------------------------------------*/ char *pcGetTaskStatusMessage( void ) { - /* A simple GET function used by a CGI script so it can display the + /* A simple GET function used by a CGI script so it can display the execution status at the bottom of the task stats web page served by the embedded web server. */ if( pcStatusMessage == NULL ) @@ -631,7 +631,7 @@ const unsigned long ulSysTickPendingBit = 0x04000000UL; /* The SysTick is a down counter. How many clocks have passed since it was last reloaded? */ ulSysTickCounts = ulSysTickReloadValue - *pulCurrentSysTickCount; - + /* How many times has it overflowed? */ ulTickCount = xTaskGetTickCountFromISR(); @@ -640,28 +640,28 @@ const unsigned long ulSysTickPendingBit = 0x04000000UL; section, and the ISR safe critical sections are not designed to nest, so reset the critical section. */ portSET_INTERRUPT_MASK_FROM_ISR(); - + /* Is there a SysTick interrupt pending? */ if( ( *pulInterruptCTRLState & ulSysTickPendingBit ) != 0UL ) { /* There is a SysTick interrupt pending, so the SysTick has overflowed but the tick count not yet incremented. */ ulTickCount++; - + /* Read the SysTick again, as the overflow might have occurred since it was read last. */ ulSysTickCounts = ulSysTickReloadValue - *pulCurrentSysTickCount; - } - + } + /* Convert the tick count into tenths of a millisecond. THIS ASSUMES configTICK_RATE_HZ is 1000! */ ulReturn = ( ulTickCount * 10UL ) ; - + /* Add on the number of tenths of a millisecond that have passed since the tick count last got updated. */ ulReturn += ( ulSysTickCounts / ulClocksPer10thOfAMilliSecond ); - - return ulReturn; + + return ulReturn; } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c index 924650000..82163bc29 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -95,22 +95,22 @@ * in this file. prvQueueReceiveTask() sits in a loop that causes it to * repeatedly attempt to read data from the queue that was created within * main(). When data is received, the task checks the value of the data, and - * if the value equals the expected 100, toggles the blue LED. The 'block - * time' parameter passed to the queue receive function specifies that the task - * should be held in the Blocked state indefinitely to wait for data to be - * available on the queue. The queue receive task will only leave the Blocked - * state when the queue send task writes to the queue. As the queue send task - * writes to the queue every 200 milliseconds, the queue receive task leaves the - * Blocked state every 200 milliseconds, and therefore toggles the blue LED + * if the value equals the expected 100, toggles the blue LED. The 'block + * time' parameter passed to the queue receive function specifies that the task + * should be held in the Blocked state indefinitely to wait for data to be + * available on the queue. The queue receive task will only leave the Blocked + * state when the queue send task writes to the queue. As the queue send task + * writes to the queue every 200 milliseconds, the queue receive task leaves the + * Blocked state every 200 milliseconds, and therefore toggles the blue LED * every 200 milliseconds. * * The LED Software Timer and the Button Interrupt: * The user button SW2 is configured to generate an interrupt each time it is - * pressed. The interrupt service routine switches the green LED on, and - * resets the LED software timer. The LED timer has a 5000 millisecond (5 - * second) period, and uses a callback function that is defined to just turn the - * LED off again. Therefore, pressing the user button will turn the LED on, and - * the LED will remain on until a full five seconds pass without the button + * pressed. The interrupt service routine switches the green LED on, and + * resets the LED software timer. The LED timer has a 5000 millisecond (5 + * second) period, and uses a callback function that is defined to just turn the + * LED off again. Therefore, pressing the user button will turn the LED on, and + * the LED will remain on until a full five seconds pass without the button * being pressed. */ @@ -196,17 +196,17 @@ void main( void ) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xButtonLEDTimer = xTimerCreate( ( const signed char * ) "ButtonLEDTimer", /* A text name, purely to help debugging. */ - mainBUTTON_LED_TIMER_PERIOD_MS, /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvButtonLEDTimerCallback /* The callback function that switches the LED off. */ + xButtonLEDTimer = xTimerCreate( "ButtonLEDTimer", /* A text name, purely to help debugging. */ + mainBUTTON_LED_TIMER_PERIOD_MS, /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvButtonLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ @@ -308,20 +308,20 @@ static void prvSetupHardware( void ) /* Enable the interrupt on SW1. */ PORTE_PCR26 = PORT_PCR_MUX( 1 ) | PORT_PCR_IRQC( 0xA ) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK; enable_irq( mainGPIO_E_VECTOR ); - + /* The interrupt calls an interrupt safe API function - so its priority must be equal to or lower than configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY. */ set_irq_priority( mainGPIO_E_VECTOR, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); - + /* Set PTA10, PTA11, PTA28, and PTA29 (connected to LED's) for GPIO functionality. */ PORTA_PCR10 = ( 0 | PORT_PCR_MUX( 1 ) ); PORTA_PCR11 = ( 0 | PORT_PCR_MUX( 1 ) ); PORTA_PCR28 = ( 0 | PORT_PCR_MUX( 1 ) ); PORTA_PCR29 = ( 0 | PORT_PCR_MUX( 1 ) ); - + /* Change PTA10, PTA29 to outputs. */ - GPIOA_PDDR=GPIO_PDDR_PDD( mainTASK_CONTROLLED_LED | mainTIMER_CONTROLLED_LED ); + GPIOA_PDDR=GPIO_PDDR_PDD( mainTASK_CONTROLLED_LED | mainTIMER_CONTROLLED_LED ); /* Start with LEDs off. */ GPIOA_PTOR = ~0U; @@ -387,9 +387,9 @@ linker happy. */ void vMainConfigureTimerForRunTimeStats( void ) {} unsigned long ulMainGetRunTimeCounterValue( void ) { return 0UL; } -/* A tick hook is used by the "Full" build configuration. The Full and blinky -build configurations share a FreeRTOSConfig.h header file, so this simple build -configuration also has to define a tick hook - even though it does not actually +/* A tick hook is used by the "Full" build configuration. The Full and blinky +build configurations share a FreeRTOSConfig.h header file, so this simple build +configuration also has to define a tick hook - even though it does not actually use it for anything. */ void vApplicationTickHook( void ) {} diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c index 8319b6330..dba1a26b6 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -166,7 +166,7 @@ unsigned short usPacketLength; if( ( usPacketLength > 0U ) && ( uip_buf != NULL ) ) { uip_len = usPacketLength; - + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { uip_arp_ipin(); @@ -210,7 +210,7 @@ unsigned short usPacketLength; for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); - + /* If the above function invocation resulted in data that should be sent out on the network, the global variable uip_len is set to a value > 0. */ @@ -273,14 +273,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; xEMACEventQueue = xQueueCreate( uipEVENT_QUEUE_LENGTH, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( signed char * ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( signed char * ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 500UL / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -328,7 +328,7 @@ const unsigned long ulYellowLED = 2UL; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-cgi.c index 127046d4f..7048d8364 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -228,13 +228,13 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats( void *arg ) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c index 50547841a..8a05d4ca1 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -246,7 +246,7 @@ int main( void ) PHY. */ if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) ) { - xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); } /* Start the standard demo tasks. */ @@ -261,7 +261,7 @@ int main( void ) vStartInterruptQueueTasks(); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether @@ -363,7 +363,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; { xMessage.pcMessage = "ERROR IN INT QUEUE"; } - + /* Send the message to the OLED gatekeeper for display. */ xHigherPriorityTaskWoken = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c index 69e8ec6f1..36b2798de 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -140,14 +140,14 @@ portBASE_TYPE xReturn; { ulRxLength[ ulTemp ] = 0; } - + /* Create the queue and task used to defer the MAC processing to the task level. */ vSemaphoreCreateBinary( xMACInterruptSemaphore ); xSemaphoreTake( xMACInterruptSemaphore, 0 ); - xReturn = xTaskCreate( vMACHandleTask, ( signed portCHAR * ) "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + xReturn = xTaskCreate( vMACHandleTask, "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); vTaskDelay( macNEGOTIATE_DELAY ); - + /* We are only interested in Rx interrupts. */ IntPrioritySet( INT_ETH, configKERNEL_INTERRUPT_PRIORITY ); IntEnable( INT_ETH ); @@ -168,9 +168,9 @@ unsigned int iLen; { /* Leave room for the size at the start of the buffer. */ uip_buf = &( ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); - + ulRxLength[ ulNextRxBuffer ] = 0; - + ulNextRxBuffer++; if( ulNextRxBuffer >= emacNUM_RX_BUFFERS ) { @@ -214,9 +214,9 @@ unsigned portLONG ulNextWord; { vTaskDelay( macWAIT_SEND_TIME ); } - - pulSource = ( unsigned portLONG * ) pus; - + + pulSource = ( unsigned portLONG * ) pus; + for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned portLONG ) ) { HWREG(ETH_BASE + MAC_O_DATA) = *pulSource; @@ -236,14 +236,14 @@ unsigned portLONG ulTemp; /* Clear the interrupt. */ ulTemp = EthernetIntStatus( ETH_BASE, pdFALSE ); EthernetIntClear( ETH_BASE, ulTemp ); - + /* Was it an Rx interrupt? */ if( ulTemp & ETH_INT_RX ) { xSemaphoreGiveFromISR( xMACInterruptSemaphore, &xHigherPriorityTaskWoken ); EthernetIntDisable( ETH_BASE, ETH_INT_RX ); } - + /* Switch to the uIP task. */ portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); } @@ -261,23 +261,23 @@ portBASE_TYPE xSwitchRequired = pdFALSE; { /* Wait for something to do. */ xSemaphoreTake( xMACInterruptSemaphore, portMAX_DELAY ); - + while( ( ulInt = ( EthernetIntStatus( ETH_BASE, pdFALSE ) & ETH_INT_RX ) ) != 0 ) - { + { ulLength = HWREG( ETH_BASE + MAC_O_DATA ); - + /* Leave room at the start of the buffer for the size. */ - pulBuffer = ( unsigned long * ) &( ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); + pulBuffer = ( unsigned long * ) &( ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); *pulBuffer = ( ulLength >> 16 ); - /* Get the size of the data. */ - pulBuffer = ( unsigned long * ) &( ucRxBuffers[ ulNextRxBuffer ][ 4 ] ); + /* Get the size of the data. */ + pulBuffer = ( unsigned long * ) &( ucRxBuffers[ ulNextRxBuffer ][ 4 ] ); ulLength &= 0xFFFF; - + if( ulLength > 4 ) { ulLength -= 4; - + if( ulLength >= UIP_BUFSIZE ) { /* The data won't fit in our buffer. Ensure we don't @@ -291,22 +291,22 @@ portBASE_TYPE xSwitchRequired = pdFALSE; *pulBuffer = HWREG( ETH_BASE + MAC_O_DATA ); pulBuffer++; } - + /* Store the length of the data into the separate array. */ ulRxLength[ ulNextRxBuffer ] = ulLength; - + /* Use the next buffer the next time through. */ ulNextRxBuffer++; if( ulNextRxBuffer >= emacNUM_RX_BUFFERS ) { ulNextRxBuffer = 0; } - + /* Ensure the uIP task is not blocked as data has arrived. */ xSemaphoreGive( xEMACSemaphore ); } } - + EthernetIntEnable( ETH_BASE, ETH_INT_RX ); } } diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/httpd-cgi.c index 5a5ce9b5f..7248cf95e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/httpd-cgi.c @@ -205,7 +205,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -213,7 +213,7 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -254,13 +254,13 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c index 437675fb6..a97cda902 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -269,7 +269,7 @@ int main( void ) PHY. */ if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) ) { - xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); } } #endif @@ -277,7 +277,7 @@ int main( void ) /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c index 8570d6611..b91e9aca8 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -144,14 +144,14 @@ portBASE_TYPE xReturn; { ulRxLength[ ulTemp ] = 0; } - + /* Create the queue and task used to defer the MAC processing to the task level. */ vSemaphoreCreateBinary( xMACInterruptSemaphore ); xSemaphoreTake( xMACInterruptSemaphore, 0 ); - xReturn = xTaskCreate( vMACHandleTask, ( signed portCHAR * ) "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + xReturn = xTaskCreate( vMACHandleTask, "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); vTaskDelay( macNEGOTIATE_DELAY ); - + /* We are only interested in Rx interrupts. */ IntPrioritySet( INT_ETH, configKERNEL_INTERRUPT_PRIORITY ); IntEnable( INT_ETH ); @@ -172,9 +172,9 @@ unsigned int iLen; { /* Leave room for the size at the start of the buffer. */ uip_buf = &( uxRxBuffers.ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); - + ulRxLength[ ulNextRxBuffer ] = 0; - + ulNextRxBuffer++; if( ulNextRxBuffer >= emacNUM_RX_BUFFERS ) { @@ -218,9 +218,9 @@ unsigned portLONG ulNextWord; { vTaskDelay( macWAIT_SEND_TIME ); } - - pulSource = ( unsigned portLONG * ) pus; - + + pulSource = ( unsigned portLONG * ) pus; + for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned portLONG ) ) { HWREG(ETH_BASE + MAC_O_DATA) = *pulSource; @@ -240,14 +240,14 @@ unsigned portLONG ulTemp; /* Clear the interrupt. */ ulTemp = EthernetIntStatus( ETH_BASE, pdFALSE ); EthernetIntClear( ETH_BASE, ulTemp ); - + /* Was it an Rx interrupt? */ if( ulTemp & ETH_INT_RX ) { xSemaphoreGiveFromISR( xMACInterruptSemaphore, &xHigherPriorityTaskWoken ); EthernetIntDisable( ETH_BASE, ETH_INT_RX ); } - + /* Switch to the uIP task. */ portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); } @@ -264,23 +264,23 @@ static unsigned portLONG ulNextRxBuffer = 0; { /* Wait for something to do. */ xSemaphoreTake( xMACInterruptSemaphore, portMAX_DELAY ); - + while( ( ulInt = ( EthernetIntStatus( ETH_BASE, pdFALSE ) & ETH_INT_RX ) ) != 0 ) - { + { ulLength = HWREG( ETH_BASE + MAC_O_DATA ); - + /* Leave room at the start of the buffer for the size. */ - pulBuffer = ( unsigned long * ) &( uxRxBuffers.ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); + pulBuffer = ( unsigned long * ) &( uxRxBuffers.ucRxBuffers[ ulNextRxBuffer ][ 2 ] ); *pulBuffer = ( ulLength >> 16 ); - /* Get the size of the data. */ - pulBuffer = ( unsigned long * ) &( uxRxBuffers.ucRxBuffers[ ulNextRxBuffer ][ 4 ] ); + /* Get the size of the data. */ + pulBuffer = ( unsigned long * ) &( uxRxBuffers.ucRxBuffers[ ulNextRxBuffer ][ 4 ] ); ulLength &= 0xFFFF; - + if( ulLength > 4 ) { ulLength -= 4; - + if( ulLength >= UIP_BUFSIZE ) { /* The data won't fit in our buffer. Ensure we don't @@ -294,24 +294,24 @@ static unsigned portLONG ulNextRxBuffer = 0; *pulBuffer = HWREG( ETH_BASE + MAC_O_DATA ); pulBuffer++; } - + /* Store the length of the data into the separate array. */ ulRxLength[ ulNextRxBuffer ] = ulLength; - + /* Use the next buffer the next time through. */ ulNextRxBuffer++; if( ulNextRxBuffer >= emacNUM_RX_BUFFERS ) { ulNextRxBuffer = 0; } - + /* Ensure the uIP task is not blocked as data has arrived. */ xSemaphoreGive( xEMACSemaphore ); } } - + EthernetIntEnable( ETH_BASE, ETH_INT_RX ); - + ( void ) ulInt; } } diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/httpd-cgi.c index 803b771e6..f1dbea708 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/httpd-cgi.c @@ -204,7 +204,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -212,7 +212,7 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c index 09c9414ff..6e069e1ed 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -247,7 +247,7 @@ int main( void ) PHY. */ if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) ) { - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); } /* Start the standard demo tasks. */ @@ -263,7 +263,7 @@ int main( void ) vStartQueueSetTasks(); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vOLEDTask, ( signed char * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c index 60e17dec5..1de60d43b 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -145,7 +145,7 @@ portBASE_TYPE xReturn; task level. */ vSemaphoreCreateBinary( xMACInterruptSemaphore ); xSemaphoreTake( xMACInterruptSemaphore, 0 ); - xReturn = xTaskCreate( vMACHandleTask, ( signed char * ) "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + xReturn = xTaskCreate( vMACHandleTask, "MAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); vTaskDelay( macNEGOTIATE_DELAY ); /* We are only interested in Rx interrupts. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/httpd-cgi.c index 1bf08e283..c45a19a69 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/httpd-cgi.c @@ -205,7 +205,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -213,7 +213,7 @@ generate_rtos_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -254,13 +254,13 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c index 1329e2163..073f782ef 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -80,7 +80,7 @@ * * "uIP" task - This is the task that handles the uIP stack. All TCP/IP * processing is performed in this task. - * + * * "USB" task - Enumerates the USB device as a CDC class, then echoes back all * received characters with a configurable offset (for example, if the offset * is 1 and 'A' is received then 'B' will be sent back). A dumb terminal such @@ -187,15 +187,15 @@ char cIPAddress[ 16 ]; /* Enough space for "xxx.xxx.xxx.xxx\0". */ vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY ); /* Create the USB task. */ - xTaskCreate( vUSBTask, ( signed char * ) "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - - /* Display the IP address, then create the uIP task. The WEB server runs + xTaskCreate( vUSBTask, "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + + /* Display the IP address, then create the uIP task. The WEB server runs in this task. */ LCDdriver_initialisation(); LCD_PrintString( 5, 10, "FreeRTOS.org", 14, COLOR_GREEN); sprintf( cIPAddress, "%d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); LCD_PrintString( 5, 30, cIPAddress, 14, COLOR_RED); - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -284,48 +284,48 @@ void prvSetupHardware( void ) LPC_SC->PLL0FEED = PLLFEED_FEED1; LPC_SC->PLL0FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ LPC_SC->PLL0CON = 0; LPC_SC->PLL0FEED = PLLFEED_FEED1; LPC_SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable main OSC. */ LPC_SC->SCS |= 0x20; while( !( LPC_SC->SCS & 0x40 ) ); - + /* select main OSC, 12MHz, as the PLL clock source. */ LPC_SC->CLKSRCSEL = 0x1; - + LPC_SC->PLL0CFG = 0x20031; LPC_SC->PLL0FEED = PLLFEED_FEED1; LPC_SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ LPC_SC->PLL0CON = 1; LPC_SC->PLL0FEED = PLLFEED_FEED1; LPC_SC->PLL0FEED = PLLFEED_FEED2; - + /* Set clock divider. */ LPC_SC->CCLKCFG = 0x03; - + /* Configure flash accelerator. */ LPC_SC->FLASHCFG = 0x403a; - + /* Check lock bit status. */ while( ( ( LPC_SC->PLL0STAT & ( 1 << 26 ) ) == 0 ) ); - + /* Enable and connect. */ LPC_SC->PLL0CON = 3; LPC_SC->PLL0FEED = PLLFEED_FEED1; LPC_SC->PLL0FEED = PLLFEED_FEED2; while( ( ( LPC_SC->PLL0STAT & ( 1 << 25 ) ) == 0 ) ); - - - + + + /* Configure the clock for the USB. */ - + if( LPC_SC->PLL1STAT & ( 1 << 9 ) ) { /* Enable PLL, disconnected. */ @@ -333,22 +333,22 @@ void prvSetupHardware( void ) LPC_SC->PLL1FEED = PLLFEED_FEED1; LPC_SC->PLL1FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ LPC_SC->PLL1CON = 0; LPC_SC->PLL1FEED = PLLFEED_FEED1; LPC_SC->PLL1FEED = PLLFEED_FEED2; - + LPC_SC->PLL1CFG = 0x23; LPC_SC->PLL1FEED = PLLFEED_FEED1; LPC_SC->PLL1FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ LPC_SC->PLL1CON = 1; LPC_SC->PLL1FEED = PLLFEED_FEED1; LPC_SC->PLL1FEED = PLLFEED_FEED2; while( ( ( LPC_SC->PLL1STAT & ( 1 << 10 ) ) == 0 ) ); - + /* Enable and connect. */ LPC_SC->PLL1CON = 3; LPC_SC->PLL1FEED = PLLFEED_FEED1; diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/httpd-cgi.c index 2be6e3ee1..319fb1c18 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/httpd-cgi.c @@ -207,7 +207,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[ 128 ]; long lRefreshCount = 0; @@ -217,7 +217,7 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", (int)lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -261,14 +261,14 @@ const unsigned long ulLEDNo = 3; } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", (int)lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c index 7afed37be..4673a646d 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -80,7 +80,7 @@ * * "uIP" task - This is the task that handles the uIP stack. All TCP/IP * processing is performed in this task. - * + * * "USB" task - Enumerates the USB device as a CDC class, then echoes back all * received characters with a configurable offset (for example, if the offset * is 1 and 'A' is received then 'B' will be sent back). A dumb terminal such @@ -174,10 +174,10 @@ int main( void ) vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY ); /* Create the USB task. */ - xTaskCreate( vUSBTask, ( signed char * ) "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - + xTaskCreate( vUSBTask, "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + /* Create the uIP task. The WEB server runs in this task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/httpd-cgi.c index dfcedb833..9a51bc76a 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/httpd-cgi.c @@ -207,7 +207,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[ 128 ]; long lRefreshCount = 0; @@ -217,7 +217,7 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", (int)lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -261,14 +261,14 @@ extern long lParTestGetLEDState( void ); } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", (int)lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c index e4cc20e2c..a3abb26b2 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -181,13 +181,13 @@ int main( void ) vStartRecursiveMutexTasks(); /* Create the simple LED flash task. */ - xTaskCreate( prvFlashTask, ( signed char * ) "Flash", configMINIMAL_STACK_SIZE, ( void * ) NULL, mainFLASH_TASK_PRIORITY, NULL ); - + xTaskCreate( prvFlashTask, "Flash", configMINIMAL_STACK_SIZE, ( void * ) NULL, mainFLASH_TASK_PRIORITY, NULL ); + /* Create the USB task. */ - xTaskCreate( vUSBTask, ( signed char * ) "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - + xTaskCreate( vUSBTask, "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + /* Create the uIP task. The WEB server runs in this task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -289,81 +289,81 @@ void prvSetupHardware( void ) if ( SC->PLL0STAT & ( 1 << 25 ) ) { /* Enable PLL, disconnected. */ - SC->PLL0CON = 1; + SC->PLL0CON = 1; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ - SC->PLL0CON = 0; + SC->PLL0CON = 0; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable main OSC. */ - SC->SCS |= 0x20; + SC->SCS |= 0x20; while( !( SC->SCS & 0x40 ) ); - + /* select main OSC, 12MHz, as the PLL clock source. */ - SC->CLKSRCSEL = 0x1; - + SC->CLKSRCSEL = 0x1; + SC->PLL0CFG = 0x20031; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ - SC->PLL0CON = 1; + SC->PLL0CON = 1; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Set clock divider. */ SC->CCLKCFG = 0x03; - + /* Configure flash accelerator. */ SC->FLASHCFG = 0x403a; - + /* Check lock bit status. */ - while( ( ( SC->PLL0STAT & ( 1 << 26 ) ) == 0 ) ); - + while( ( ( SC->PLL0STAT & ( 1 << 26 ) ) == 0 ) ); + /* Enable and connect. */ - SC->PLL0CON = 3; + SC->PLL0CON = 3; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - while( ( ( SC->PLL0STAT & ( 1 << 25 ) ) == 0 ) ); + while( ( ( SC->PLL0STAT & ( 1 << 25 ) ) == 0 ) ); + + + - - - /* Configure the clock for the USB. */ - + if( SC->PLL1STAT & ( 1 << 9 ) ) { /* Enable PLL, disconnected. */ - SC->PLL1CON = 1; + SC->PLL1CON = 1; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ - SC->PLL1CON = 0; + SC->PLL1CON = 0; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; - + SC->PLL1CFG = 0x23; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ - SC->PLL1CON = 1; + SC->PLL1CON = 1; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; while( ( ( SC->PLL1STAT & ( 1 << 10 ) ) == 0 ) ); - + /* Enable and connect. */ - SC->PLL1CON = 3; + SC->PLL1CON = 3; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; while( ( ( SC->PLL1STAT & ( 1 << 9 ) ) == 0 ) ); - + /* Setup the peripheral bus to be the same as the PLL output (64 MHz). */ SC->PCLKSEL0 = 0x05555555; diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/httpd-cgi.c index dfcedb833..9a51bc76a 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/httpd-cgi.c @@ -207,7 +207,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[ 128 ]; long lRefreshCount = 0; @@ -217,7 +217,7 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", (int)lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -261,14 +261,14 @@ extern long lParTestGetLEDState( void ); } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", (int)lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c index 995ddfadb..f70a208c4 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT @@ -199,7 +199,7 @@ void vRegisterSampleCLICommands( void ) static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n"; +const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -209,8 +209,8 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac configASSERT( pcWriteBuffer ); /* Generate a table of task stats. */ - strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskList( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + strcpy( ( char * ) pcWriteBuffer, pcHeader ); + vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ @@ -220,7 +220,7 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n"; +const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -231,7 +231,7 @@ const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Ti /* Generate a table of task stats. */ strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskGetRunTimeStats( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c index c656fc9b2..e561b9c4b 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c @@ -149,7 +149,7 @@ void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPr /* Create that task that handles the console itself. */ xTaskCreate( prvUARTCommandConsoleTask, /* The task that implements the command console. */ - ( const int8_t * const ) "CLI", /* Text name assigned to the task. This is just to assist debugging. The kernel does not use this name itself. */ + "CLI", /* Text name assigned to the task. This is just to assist debugging. The kernel does not use this name itself. */ usStackSize, /* The size of the stack allocated to the task. */ NULL, /* The parameter is not used, so NULL is passed. */ uxPriority, /* The priority allocated to the task. */ diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c index 95a2be40e..9575dde01 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c @@ -155,13 +155,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c index ca25a494a..315f3e097 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c @@ -209,14 +209,14 @@ const size_t xRegTestStackSize = 25U; These are naked functions that don't use any stack. A stack still has to be allocated to hold the task context. */ xTaskCreate( vRegTest1Task, /* Function that implements the task. */ - ( signed char * ) "Reg1", /* Text name of the task. */ + "Reg1", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ NULL ); /* Don't receive a handle back, it is not needed. */ xTaskCreate( vRegTest2Task, /* Function that implements the task. */ - ( signed char * ) "Reg2", /* Text name of the task. */ + "Reg2", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ @@ -224,7 +224,7 @@ const size_t xRegTestStackSize = 25U; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c index 1a976127e..6936b66b8 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -164,13 +164,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c index 7a8bc8511..03fcfa979 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -91,9 +91,9 @@ * containing an unexpected value is indicative of an error in the context * switching mechanism. * - * "Interrupt semaphore take" task - This task does nothing but block on a - * semaphore that is 'given' from the tick hook function (which is defined in - * main.c). It toggles the fourth LED each time it receives the semaphore. The + * "Interrupt semaphore take" task - This task does nothing but block on a + * semaphore that is 'given' from the tick hook function (which is defined in + * main.c). It toggles the fourth LED each time it receives the semaphore. The * Semahore is given every 50ms, so LED 4 toggles every 50ms. * * "Flash timers" - A software timer callback function is defined that does @@ -227,7 +227,7 @@ const size_t xRegTestStackSize = 25U; toggles an LED each time the semaphore is given. */ vSemaphoreCreateBinary( xLEDSemaphore ); xTaskCreate( prvSemaphoreTakeTask, /* Function that implements the task. */ - ( signed char * ) "Sem", /* Text name of the task. */ + "Sem", /* Text name of the task. */ configMINIMAL_STACK_SIZE, /* Stack allocated to the task (in words). */ NULL, /* The task parameter is not used. */ configMAX_PRIORITIES - 2, /* The priority of the task. */ @@ -237,14 +237,14 @@ const size_t xRegTestStackSize = 25U; These are naked functions that don't use any stack. A stack still has to be allocated to hold the task context. */ xTaskCreate( vRegTest1Task, /* Function that implements the task. */ - ( signed char * ) "Reg1", /* Text name of the task. */ + "Reg1", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ NULL ); /* Don't receive a handle back, it is not needed. */ xTaskCreate( vRegTest2Task, /* Function that implements the task. */ - ( signed char * ) "Reg2", /* Text name of the task. */ + "Reg2", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ @@ -253,7 +253,7 @@ const size_t xRegTestStackSize = 25U; /* Create the three flash timers. */ for( ulTimer = 0UL; ulTimer < ulTimersToCreate; ulTimer++ ) { - xTimer = xTimerCreate( ( const signed char * ) "FlashTimer", /* A text name, purely to help debugging. */ + xTimer = xTimerCreate( "FlashTimer", /* A text name, purely to help debugging. */ ( mainFLASH_TIMER_BASE_RATE * ( ulTimer + 1UL ) ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) ulTimer, /* The ID is used to hold the number of the LED that will be flashed. */ @@ -268,11 +268,11 @@ const size_t xRegTestStackSize = 25U; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* If the software timer was created successfully, start it. It won't diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c index a6fe6310d..86602c8af 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -75,7 +75,7 @@ * required to configure the hardware, are defined in main.c. ****************************************************************************** * - * main_blinky() creates one queue, and two tasks. It then starts the + * main_blinky() creates one queue, and two tasks. It then starts the * scheduler. * * The Queue Send Task: @@ -161,13 +161,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c index 49ace6827..b50e19789 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -194,14 +194,14 @@ const size_t xRegTestStackSize = 25U; These are naked functions that don't use any stack. A stack still has to be allocated to hold the task context. */ xTaskCreate( vRegTest1Task, /* Function that implements the task. */ - ( signed char * ) "Reg1", /* Text name of the task. */ + "Reg1", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ NULL ); /* Don't receive a handle back, it is not needed. */ xTaskCreate( vRegTest2Task, /* Function that implements the task. */ - ( signed char * ) "Reg2", /* Text name of the task. */ + "Reg2", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ @@ -209,11 +209,11 @@ const size_t xRegTestStackSize = 25U; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* If the software timer was created successfully, start it. It won't diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c index 868e9c1b7..c08de4644 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -164,13 +164,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c index d3c750c51..c700e9c36 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -206,14 +206,14 @@ const size_t xRegTestStackSize = 25U; These are naked functions that don't use any stack. A stack still has to be allocated to hold the task context. */ xTaskCreate( vRegTest1Task, /* Function that implements the task. */ - ( signed char * ) "Reg1", /* Text name of the task. */ + "Reg1", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ NULL ); /* Don't receive a handle back, it is not needed. */ xTaskCreate( vRegTest2Task, /* Function that implements the task. */ - ( signed char * ) "Reg2", /* Text name of the task. */ + "Reg2", /* Text name of the task. */ xRegTestStackSize, /* Stack allocated to the task. */ NULL, /* The task parameter is not used. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ @@ -222,26 +222,26 @@ const size_t xRegTestStackSize = 25U; /* Create the three flash timers. */ for( ulTimer = 0UL; ulTimer < ulTimersToCreate; ulTimer++ ) { - xTimer = xTimerCreate( ( const signed char * ) "FlashTimer", /* A text name, purely to help debugging. */ + xTimer = xTimerCreate( "FlashTimer", /* A text name, purely to help debugging. */ ( mainFLASH_TIMER_BASE_RATE * ( ulTimer + 1UL ) ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) ulTimer, /* The ID is used to hold the number of the LED that will be flashed. */ - prvFlashTimerCallback /* The callback function that inspects the status of all the other tasks. */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) ulTimer, /* The ID is used to hold the number of the LED that will be flashed. */ + prvFlashTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); - + if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); } } - + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* If the software timer was created successfully, start it. It won't @@ -342,6 +342,6 @@ unsigned long ulLED; ulLED = ( unsigned long ) pvTimerGetTimerID( xTimer ); /* Toggle the LED. */ - vParTestToggleLED( ulLED ); + vParTestToggleLED( ulLED ); } diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c index 60aef5ca9..50b590169 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -157,13 +157,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c index 89f35a9f3..89ec715c0 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -76,8 +76,8 @@ ****************************************************************************** * * main_full() creates all the demo application tasks and a software timer, then - * starts the scheduler. The web documentation provides more details of the - * standard demo application tasks, which provide no particular functionality, + * starts the scheduler. The web documentation provides more details of the + * standard demo application tasks, which provide no particular functionality, * but do provide a good example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are @@ -180,21 +180,21 @@ xTimerHandle xCheckTimer = NULL; vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); - + /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( prvRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); @@ -202,13 +202,13 @@ xTimerHandle xCheckTimer = NULL; /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -250,7 +250,7 @@ unsigned long ulErrorFound = pdFALSE; { ulErrorFound = pdTRUE; } - + /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { @@ -268,8 +268,8 @@ unsigned long ulErrorFound = pdFALSE; /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ - configTOGGLE_LED(); - + configTOGGLE_LED(); + /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -279,7 +279,7 @@ unsigned long ulErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c index 4b5ed6e9a..5a76f2e96 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -99,7 +99,7 @@ /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo, or 0 to run the more comprehensive test and demo application. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1 +#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c index 60aef5ca9..50b590169 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -157,13 +157,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c index c1c95c0a9..961bc1b77 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -185,12 +185,12 @@ xTimerHandle xCheckTimer = NULL; /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c index 60aef5ca9..50b590169 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -157,13 +157,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c index 004b332c6..3cec4055f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -76,8 +76,8 @@ ****************************************************************************** * * main_full() creates all the demo application tasks and a software timer, then - * starts the scheduler. The web documentation provides more details of the - * standard demo application tasks, which provide no particular functionality, + * starts the scheduler. The web documentation provides more details of the + * standard demo application tasks, which provide no particular functionality, * but do provide a good example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are @@ -180,21 +180,21 @@ xTimerHandle xCheckTimer = NULL; vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); - + /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); @@ -202,13 +202,13 @@ xTimerHandle xCheckTimer = NULL; /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -250,7 +250,7 @@ unsigned long ulErrorFound = pdFALSE; { ulErrorFound = pdTRUE; } - + /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { @@ -268,8 +268,8 @@ unsigned long ulErrorFound = pdFALSE; /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ - configTOGGLE_LED(); - + configTOGGLE_LED(); + /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -279,7 +279,7 @@ unsigned long ulErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c index 09c895559..9f30601eb 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -157,13 +157,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c index c6492c765..0820e7dee 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -185,18 +185,18 @@ xTimerHandle xCheckTimer = NULL; /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); @@ -204,7 +204,7 @@ xTimerHandle xCheckTimer = NULL; /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c index e13714418..9ffbb59c8 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c @@ -169,13 +169,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c index a16e69b22..cfa9014a8 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c @@ -197,12 +197,12 @@ xTimerHandle xCheckTimer = NULL; /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c index ba7a2544b..783149934 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -64,7 +64,7 @@ */ /*----------------------------------------------------------- - * Normally, a demo application would define ParTest (parallel port test) + * Normally, a demo application would define ParTest (parallel port test) * functions to write to an LED. In this case, four '*' symbols that are * output to the debug printf() port are used to simulate LED outputs. *-----------------------------------------------------------*/ @@ -107,7 +107,7 @@ gatekeeper task. */ */ static void prvI2CGateKeeperTask( void *pvParameters ); -/* The queue used to communicate toggle commands with the I2C gatekeeper +/* The queue used to communicate toggle commands with the I2C gatekeeper task. */ static xQueueHandle xI2CCommandQueue = NULL; /*-----------------------------------------------------------*/ @@ -137,7 +137,7 @@ I2C_M_SETUP_Type xI2CMessage; configASSERT( xI2CCommandQueue ); /* Create the I2C gatekeeper task itself. */ - xTaskCreate( prvI2CGateKeeperTask, ( signed char * ) "I2C", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvI2CGateKeeperTask, "I2C", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ @@ -172,7 +172,7 @@ static I2C_M_SETUP_Type xI2CMessage; /* Static so it is not on the stack as this { /* Which bit is being manipulated? */ ucLED = 0x01 << ucLED; - + /* Is the bit currently set or clear? */ if( ( ucLEDState & ucLED ) == 0U ) { @@ -182,10 +182,10 @@ static I2C_M_SETUP_Type xI2CMessage; /* Static so it is not on the stack as this { ucLEDState &= ~ucLED; } - + ucBuffer[ 0 ] = partstIO_WRITE_COMMAND; ucBuffer[ 1 ] = ucLEDState; - + xI2CMessage.sl_addr7bit = partstSLAVE_ADDRESS; xI2CMessage.tx_data = ucBuffer ; xI2CMessage.tx_length = sizeof( ucBuffer ); diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c index c4755bad4..57d33a0ce 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -227,9 +227,9 @@ int main( void ) /* Start the scheduler. */ vTaskStartScheduler(); - + /* Infinite loop */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -291,7 +291,7 @@ unsigned long ulErrorFound = pdFALSE; { ulErrorFound |= 0x01UL << 9UL; } - + /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { @@ -309,8 +309,8 @@ unsigned long ulErrorFound = pdFALSE; /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ - vParTestToggleLED( mainCHECK_LED ); - + vParTestToggleLED( mainCHECK_LED ); + /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -320,7 +320,7 @@ unsigned long ulErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ @@ -339,10 +339,10 @@ extern void Hitex_CGU_Init( void ); /* Wind the clock speed up in steps to its maximum. */ Hitex_CGU_Init(); - + /* Ensure all priority bits are assigned as preemption priority bits. */ NVIC_SetPriorityGrouping( 0 ); - + /* Setup the LED outputs. */ vParTestInitialise(); } @@ -367,21 +367,21 @@ static void prvOptionallyCreateComprehensveTestApplication( void ) /* Most importantly, start the tasks that use the FPU. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); - + /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); @@ -450,7 +450,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName void vApplicationTickHook( void ) { - /* This function will be called by each tick interrupt if + /* This function will be called by each tick interrupt if configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be added here, but the tick hook is called from an interrupt context, so code must not attempt to block, and only the interrupt safe FreeRTOS API diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c index 003372035..6c21b26f0 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -273,7 +273,7 @@ int main(void) { /* Configure the hardware ready to run the test. */ prvSetupHardware(); - + /* Start standard demo/test application flash tasks. See the comments at the top of this file. The LED flash tasks are always created. The other tasks are only created if mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY is set to @@ -288,13 +288,13 @@ int main(void) /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -356,7 +356,7 @@ long lErrorFound = pdFALSE; { lErrorFound = pdTRUE; } - + /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { @@ -374,8 +374,8 @@ long lErrorFound = pdFALSE; /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ - vParTestToggleLED( mainCHECK_LED ); - + vParTestToggleLED( mainCHECK_LED ); + /* Have any errors been latch in lErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED @@ -385,7 +385,7 @@ long lErrorFound = pdFALSE; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ @@ -403,11 +403,11 @@ static void prvButtonTestTask( void *pvParameters ) an interrupt. Each time the button interrupt gives the semaphore, this task will unblock, increment its execution counter, then return to block again. */ - + /* Take the semaphore before started to ensure it is in the correct state. */ xSemaphoreTake( xTestSemaphore, mainDONT_BLOCK ); - + for( ;; ) { xSemaphoreTake( xTestSemaphore, portMAX_DELAY ); @@ -420,13 +420,13 @@ static void prvSetupHardware( void ) { /* Setup STM32 system (clock, PLL and Flash configuration) */ SystemInit(); - + /* Ensure all priority bits are assigned as preemption priority bits. */ NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); - + /* Setup the LED outputs. */ vParTestInitialise(); - + /* Configure the button input. This configures the interrupt to use the lowest interrupt priority, so it is ok to use the ISR safe FreeRTOS API from the button interrupt handler. */ @@ -444,18 +444,18 @@ void vApplicationTickHook( void ) /* Fill the FPU registers with 0. */ vRegTestClearFlopRegistersToParameterValue( 0UL ); - + /* Trigger a timer 2 interrupt, which will fill the registers with a different value and itself trigger a timer 3 interrupt. Note that the timers are not actually used. The timer 2 and 3 interrupt vectors are just used for convenience. */ NVIC_SetPendingIRQ( TIM2_IRQn ); - + /* Ensure that, after returning from the nested interrupts, all the FPU registers contain the value to which they were set by the tick hook function. */ configASSERT( ulRegTestCheckFlopRegistersContainParameterValue( 0UL ) ); - + ulFPUInterruptNesting--; } #endif @@ -475,7 +475,7 @@ NVIC_InitTypeDef NVIC_InitStructure; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init( &NVIC_InitStructure ); - + /* Enable the TIM3 interrupt in the NVIC. The timer itself is not used, just its interrupt vector to force nesting from software. TIM2 must have a lower priority than TIM3, and both must have priorities above @@ -493,7 +493,7 @@ void TIM3_IRQHandler( void ) /* Just to verify that the interrupt nesting behaves as expected, increment ulFPUInterruptNesting on entry, and decrement it on exit. */ ulFPUInterruptNesting++; - + /* This is the highest priority interrupt in the chain of forced nesting interrupts, so latch the maximum value reached by ulFPUInterruptNesting. This is done purely to allow verification that the nesting depth reaches @@ -506,7 +506,7 @@ void TIM3_IRQHandler( void ) /* Fill the FPU registers with 99 to overwrite the values written by TIM2_IRQHandler(). */ vRegTestClearFlopRegistersToParameterValue( 99UL ); - + ulFPUInterruptNesting--; } /*-----------------------------------------------------------*/ @@ -516,10 +516,10 @@ void TIM2_IRQHandler( void ) /* Just to verify that the interrupt nesting behaves as expected, increment ulFPUInterruptNesting on entry, and decrement it on exit. */ ulFPUInterruptNesting++; - + /* Fill the FPU registers with 1. */ vRegTestClearFlopRegistersToParameterValue( 1UL ); - + /* Trigger a timer 3 interrupt, which will fill the registers with a different value. */ NVIC_SetPendingIRQ( TIM3_IRQn ); @@ -528,7 +528,7 @@ void TIM2_IRQHandler( void ) registers contain the value to which they were set by this interrupt function. */ configASSERT( ulRegTestCheckFlopRegistersContainParameterValue( 1UL ) ); - + ulFPUInterruptNesting--; } /*-----------------------------------------------------------*/ @@ -556,28 +556,28 @@ static void prvOptionallyCreateComprehensveTestApplication( void ) /* Most importantly, start the tasks that use the FPU. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); - + /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the semaphore that is used to demonstrate a task being synchronised with an interrupt. */ vSemaphoreCreateBinary( xTestSemaphore ); /* Create the task that is unblocked by the demonstration interrupt. */ - xTaskCreate( prvButtonTestTask, ( signed char * ) "BtnTest", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); - + xTaskCreate( prvButtonTestTask, "BtnTest", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); @@ -607,12 +607,12 @@ long lHigherPriorityTaskWoken = pdFALSE; /* Only line 6 is enabled, so there is no need to test which line generated the interrupt. */ EXTI_ClearITPendingBit( EXTI_Line6 ); - + /* This interrupt does nothing more than demonstrate how to synchronise a task with an interrupt. First the handler releases a semaphore. lHigherPriorityTaskWoken has been initialised to zero. */ xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken ); - + /* If there was a task that was blocked on the semaphore, and giving the semaphore caused the task to unblock, and the unblocked task has a priority higher than the currently executing task (the task that this interrupt diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c index c49f9a9e1..ef0149f6e 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c @@ -161,22 +161,22 @@ xQueueHandle xQueue; { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ - ( void * ) xQueue, /* Pass the queue into the task using the task parameter. */ - mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ - NULL ); /* The task handle is not required, so NULL is passed. */ + xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ + ( void * ) xQueue, /* Pass the queue into the task using the task parameter. */ + mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ + NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) xQueue, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) xQueue, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the blinky software timer as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "Blinky",/* A text name, purely to help debugging. */ - ( mainBLINKY_TIMER_PERIOD ), /* The timer period. */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvBlinkyTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "Blinky", /* A text name, purely to help debugging. */ + ( mainBLINKY_TIMER_PERIOD ),/* The timer period. */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvBlinkyTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ configASSERT( xTimer ); diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c index 4274014c8..268052688 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c @@ -296,11 +296,11 @@ xTimerHandle xTimer = NULL; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ if( xTimer != NULL ) { @@ -448,7 +448,7 @@ char cIPAddress[ 20 ]; for a new connection by lowering the priority of the IP task to that of the Idle task. */ vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); - + /* Disconnected - so no IP address. */ ili93xx_draw_string( ulXCoord, ulYCoord, ( uint8_t * ) "IP: " ); } diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c index 338242797..19560e782 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -171,11 +171,11 @@ xTimerHandle xCheckTimer = NULL; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c index b9f306a2a..cac506501 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -171,8 +171,8 @@ void main_low_power( void ) configASSERT( xQueue ); /* Start the two tasks as described at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( const signed char * const ) "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( const signed char * const ) "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the scheduler running running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c index d7d38c885..d611d7cd4 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -158,8 +158,8 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c index daf616980..8a433acd0 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -127,7 +127,7 @@ will remove items as they are added, meaning the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) -/* Values passed to the two tasks just to check the task parameter +/* Values passed to the two tasks just to check the task parameter functionality. */ #define mainQUEUE_SEND_PARAMETER ( 0x1111UL ) #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) @@ -163,13 +163,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c index c70f8da6a..1ee9466ca 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -195,11 +195,11 @@ xTimerHandle xCheckTimer = NULL; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c index d8135abc4..b787eacf5 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -317,37 +317,37 @@ int main(void) { /* Start the two application specific demo tasks, as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( mainLED_TIMER_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create the software timer that performs the 'digit counting' functionality, as described at the top of this file. */ - xDigitCounterTimer = xTimerCreate( ( const signed char * ) "DigitCounter", /* A text name, purely to help debugging. */ - ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xDigitCounterTimer = xTimerCreate( "DigitCounter", /* A text name, purely to help debugging. */ + ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + /* Create a lot of 'standard demo' tasks. Over 40 tasks are created in this demo. For a much simpler demo, select the 'blinky' build configuration. */ @@ -363,7 +363,7 @@ int main(void) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); - + /* The suicide tasks must be created last, as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given @@ -426,7 +426,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) { pcStatusMessage = "Error: ComTest\r\n"; } - + if( xAreTimerDemoTasksStillRunning( ( mainCHECK_TIMER_PERIOD_MS ) ) != pdTRUE ) { pcStatusMessage = "Error: TimerDemo"; @@ -441,12 +441,12 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) { pcStatusMessage = "Error: CountSem"; } - + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: DynamicPriority"; } - + /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. vParTestToggleLED() @@ -497,13 +497,13 @@ unsigned short usCheckLEDState; the state of the check LED. A critical section is not required to access the port as only one timer can be executing at any one time. */ usCheckLEDState = ( FM3_GPIO->PDOR3 & mainCHECK_LED ); - + /* Display the next number, counting up. */ FM3_GPIO->PDOR3 = usNumbersPatterns[ lCounter ] | usCheckLEDState; - /* Move onto the next digit. */ + /* Move onto the next digit. */ lCounter++; - + /* Ensure the counter does not go off the end of the array. */ if( lCounter >= lNumberOfDigits ) { @@ -603,15 +603,15 @@ const unsigned short usButtonInputBit = 0x01U; SystemCoreClockUpdate(); /* Initialise the IO used for the LEDs on the 7 segment displays. */ - vParTestInitialise(); - + vParTestInitialise(); + /* Set the switches to input (P18->P1F). */ FM3_GPIO->DDR5 = 0x0000; FM3_GPIO->PFR5 = 0x0000; /* Assign the button input as GPIO. */ FM3_GPIO->PFR5 |= usButtonInputBit; - + /* Button interrupt on falling edge. */ FM3_EXTI->ELVR = 0x0003; @@ -620,7 +620,7 @@ const unsigned short usButtonInputBit = 0x01U; /* Enable the button interrupt. */ FM3_EXTI->ENIR |= usButtonInputBit; - + /* Setup the GPIO and the NVIC for the switch used in this simple demo. */ NVIC_SetPriority( EXINT0_7_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); NVIC_EnableIRQ( EXINT0_7_IRQn ); @@ -675,6 +675,6 @@ void vApplicationTickHook( void ) /* Call the periodic timer test, which tests the timer API functions that can be called from an ISR. */ vTimerPeriodicISRTests(); -} +} /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c index 5a7b90de9..045de672f 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -175,7 +175,7 @@ int main(void) { /* Configure the NVIC, LED outputs and button inputs. */ prvSetupHardware(); - + /* Create the queue. */ xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); @@ -183,17 +183,17 @@ int main(void) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ @@ -311,14 +311,14 @@ const unsigned short usButtonInputBit = 0x01U; SystemInit(); SystemCoreClockUpdate(); - + /* Analog inputs are not used on the LED outputs. */ FM3_GPIO->ADE = 0x0000; - + /* Set to output. */ FM3_GPIO->DDR1 |= 0xFFFF; FM3_GPIO->DDR3 |= 0xFFFF; - + /* Set as GPIO. */ FM3_GPIO->PFR1 &= 0x0000; FM3_GPIO->PFR3 &= 0x0000; @@ -326,14 +326,14 @@ const unsigned short usButtonInputBit = 0x01U; /* Start with all LEDs off. */ FM3_GPIO->PDOR3 = 0xFFFF; FM3_GPIO->PDOR1 = 0xFFFF; - + /* Set the switches to input (P18->P1F). */ FM3_GPIO->DDR5 = 0x0000; FM3_GPIO->PFR5 = 0x0000; /* Assign the button input as GPIO. */ FM3_GPIO->PFR5 |= usButtonInputBit; - + /* Button interrupt on falling edge. */ FM3_EXTI->ELVR = 0x0003; @@ -342,7 +342,7 @@ const unsigned short usButtonInputBit = 0x01U; /* Enable the button interrupt. */ FM3_EXTI->ENIR |= usButtonInputBit; - + /* Setup the GPIO and the NVIC for the switch used in this simple demo. */ NVIC_SetPriority( EXINT0_7_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); NVIC_EnableIRQ( EXINT0_7_IRQn ); diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c index 56054cb67..1b9111509 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -318,37 +318,37 @@ int main(void) { /* Start the two application specific demo tasks, as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( mainLED_TIMER_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create the software timer that performs the 'digit counting' functionality, as described at the top of this file. */ - xDigitCounterTimer = xTimerCreate( ( const signed char * ) "DigitCounter", /* A text name, purely to help debugging. */ - ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xDigitCounterTimer = xTimerCreate( "DigitCounter", /* A text name, purely to help debugging. */ + ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + /* Create a lot of 'standard demo' tasks. Over 40 tasks are created in this demo. For a much simpler demo, select the 'blinky' build configuration. */ @@ -364,7 +364,7 @@ int main(void) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); - + /* The suicide tasks must be created last, as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given @@ -427,7 +427,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) { pcStatusMessage = "Error: ComTest\r\n"; } - + if( xAreTimerDemoTasksStillRunning( ( mainCHECK_TIMER_PERIOD_MS ) ) != pdTRUE ) { pcStatusMessage = "Error: TimerDemo"; @@ -442,12 +442,12 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) { pcStatusMessage = "Error: CountSem"; } - + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: DynamicPriority"; } - + /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ @@ -485,9 +485,9 @@ const long lNumberOfDigits = 10L; /* Display the next number, counting up. */ FM3_GPIO->PDOR1 = usNumbersPatterns[ lCounter ]; - /* Move onto the next digit. */ + /* Move onto the next digit. */ lCounter++; - + /* Ensure the counter does not go off the end of the array. */ if( lCounter >= lNumberOfDigits ) { @@ -587,15 +587,15 @@ const unsigned short usButtonInputBit = 0x01U; SystemCoreClockUpdate(); /* Initialise the IO used for the LEDs on the 7 segment displays. */ - vParTestInitialise(); - + vParTestInitialise(); + /* Set the switches to input (P18->P1F). */ FM3_GPIO->DDR5 = 0x0000; FM3_GPIO->PFR5 = 0x0000; /* Assign the button input as GPIO. */ FM3_GPIO->PFR1 |= usButtonInputBit; - + /* Button interrupt on falling edge. */ FM3_EXTI->ELVR = 0x0003; @@ -604,7 +604,7 @@ const unsigned short usButtonInputBit = 0x01U; /* Enable the button interrupt. */ FM3_EXTI->ENIR |= usButtonInputBit; - + /* Setup the GPIO and the NVIC for the switch used in this simple demo. */ NVIC_SetPriority( EXINT0_7_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); NVIC_EnableIRQ( EXINT0_7_IRQn ); @@ -659,6 +659,6 @@ void vApplicationTickHook( void ) /* Call the periodic timer test, which tests the timer API functions that can be called from an ISR. */ vTimerPeriodicISRTests(); -} +} /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c index 5127d47f4..956548d8a 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -184,17 +184,17 @@ int main(void) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ @@ -313,29 +313,29 @@ const unsigned short usGPIOState = 0xFF00U; SystemInit(); SystemCoreClockUpdate(); - + /* Analog inputs are not used on the LED outputs. */ FM3_GPIO->ADE = 0x00FF; - + /* LED seg1 to GPIO output (P18->P1F). */ FM3_GPIO->DDR1 = 0xFF00; FM3_GPIO->PFR1 = 0x0000; - + /* LED seg2 to GPIO output (P30->P3F). */ FM3_GPIO->DDR3 = 0xFF00; FM3_GPIO->PFR3 = 0x0000; - + /* Start with all LEDs off. */ FM3_GPIO->PDOR3 = usGPIOState; FM3_GPIO->PDOR1 = usGPIOState; - + /* Set the switches to input (P18->P1F). */ FM3_GPIO->DDR5 = 0x0000; FM3_GPIO->PFR5 = 0x0000; /* Assign the button input as GPIO. */ FM3_GPIO->PFR1 |= usButtonInputBit; - + /* Button interrupt on falling edge. */ FM3_EXTI->ELVR = 0x0003; @@ -344,7 +344,7 @@ const unsigned short usGPIOState = 0xFF00U; /* Enable the button interrupt. */ FM3_EXTI->ENIR |= usButtonInputBit; - + /* Setup the GPIO and the NVIC for the switch used in this simple demo. */ NVIC_SetPriority( EXINT0_7_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); NVIC_EnableIRQ( EXINT0_7_IRQn ); diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c index 9bd40ab7f..77ae33d30 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -239,7 +239,7 @@ structure passed to the xTaskCreateRestricted() function. */ static const xTaskParameters xCheckTaskParameters = { prvCheckTask, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "Check", /* pcName */ + "Check", /* pcName */ mainCHECK_TASK_STACK_SIZE_WORDS, /* usStackDepth - defined in words, not bytes. */ ( void * ) 0x12121212, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */ ( tskIDLE_PRIORITY + 1 ) | portPRIVILEGE_BIT,/* uxPriority - this is the highest priority task in the system. The task is created in privileged mode to demonstrate accessing the privileged only data. */ @@ -280,7 +280,7 @@ static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_ static const xTaskParameters xRegTest1Parameters = { prvRegTest1Task, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "RegTest1", /* pcName */ + "RegTest1", /* pcName */ mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */ ( void * ) 0x12345678, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */ tskIDLE_PRIORITY | portPRIVILEGE_BIT, /* uxPriority - note that this task is created with privileges to demonstrate one method of passing a queue handle into the task. */ @@ -297,7 +297,7 @@ static const xTaskParameters xRegTest1Parameters = static xTaskParameters xRegTest2Parameters = { prvRegTest2Task, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "RegTest2", /* pcName */ + "RegTest2", /* pcName */ mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */ ( void * ) NULL, /* pvParameters - this task uses the parameter to pass in a queue handle, but the queue is not created yet. */ tskIDLE_PRIORITY, /* uxPriority */ @@ -334,7 +334,7 @@ int main( void ) /* Create the tasks that are created using the original xTaskCreate() API function. */ xTaskCreate( prvOldStyleUserModeTask, /* The function that implements the task. */ - ( signed char * ) "Task1", /* Text name for the task. */ + "Task1", /* Text name for the task. */ 100, /* Stack depth in words. */ NULL, /* Task parameters. */ 3, /* Priority and mode (user in this case). */ @@ -342,7 +342,7 @@ int main( void ) ); xTaskCreate( prvOldStylePrivilegedModeTask, /* The function that implements the task. */ - ( signed char * ) "Task2", /* Text name for the task. */ + "Task2", /* Text name for the task. */ 100, /* Stack depth in words. */ NULL, /* Task parameters. */ ( 3 | portPRIVILEGE_BIT ), /* Priority and mode. */ diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c index acbf37270..198168a19 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -71,7 +71,7 @@ * User mode and Privileged mode, and using both the original xTaskCreate() and * the new xTaskCreateRestricted() API functions. The purpose of each created * task is documented in the comments above the task function prototype (in - * this file), with the task behaviour demonstrated and documented within the + * this file), with the task behaviour demonstrated and documented within the * task function itself. In addition a queue is used to demonstrate passing * data between protected/restricted tasks as well as passing data between an * interrupt and a protected/restricted task. @@ -117,7 +117,7 @@ achieved. */ /* Prototypes for functions that implement tasks. -----------*/ /*-----------------------------------------------------------*/ -/* +/* * Prototype for the reg test tasks. Amongst other things, these fill the CPU * registers with known values before checking that the registers still contain * the expected values. Each of the two tasks use different values so an error @@ -147,15 +147,15 @@ static void prvRegTest2Task( void *pvParameters ); static void prvCheckTask( void *pvParameters ); /* - * Prototype for a task created in User mode using the original vTaskCreate() + * Prototype for a task created in User mode using the original vTaskCreate() * API function. The task demonstrates the characteristics of such a task, * before simply deleting itself. */ static void prvOldStyleUserModeTask( void *pvParameters ); /* - * Prototype for a task created in Privileged mode using the original - * vTaskCreate() API function. The task demonstrates the characteristics of + * Prototype for a task created in Privileged mode using the original + * vTaskCreate() API function. The task demonstrates the characteristics of * such a task, before simply deleting itself. */ static void prvOldStylePrivilegedModeTask( void *pvParameters ); @@ -200,7 +200,7 @@ static void prvTestMemoryRegions( void ); /* The handle of the queue used to communicate between tasks and between tasks and interrupts. Note that this is a file scope variable that falls outside of any MPU region. As such other techniques have to be used to allow the tasks -to gain access to the queue. See the comments in the tasks themselves for +to gain access to the queue. See the comments in the tasks themselves for further information. */ static xQueueHandle xFileScopeCheckQueue = NULL; @@ -216,8 +216,8 @@ stack size is defined in words, not bytes. */ #define mainCHECK_TASK_STACK_ALIGNMENT ( mainCHECK_TASK_STACK_SIZE_WORDS * sizeof( portSTACK_TYPE ) ) /* Declare the stack that will be used by the check task. The kernel will - automatically create an MPU region for the stack. The stack alignment must - match its size, so if 128 words are reserved for the stack then it must be + automatically create an MPU region for the stack. The stack alignment must + match its size, so if 128 words are reserved for the stack then it must be aligned to ( 128 * 4 ) bytes. */ static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT ); @@ -226,9 +226,9 @@ using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE MPU FUNCTIONALITY, the data is not used by the check tasks primary function of monitoring the reg test tasks and printing out status information. -Note that the arrays allocate slightly more RAM than is actually assigned to -the MPU region. This is to permit writes off the end of the array to be -detected even when the arrays are placed in adjacent memory locations (with no +Note that the arrays allocate slightly more RAM than is actually assigned to +the MPU region. This is to permit writes off the end of the array to be +detected even when the arrays are placed in adjacent memory locations (with no gaps between them). The align size must be a power of two. */ #define mainREAD_WRITE_ARRAY_SIZE 130 #define mainREAD_WRITE_ALIGN_SIZE 128 @@ -247,7 +247,7 @@ structure passed to the xTaskCreateRestricted() function. */ static const xTaskParameters xCheckTaskParameters = { prvCheckTask, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "Check", /* pcName */ + "Check", /* pcName */ mainCHECK_TASK_STACK_SIZE_WORDS, /* usStackDepth - defined in words, not bytes. */ ( void * ) 0x12121212, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */ ( tskIDLE_PRIORITY + 1 ) | portPRIVILEGE_BIT,/* uxPriority - this is the highest priority task in the system. The task is created in privileged mode to demonstrate accessing the privileged only data. */ @@ -258,7 +258,7 @@ static const xTaskParameters xCheckTaskParameters = created with different parameters. Again, THIS IS JUST TO DEMONSTRATE THE MPU FUNCTIONALITY, the data is not used by the check tasks primary function of monitoring the reg test tasks and printing out status information.*/ - { + { /* Base address Length Parameters */ { cReadWriteArray, mainREAD_WRITE_ALIGN_SIZE, portMPU_REGION_READ_WRITE }, { cReadOnlyArray, mainREAD_ONLY_ALIGN_SIZE, portMPU_REGION_READ_ONLY }, @@ -266,15 +266,15 @@ static const xTaskParameters xCheckTaskParameters = } }; -/* Three MPU regions are defined for use by the 'check' task when the task is +/* Three MPU regions are defined for use by the 'check' task when the task is created. These are only used to demonstrate the MPU features and are not actually necessary for the check task to fulfill its primary purpose. Instead -the MPU regions are replaced with those defined by xAltRegions prior to the +the MPU regions are replaced with those defined by xAltRegions prior to the check task receiving any data on the queue or printing any messages to the debug console. The MPU region defined below covers the GPIO peripherals used to write to the LCD. */ static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = -{ +{ /* Base address Length Parameters */ { mainGPIO_START_ADDRESS, ( 64 * 1024 ), portMPU_REGION_READ_WRITE }, { 0, 0, 0 }, @@ -293,8 +293,8 @@ that stack size is defined in words, not bytes. */ #define mainREG_TEST_STACK_ALIGNMENT ( mainREG_TEST_STACK_SIZE_WORDS * sizeof( portSTACK_TYPE ) ) /* Declare the stacks that will be used by the reg test tasks. The kernel will -automatically create an MPU region for the stack. The stack alignment must -match its size, so if 128 words are reserved for the stack then it must be +automatically create an MPU region for the stack. The stack alignment must +match its size, so if 128 words are reserved for the stack then it must be aligned to ( 128 * 4 ) bytes. */ static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); @@ -303,7 +303,7 @@ static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_ static const xTaskParameters xRegTest1Parameters = { prvRegTest1Task, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "RegTest1", /* pcName */ + "RegTest1", /* pcName */ mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */ ( void * ) 0x12345678, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */ tskIDLE_PRIORITY | portPRIVILEGE_BIT, /* uxPriority - note that this task is created with privileges to demonstrate one method of passing a queue handle into the task. */ @@ -320,7 +320,7 @@ static const xTaskParameters xRegTest1Parameters = static xTaskParameters xRegTest2Parameters = { prvRegTest2Task, /* pvTaskCode - the function that implements the task. */ - ( signed char * ) "RegTest2", /* pcName */ + "RegTest2", /* pcName */ mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */ ( void * ) NULL, /* pvParameters - this task uses the parameter to pass in a queue handle, but the queue is not created yet. */ tskIDLE_PRIORITY, /* uxPriority */ @@ -357,7 +357,7 @@ int main( void ) /* Create the tasks that are created using the original xTaskCreate() API function. */ xTaskCreate( prvOldStyleUserModeTask, /* The function that implements the task. */ - ( signed char * ) "Task1", /* Text name for the task. */ + "Task1", /* Text name for the task. */ 100, /* Stack depth in words. */ NULL, /* Task parameters. */ 3, /* Priority and mode (user in this case). */ @@ -365,7 +365,7 @@ int main( void ) ); xTaskCreate( prvOldStylePrivilegedModeTask, /* The function that implements the task. */ - ( signed char * ) "Task2", /* Text name for the task. */ + "Task2", /* Text name for the task. */ 100, /* Stack depth in words. */ NULL, /* Task parameters. */ ( 3 | portPRIVILEGE_BIT ), /* Priority and mode. */ @@ -397,7 +397,7 @@ unsigned char x = 5, y = 10; /* Just to remove compiler warning. */ ( void ) pvParameters; - /* Demonstrate how the various memory regions can and can't be accessed. + /* Demonstrate how the various memory regions can and can't be accessed. The task privilege is set down to user mode within this function. */ prvTestMemoryRegions(); @@ -411,26 +411,26 @@ unsigned char x = 5, y = 10; { /* Wait for the next message to arrive. */ xQueueReceive( xQueue, &lMessage, portMAX_DELAY ); - + switch( lMessage ) { - case mainREG_TEST_1_STILL_EXECUTING : + case mainREG_TEST_1_STILL_EXECUTING : /* Message from task 1, so task 1 must still be executing. */ ( ulStillAliveCounts[ 0 ] )++; break; - case mainREG_TEST_2_STILL_EXECUTING : + case mainREG_TEST_2_STILL_EXECUTING : /* Message from task 2, so task 2 must still be executing. */ ( ulStillAliveCounts[ 1 ] )++; break; - case mainPRINT_SYSTEM_STATUS : + case mainPRINT_SYSTEM_STATUS : /* Message from tick hook, time to print out the system status. If messages has stopped arriving from either reg test task then the status must be set to fail. */ if( ( ulStillAliveCounts[ 0 ] == 0 ) || ( ulStillAliveCounts[ 1 ] == 0 ) ) { - /* One or both of the test tasks are no longer sending + /* One or both of the test tasks are no longer sending 'still alive' messages. */ pcStatusMessage = "FAIL\r\n"; } @@ -438,7 +438,7 @@ unsigned char x = 5, y = 10; /* Print a pass/fail message to the LCD - moving the message each time to provide feedback that the output is still being produced. LCD_PrintString() accesses const - data stored in flash, which all tasks are at liberty to do, + data stored in flash, which all tasks are at liberty to do, and GPIO for which an MPU region has been set up for it. */ LCD_ClearScreen(); LCD_PrintString( x>>1, y>>1, pcStatusMessage, 6, COLOR_RED ); @@ -450,7 +450,7 @@ unsigned char x = 5, y = 10; break; default : - /* Something unexpected happened. Delete this task so the + /* Something unexpected happened. Delete this task so the error is apparent (no output will be displayed). */ prvDeleteMe(); break; @@ -464,8 +464,8 @@ static void prvTestMemoryRegions( void ) long l; char cTemp; - /* The check task (from which this function is called) is created in the - Privileged mode. The privileged array can be both read from and written + /* The check task (from which this function is called) is created in the + Privileged mode. The privileged array can be both read from and written to while this task is privileged. */ cPrivilegedOnlyAccessArray[ 0 ] = 'a'; if( cPrivilegedOnlyAccessArray[ 0 ] != 'a' ) @@ -476,15 +476,15 @@ char cTemp; } /* Writing off the end of the RAM allocated to this task will *NOT* cause a - protection fault because the task is still executing in a privileged mode. + protection fault because the task is still executing in a privileged mode. Uncomment the following to test. */ /* cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] = 'a'; */ /* Now set the task into user mode. */ portSWITCH_TO_USER_MODE(); - - /* Accessing the privileged only array will now cause a fault. Uncomment - the following line to test. */ + + /* Accessing the privileged only array will now cause a fault. Uncomment + the following line to test. */ /* cPrivilegedOnlyAccessArray[ 0 ] = 'a'; */ /* The read/write array can still be successfully read and written. */ @@ -500,7 +500,7 @@ char cTemp; } /* But attempting to read or write off the end of the RAM allocated to this - task will cause a fault. Uncomment either of the following two lines to + task will cause a fault. Uncomment either of the following two lines to test. */ /* cReadWriteArray[ 0 ] = cReadWriteArray[ -1 ]; */ /* cReadWriteArray[ mainREAD_WRITE_ALIGN_SIZE ] = 0x00; */ @@ -514,14 +514,14 @@ char cTemp; /* ...but cannot be written. Uncomment the following line to test. */ /* cReadOnlyArray[ 0 ] = 'a'; */ - /* Writing to the first and last locations in the stack array should not + /* Writing to the first and last locations in the stack array should not cause a protection fault. Note that doing this will cause the kernel to - detect a stack overflow if configCHECK_FOR_STACK_OVERFLOW is greater than + detect a stack overflow if configCHECK_FOR_STACK_OVERFLOW is greater than 1. */ xCheckTaskStack[ 0 ] = 0; xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS - 1 ] = 0; - /* Writing off either end of the stack array should cause a protection + /* Writing off either end of the stack array should cause a protection fault, uncomment either of the following two lines to test. */ /* xCheckTaskStack[ -1 ] = 0; */ /* xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] = 0; */ @@ -536,7 +536,7 @@ mode. Once this task is in user mode the file scope queue variable will no longer be accessible but the stack copy will. */ xQueueHandle xQueue = xFileScopeCheckQueue; - /* Now the queue handle has been obtained the task can switch to user + /* Now the queue handle has been obtained the task can switch to user mode. This is just one method of passing a handle into a protected task, the other reg test task uses the task parameter instead. */ portSWITCH_TO_USER_MODE(); @@ -551,12 +551,12 @@ xQueueHandle xQueue = xFileScopeCheckQueue; for( ;; ) - { + { /* This task tests the kernel context switch mechanism by reading and writing directly to registers - which requires the test to be written in assembly code. */ - __asm volatile - ( + __asm volatile + ( " MOV R4, #104 \n" /* Set registers to a known value. R0 to R1 are done in the loop below. */ " MOV R5, #105 \n" " MOV R6, #106 \n" @@ -579,8 +579,8 @@ xQueueHandle xQueue = xFileScopeCheckQueue; " BNE prvDeleteMe \n" " CMP R3, #103 \n" " BNE prvDeleteMe \n" - " CMP R4, #104 \n" - " BNE prvDeleteMe \n" + " CMP R4, #104 \n" + " BNE prvDeleteMe \n" " CMP R5, #105 \n" " BNE prvDeleteMe \n" " CMP R6, #106 \n" @@ -598,7 +598,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue; :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); - /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this + /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this task is still functioning. */ prvSendImAlive( xQueue, mainREG_TEST_1_STILL_EXECUTING ); @@ -611,7 +611,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue; static void prvRegTest2Task( void *pvParameters ) { /* The queue handle is passed in as the task parameter. This is one method of -passing data into a protected task, the other reg test task uses a different +passing data into a protected task, the other reg test task uses a different method. */ xQueueHandle xQueue = ( xQueueHandle ) pvParameters; @@ -620,15 +620,15 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters; /* This task tests the kernel context switch mechanism by reading and writing directly to registers - which requires the test to be written in assembly code. */ - __asm volatile - ( + __asm volatile + ( " MOV R4, #4 \n" /* Set registers to a known value. R0 to R1 are done in the loop below. */ " MOV R5, #5 \n" " MOV R6, #6 \n" " MOV R8, #8 \n" /* Frame pointer is omitted as it must not be changed. */ " MOV R9, #9 \n" " MOV R10, 10 \n" - " MOV R11, #11 \n" + " MOV R11, #11 \n" "reg2loop: \n" " MOV R0, #13 \n" /* Set the scratch registers to known values - done inside the loop as they get clobbered. */ " MOV R1, #1 \n" @@ -662,7 +662,7 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters; :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); - /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this + /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this task is still functioning. */ prvSendImAlive( xQueue, mainREG_TEST_2_STILL_EXECUTING ); @@ -684,8 +684,8 @@ volatile unsigned long ulReadData; /* The idle task, and therefore this function, run in Supervisor mode and can therefore access all memory. Try reading from corners of flash and - RAM to ensure a memory fault does not occur. - + RAM to ensure a memory fault does not occur. + Start with the edges of the privileged data area. */ pul = __privileged_data_start__; ulReadData = *pul; @@ -703,9 +703,9 @@ volatile unsigned long ulReadData; pul = __FLASH_segment_end__ - 1; ulReadData = *pul; - /* Reading off the end of Flash or SRAM space should cause a fault. + /* Reading off the end of Flash or SRAM space should cause a fault. Uncomment one of the following two pairs of lines to test. */ - + /* pul = __FLASH_segment_end__ + 4; ulReadData = *pul; */ @@ -726,7 +726,7 @@ const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigne volatile unsigned long *pul; volatile unsigned long ulReadData; -/* The following lines are commented out to prevent the unused variable +/* The following lines are commented out to prevent the unused variable compiler warnings when the tests that use the variable are also commented out. extern unsigned long __privileged_functions_start__[]; const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned long * ) 0xe000e014; */ @@ -766,17 +766,17 @@ const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned /* pul = __privileged_functions_start__; ulReadData = *pul; */ - + /* pul = __privileged_functions_end__ - 1; ulReadData = *pul; */ /* pul = __privileged_data_start__; - ulReadData = *pul; */ - + ulReadData = *pul; */ + /* pul = __privileged_data_end__ - 1; ulReadData = *pul; */ - /* Must not just run off the end of a task function, so delete this task. + /* Must not just run off the end of a task function, so delete this task. Note that because this task was created using xTaskCreate() the stack was allocated dynamically and I have not included any code to free it again. */ vTaskDelete( NULL ); @@ -799,10 +799,10 @@ const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigne ( void ) pvParameters; - /* This task is created in Privileged mode using the original xTaskCreate() - API function. It should have access to all Flash and RAM including that - marked as Privileged access only. So reading from the start and end of the - non-privileged RAM should not cause a problem (the privileged RAM is the + /* This task is created in Privileged mode using the original xTaskCreate() + API function. It should have access to all Flash and RAM including that + marked as Privileged access only. So reading from the start and end of the + non-privileged RAM should not cause a problem (the privileged RAM is the first block at the bottom of the RAM memory). */ pul = __privileged_data_end__ + 1; ulReadData = *pul; @@ -824,7 +824,7 @@ const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigne pul = __privileged_functions_end__ - 1; ulReadData = *pul; pul = __privileged_data_start__; - ulReadData = *pul; + ulReadData = *pul; pul = __privileged_data_end__ - 1; ulReadData = *pul; @@ -833,7 +833,7 @@ const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigne ulReadData = *pulSystemPeripheralRegister; ulReadData = *pulStandardPeripheralRegister; - /* Must not just run off the end of a task function, so delete this task. + /* Must not just run off the end of a task function, so delete this task. Note that because this task was created using xTaskCreate() the stack was allocated dynamically and I have not included any code to free it again. */ vTaskDelete( NULL ); @@ -869,84 +869,84 @@ void prvSetupHardware( void ) if ( SC->PLL0STAT & ( 1 << 25 ) ) { /* Enable PLL, disconnected. */ - SC->PLL0CON = 1; + SC->PLL0CON = 1; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ - SC->PLL0CON = 0; + SC->PLL0CON = 0; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable main OSC. */ - SC->SCS |= 0x20; + SC->SCS |= 0x20; while( !( SC->SCS & 0x40 ) ); - + /* select main OSC, 12MHz, as the PLL clock source. */ - SC->CLKSRCSEL = 0x1; - + SC->CLKSRCSEL = 0x1; + SC->PLL0CFG = 0x20031; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ - SC->PLL0CON = 1; + SC->PLL0CON = 1; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - + /* Set clock divider. */ SC->CCLKCFG = 0x03; - + /* Configure flash accelerator. */ SC->FLASHCFG = 0x403a; - + /* Check lock bit status. */ - while( ( ( SC->PLL0STAT & ( 1 << 26 ) ) == 0 ) ); - + while( ( ( SC->PLL0STAT & ( 1 << 26 ) ) == 0 ) ); + /* Enable and connect. */ - SC->PLL0CON = 3; + SC->PLL0CON = 3; SC->PLL0FEED = PLLFEED_FEED1; SC->PLL0FEED = PLLFEED_FEED2; - while( ( ( SC->PLL0STAT & ( 1 << 25 ) ) == 0 ) ); + while( ( ( SC->PLL0STAT & ( 1 << 25 ) ) == 0 ) ); + + + - - - /* Configure the clock for the USB. */ - + if( SC->PLL1STAT & ( 1 << 9 ) ) { /* Enable PLL, disconnected. */ - SC->PLL1CON = 1; + SC->PLL1CON = 1; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; } - + /* Disable PLL, disconnected. */ - SC->PLL1CON = 0; + SC->PLL1CON = 0; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; - + SC->PLL1CFG = 0x23; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; - + /* Enable PLL, disconnected. */ - SC->PLL1CON = 1; + SC->PLL1CON = 1; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; while( ( ( SC->PLL1STAT & ( 1 << 10 ) ) == 0 ) ); - + /* Enable and connect. */ - SC->PLL1CON = 3; + SC->PLL1CON = 3; SC->PLL1FEED = PLLFEED_FEED1; SC->PLL1FEED = PLLFEED_FEED2; while( ( ( SC->PLL1STAT & ( 1 << 9 ) ) == 0 ) ); /* Setup the peripheral bus to be the same as the PLL output (64 MHz). */ SC->PCLKSEL0 = 0x05555555; - + /* Prepare the LCD. */ LCDdriver_initialisation(); LCD_PrintString( 5, 10, "FreeRTOS.org", 14, COLOR_GREEN); @@ -972,8 +972,8 @@ portBASE_TYPE xDummy; ulCallCount = 0; /* Send a message to the check task to command it to check that all - the tasks are still running then print out the status. - + the tasks are still running then print out the status. + This is running in an ISR so has to use the "FromISR" version of xQueueSend(). Because it is in an ISR it is running with privileges so can access xFileScopeCheckQueue directly. */ @@ -984,7 +984,7 @@ portBASE_TYPE xDummy; void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName ) { - /* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this + /* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this function will automatically get called if a task overflows its stack. */ ( void ) pxTask; ( void ) pcTaskName; diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c index ce491b6bc..2122140f6 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -64,15 +64,15 @@ */ /* - * Creates eight tasks, each of which loops continuously performing an (emulated) + * Creates eight tasks, each of which loops continuously performing an (emulated) * floating point calculation. * - * All the tasks run at the idle priority and never block or yield. This causes - * all eight tasks to time slice with the idle task. Running at the idle priority + * All the tasks run at the idle priority and never block or yield. This causes + * all eight tasks to time slice with the idle task. Running at the idle priority * means that these tasks will get pre-empted any time another task is ready to run - * or a time slice occurs. More often than not the pre-emption will occur mid - * calculation, creating a good test of the schedulers context switch mechanism - a - * calculation producing an unexpected result could be a symptom of a corruption in + * or a time slice occurs. More often than not the pre-emption will occur mid + * calculation, creating a good test of the schedulers context switch mechanism - a + * calculation producing an unexpected result could be a symptom of a corruption in * the context of a task. */ @@ -89,14 +89,14 @@ #define mathSTACK_SIZE configMINIMAL_STACK_SIZE #define mathNUMBER_OF_TASKS ( 8 ) -/* Four tasks, each of which performs a different floating point calculation. +/* Four tasks, each of which performs a different floating point calculation. Each of the four is created twice. */ static portTASK_FUNCTION_PROTO( vCompetingMathTask1, pvParameters ); static portTASK_FUNCTION_PROTO( vCompetingMathTask2, pvParameters ); static portTASK_FUNCTION_PROTO( vCompetingMathTask3, pvParameters ); static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters ); -/* These variables are used to check that all the tasks are still running. If a +/* These variables are used to check that all the tasks are still running. If a task gets a calculation wrong it will stop incrementing its check variable. */ static volatile unsigned long ulTaskCheck[ mathNUMBER_OF_TASKS ] = { 0 }; @@ -112,14 +112,14 @@ a floating point context. */ void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 0 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 1 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 2 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 3 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 4 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 5 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 6 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 7 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 0 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 1 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 2 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 3 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 4 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 5 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 6 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( ulTaskCheck[ 7 ] ), uxPriority, NULL ); } /*-----------------------------------------------------------*/ @@ -144,7 +144,7 @@ short sError = pdFALSE; dAnswer = ( d1 + d2 ) * d3; - /* The variable this task increments to show it is still running is passed in + /* The variable this task increments to show it is still running is passed in as the parameter. */ pulTaskCheckVariable = ( unsigned long * ) pvParameters; @@ -161,7 +161,7 @@ short sError = pdFALSE; taskYIELD(); #endif - /* If the calculation does not match the expected constant, stop the + /* If the calculation does not match the expected constant, stop the increment of the check variable. */ if( fabs( d4 - dAnswer ) > 0.001 ) { @@ -170,7 +170,7 @@ short sError = pdFALSE; if( sError == pdFALSE ) { - /* If the calculation has always been correct, increment the check + /* If the calculation has always been correct, increment the check variable so we know this task is still running okay. */ ( *pulTaskCheckVariable )++; } @@ -204,7 +204,7 @@ short sError = pdFALSE; dAnswer = ( d1 / d2 ) * d3; - /* The variable this task increments to show it is still running is passed in + /* The variable this task increments to show it is still running is passed in as the parameter. */ pulTaskCheckVariable = ( unsigned long * ) pvParameters; @@ -220,8 +220,8 @@ short sError = pdFALSE; #if configUSE_PREEMPTION == 0 taskYIELD(); #endif - - /* If the calculation does not match the expected constant, stop the + + /* If the calculation does not match the expected constant, stop the increment of the check variable. */ if( fabs( d4 - dAnswer ) > 0.001 ) { @@ -230,7 +230,7 @@ short sError = pdFALSE; if( sError == pdFALSE ) { - /* If the calculation has always been correct, increment the check + /* If the calculation has always been correct, increment the check variable so we know this task is still running okay. */ ( *pulTaskCheckVariable )++; @@ -258,14 +258,14 @@ short sError = pdFALSE; vPortTaskUsesFPU(); #endif - /* The variable this task increments to show it is still running is passed in + /* The variable this task increments to show it is still running is passed in as the parameter. */ pulTaskCheckVariable = ( unsigned long * ) pvParameters; pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) ); - /* Keep filling an array, keeping a running total of the values placed in the - array. Then run through the array adding up all the values. If the two totals + /* Keep filling an array, keeping a running total of the values placed in the + array. Then run through the array adding up all the values. If the two totals do not match, stop the check variable from incrementing. */ for( ;; ) { @@ -275,7 +275,7 @@ short sError = pdFALSE; for( xPosition = 0; xPosition < xArraySize; xPosition++ ) { pdArray[ xPosition ] = ( portDOUBLE ) xPosition + 5.5; - dTotal1 += ( portDOUBLE ) xPosition + 5.5; + dTotal1 += ( portDOUBLE ) xPosition + 5.5; } #if configUSE_PREEMPTION == 0 @@ -299,7 +299,7 @@ short sError = pdFALSE; if( sError == pdFALSE ) { - /* If the calculation has always been correct, increment the check + /* If the calculation has always been correct, increment the check variable so we know this task is still running okay. */ ( *pulTaskCheckVariable )++; } @@ -322,14 +322,14 @@ short sError = pdFALSE; vPortTaskUsesFPU(); #endif - /* The variable this task increments to show it is still running is passed in + /* The variable this task increments to show it is still running is passed in as the parameter. */ pulTaskCheckVariable = ( unsigned long * ) pvParameters; pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) ); - /* Keep filling an array, keeping a running total of the values placed in the - array. Then run through the array adding up all the values. If the two totals + /* Keep filling an array, keeping a running total of the values placed in the + array. Then run through the array adding up all the values. If the two totals do not match, stop the check variable from incrementing. */ for( ;; ) { @@ -339,7 +339,7 @@ short sError = pdFALSE; for( xPosition = 0; xPosition < xArraySize; xPosition++ ) { pdArray[ xPosition ] = ( portDOUBLE ) xPosition * 12.123; - dTotal1 += ( portDOUBLE ) xPosition * 12.123; + dTotal1 += ( portDOUBLE ) xPosition * 12.123; } #if configUSE_PREEMPTION == 0 @@ -363,23 +363,23 @@ short sError = pdFALSE; if( sError == pdFALSE ) { - /* If the calculation has always been correct, increment the check + /* If the calculation has always been correct, increment the check variable so we know this task is still running okay. */ ( *pulTaskCheckVariable )++; } } -} +} /*-----------------------------------------------------------*/ /* This is called to check that all the created tasks are still running. */ portBASE_TYPE xAreMathsTaskStillRunning( void ) { -/* Keep a history of the check variables so we know if they have been incremented +/* Keep a history of the check variables so we know if they have been incremented since the last call. */ static unsigned long ulLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 }; portBASE_TYPE xReturn = pdTRUE, xTask; - /* Check the maths tasks are still running by ensuring their check variables + /* Check the maths tasks are still running by ensuring their check variables are still incrementing. */ for( xTask = 0; xTask < mathNUMBER_OF_TASKS; xTask++ ) { diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c index 7917b1459..8f814b7c5 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -124,7 +124,7 @@ will remove items as they are added, meaning the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) -/* Values passed to the two tasks just to check the task parameter +/* Values passed to the two tasks just to check the task parameter functionality. */ #define mainQUEUE_SEND_PARAMETER ( 0x1111UL ) #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) @@ -160,13 +160,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c index 91c8a76c3..59450465c 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -105,7 +105,7 @@ * software time maintains a pattern of spinning white LEDs. * * See the documentation page for this demo on the FreeRTOS.org web site for - * full information, including hardware setup requirements. + * full information, including hardware setup requirements. */ /* Standard includes. */ @@ -203,19 +203,19 @@ xTimerHandle xTimer = NULL; vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); /* Create the register test tasks, as described at the top of this file. */ - xTaskCreate( vRegTestTask1, ( const signed char * ) "Reg1...", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTestTask2, ( const signed char * ) "Reg2...", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - + xTaskCreate( vRegTestTask1, "Reg1...", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTestTask2, "Reg2...", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); - + if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); @@ -223,11 +223,11 @@ xTimerHandle xTimer = NULL; /* Create the software timer that performs the 'LED spin' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 75ms. */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvLEDTimerCallback /* The callback function that toggles the white LEDs. */ + xTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( mainLED_TIMER_PERIOD_MS ),/* The timer period, in this case 75ms. */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvLEDTimerCallback /* The callback function that toggles the white LEDs. */ ); if( xTimer != NULL ) @@ -235,20 +235,20 @@ xTimerHandle xTimer = NULL; xTimerStart( xTimer, mainDONT_BLOCK ); } - /* The set of tasks created by the following function call have to be - created last as they keep account of the number of tasks they expect to see + /* The set of tasks created by the following function call have to be + created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); - + /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ - for( ;; ); + for( ;; ); } /*-----------------------------------------------------------*/ @@ -340,7 +340,7 @@ const unsigned long ulRedLED1 = 6, ulRedLED2 = 9; LEDs are toggling, then an error has been reported in at least one task. */ vParTestToggleLED( ulLED1 ); vParTestToggleLED( ulLED2 ); - + /* Have any errors been latch in ulErrorFound? If so, ensure the gree LEDs are off, then switch to using the red LEDs. */ if( ulErrorFound != pdFALSE ) @@ -348,7 +348,7 @@ const unsigned long ulRedLED1 = 6, ulRedLED2 = 9; if( lChangeToRedLEDsAlready == pdFALSE ) { lChangeToRedLEDsAlready = pdTRUE; - + /* An error has been found. Switch to use the red LEDs. */ vParTestSetLED( ulLED1, pdFALSE ); vParTestSetLED( ulLED2, pdFALSE ); diff --git a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c index 6d9b262b8..70510cbe5 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -65,20 +65,20 @@ /* This simple demo project runs on the STM32 Discovery board, which is -populated with an STM32F100RB Cortex-M3 microcontroller. The discovery board +populated with an STM32F100RB Cortex-M3 microcontroller. The discovery board makes an ideal low cost evaluation platform, but the 8K of RAM provided on the -STM32F100RB does not allow the simple application to demonstrate all of all the -FreeRTOS kernel features. Therefore, this simple demo only actively -demonstrates task, queue, timer and interrupt functionality. In addition, the -demo is configured to include malloc failure, idle and stack overflow hook +STM32F100RB does not allow the simple application to demonstrate all of all the +FreeRTOS kernel features. Therefore, this simple demo only actively +demonstrates task, queue, timer and interrupt functionality. In addition, the +demo is configured to include malloc failure, idle and stack overflow hook functions. The idle hook function: The idle hook function queries the amount of FreeRTOS heap space that is -remaining (see vApplicationIdleHook() defined in this file). The demo -application is configured to use 7K of the available 8K of RAM as the FreeRTOS -heap. Memory is only allocated from this heap during initialisation, and this -demo only actually uses 1.6K bytes of the configured 7K available - leaving 5.4K +remaining (see vApplicationIdleHook() defined in this file). The demo +application is configured to use 7K of the available 8K of RAM as the FreeRTOS +heap. Memory is only allocated from this heap during initialisation, and this +demo only actually uses 1.6K bytes of the configured 7K available - leaving 5.4K bytes of heap space unallocated. The main() Function: @@ -86,31 +86,31 @@ main() creates one software timer, one queue, and two tasks. It then starts the scheduler. The Queue Send Task: -The queue send task is implemented by the prvQueueSendTask() function in this -file. prvQueueSendTask() sits in a loop that causes it to repeatedly block for -200 milliseconds, before sending the value 100 to the queue that was created +The queue send task is implemented by the prvQueueSendTask() function in this +file. prvQueueSendTask() sits in a loop that causes it to repeatedly block for +200 milliseconds, before sending the value 100 to the queue that was created within main(). Once the value is sent, the task loops back around to block for another 200 milliseconds. The Queue Receive Task: The queue receive task is implemented by the prvQueueReceiveTask() function -in this file. prvQueueReceiveTask() sits in a loop where it repeatedly blocks -on attempts to read data from the queue that was created within main(). When -data is received, the task checks the value of the data, and if the value equals -the expected 100, toggles the green LED. The 'block time' parameter passed to -the queue receive function specifies that the task should be held in the Blocked -state indefinitely to wait for data to be available on the queue. The queue -receive task will only leave the Blocked state when the queue send task writes -to the queue. As the queue send task writes to the queue every 200 -milliseconds, the queue receive task leaves the Blocked state every 200 +in this file. prvQueueReceiveTask() sits in a loop where it repeatedly blocks +on attempts to read data from the queue that was created within main(). When +data is received, the task checks the value of the data, and if the value equals +the expected 100, toggles the green LED. The 'block time' parameter passed to +the queue receive function specifies that the task should be held in the Blocked +state indefinitely to wait for data to be available on the queue. The queue +receive task will only leave the Blocked state when the queue send task writes +to the queue. As the queue send task writes to the queue every 200 +milliseconds, the queue receive task leaves the Blocked state every 200 milliseconds, and therefore toggles the green LED every 200 milliseconds. The LED Software Timer and the Button Interrupt: The user button B1 is configured to generate an interrupt each time it is -pressed. The interrupt service routine switches the red LED on, and resets the +pressed. The interrupt service routine switches the red LED on, and resets the LED software timer. The LED timer has a 5000 millisecond (5 second) period, and -uses a callback function that is defined to just turn the red LED off. -Therefore, pressing the user button will turn the red LED on, and the LED will +uses a callback function that is defined to just turn the red LED off. +Therefore, pressing the user button will turn the red LED on, and the LED will remain on until a full five seconds pass without the button being pressed. */ @@ -152,7 +152,7 @@ static void prvQueueReceiveTask( void *pvParameters ); static void prvQueueSendTask( void *pvParameters ); /* - * The LED timer callback function. This does nothing but switch the red LED + * The LED timer callback function. This does nothing but switch the red LED * off. */ static void vLEDTimerCallback( xTimerHandle xTimer ); @@ -163,7 +163,7 @@ static void vLEDTimerCallback( xTimerHandle xTimer ); static xQueueHandle xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback - * function. + * function. */ static xTimerHandle xLEDTimer = NULL; @@ -181,17 +181,17 @@ int main(void) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - /* Create the software timer that is responsible for turning off the LED - if the button is not pushed within 5000ms, as described at the top of + /* Create the software timer that is responsible for turning off the LED + if the button is not pushed within 5000ms, as described at the top of this file. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ @@ -286,8 +286,8 @@ unsigned long ulReceivedValue; if( ulReceivedValue == 100UL ) { /* NOTE - accessing the LED port should use a critical section - because it is accessed from multiple tasks, and the button interrupt - - in this trivial case, for simplicity, the critical section is + because it is accessed from multiple tasks, and the button interrupt + - in this trivial case, for simplicity, the critical section is omitted. */ STM32vldiscovery_LEDToggle( LED3 ); } @@ -305,7 +305,7 @@ static void prvSetupHardware( void ) STM32vldiscovery_LEDInit( LED3 ); STM32vldiscovery_LEDInit( LED4 ); STM32vldiscovery_PBInit( BUTTON_USER, BUTTON_MODE_EXTI ); - + /* Start with the LEDs off. */ STM32vldiscovery_LEDOff( LED3 ); STM32vldiscovery_LEDOff( LED4 ); @@ -316,7 +316,7 @@ void vApplicationMallocFailedHook( void ) { /* Called if a call to pvPortMalloc() fails because there is insufficient free memory available in the FreeRTOS heap. pvPortMalloc() is called - internally by FreeRTOS API functions that create tasks, queues, software + internally by FreeRTOS API functions that create tasks, queues, software timers, and semaphores. The size of the FreeRTOS heap is set by the configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */ for( ;; ); @@ -340,7 +340,7 @@ void vApplicationIdleHook( void ) volatile size_t xFreeStackSpace; /* This function is called on each cycle of the idle task. In this case it - does nothing useful, other than report the amout of FreeRTOS heap that + does nothing useful, other than report the amout of FreeRTOS heap that remains unallocated. */ xFreeStackSpace = xPortGetFreeHeapSize(); diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c index 6fbd505a6..0b9740e15 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -74,28 +74,28 @@ * defined and/or created within this file: * * "Check" task - This only executes every five seconds but has the highest - * priority so is guaranteed to get processor time. Its main function is to + * priority so is guaranteed to get processor time. Its main function is to * check that all the standard demo tasks are still operational. The check task * will toggle LED 3 (PB11) every five seconds so long as no errors have been - * detected. The toggle rate will increase to half a second if an error has + * detected. The toggle rate will increase to half a second if an error has * been found in any task. * - * "Echo" task - This is a very basic task that simply echoes any characters + * "Echo" task - This is a very basic task that simply echoes any characters * received on COM0 (USART1). This can be tested by transmitting a text file * from a dumb terminal to the STM32 USART then observing or capturing the text - * that is echoed back. Missing characters will be all the more obvious if the + * that is echoed back. Missing characters will be all the more obvious if the * file contains a simple repeating string of fixed width. * - * Currently this demo does not include interrupt nesting examples. High + * Currently this demo does not include interrupt nesting examples. High * frequency timer and simpler nesting examples can be found in most Cortex-M3 * demo applications. * - * The functions used to initialise, set and clear LED outputs are normally - * defined in partest.c. This demo includes two partest files, one that is - * configured for use with the Keil MCBSTM32 evaluation board (called + * The functions used to initialise, set and clear LED outputs are normally + * defined in partest.c. This demo includes two partest files, one that is + * configured for use with the Keil MCBSTM32 evaluation board (called * ParTest_MCBSTM32.c) and one that is configured for use with the official * ST Eval board (called ParTest_ST_Eval.c). One one of these files should be - * included in the build at any one time, as appropriate for the hardware + * included in the build at any one time, as appropriate for the hardware * actually being used. */ @@ -155,7 +155,7 @@ static void prvSetupHardware( void ); /* The 'check' task as described at the top of this file. */ static void prvCheckTask( void *pvParameters ); -/* A simple task that echoes all the characters that are received on COM0 +/* A simple task that echoes all the characters that are received on COM0 (USART1). */ static void prvUSARTEchoTask( void *pvParameters ); @@ -181,10 +181,10 @@ int main( void ) vStartRecursiveMutexTasks(); /* Create the 'echo' task, which is also defined within this file. */ - xTaskCreate( prvUSARTEchoTask, ( signed char * ) "Echo", configMINIMAL_STACK_SIZE, NULL, mainECHO_TASK_PRIORITY, NULL ); + xTaskCreate( prvUSARTEchoTask, "Echo", configMINIMAL_STACK_SIZE, NULL, mainECHO_TASK_PRIORITY, NULL ); /* Create the 'check' task, which is also defined within this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -254,7 +254,7 @@ signed char cChar; /* String declared static to ensure it does not end up on the stack, no matter what the optimisation level. */ -static const char *pcLongishString = +static const char *pcLongishString = "ABBA was a Swedish pop music group formed in Stockholm in 1972, consisting of Anni-Frid Frida Lyngstad, " "Björn Ulvaeus, Benny Andersson and Agnetha Fältskog. Throughout the band's existence, Fältskog and Ulvaeus " "were a married couple, as were Lyngstad and Andersson - although both couples later divorced. They became one " @@ -293,41 +293,41 @@ static const char *pcLongishString = static void prvSetupHardware( void ) { /* RCC system reset(for debug purpose). */ - RCC_DeInit (); + RCC_DeInit (); /* Enable HSE. */ - RCC_HSEConfig( RCC_HSE_ON ); - + RCC_HSEConfig( RCC_HSE_ON ); + /* Wait till HSE is ready. */ while (RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET); - + /* HCLK = SYSCLK. */ - RCC_HCLKConfig( RCC_SYSCLK_Div1 ); + RCC_HCLKConfig( RCC_SYSCLK_Div1 ); /* PCLK2 = HCLK. */ - RCC_PCLK2Config( RCC_HCLK_Div1 ); + RCC_PCLK2Config( RCC_HCLK_Div1 ); /* PCLK1 = HCLK/2. */ - RCC_PCLK1Config( RCC_HCLK_Div2 ); + RCC_PCLK1Config( RCC_HCLK_Div2 ); /* ADCCLK = PCLK2/4. */ - RCC_ADCCLKConfig( RCC_PCLK2_Div4 ); - + RCC_ADCCLKConfig( RCC_PCLK2_Div4 ); + /* Flash 2 wait state. */ - *( volatile unsigned long * )0x40022000 = 0x01; - + *( volatile unsigned long * )0x40022000 = 0x01; + /* PLLCLK = 8MHz * 9 = 72 MHz */ RCC_PLLConfig( RCC_PLLSource_HSE_Div1, RCC_PLLMul_9 ); - + /* Enable PLL. */ RCC_PLLCmd( ENABLE ); - + /* Wait till PLL is ready. */ while (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET); - + /* Select PLL as system clock source. */ RCC_SYSCLKConfig (RCC_SYSCLKSource_PLLCLK); - + /* Wait till PLL is used as system clock source. */ while (RCC_GetSYSCLKSource() != 0x08); diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c index 1f26125aa..dfc2175a2 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -220,7 +220,7 @@ int main( void ) /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ xLCDQueue = xQueueCreate( mainLCD_QUEUE_SIZE, sizeof( xLCDMessage ) ); - + /* Start the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); @@ -231,20 +231,20 @@ int main( void ) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); - + /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); - + /* Start the scheduler. */ vTaskStartScheduler(); - + /* Will only get here if there was not enough heap space to create the idle task. */ return 0; @@ -279,7 +279,7 @@ extern unsigned portSHORT usMaxJitter; xLastExecutionTime = xTaskGetTickCount(); xMessage.pcMessage = cPassMessage; - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ @@ -314,7 +314,7 @@ extern unsigned portSHORT usMaxJitter; else if( xAreComTestTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR IN COM TEST\n"; - } + } else { sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK ); @@ -382,10 +382,10 @@ static void prvSetupHardware( void ) NVIC_SetVectorTable( NVIC_VectTab_FLASH, 0x0 ); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); - + /* Configure HCLK clock as SysTick clock source. */ SysTick_CLKSourceConfig( SysTick_CLKSource_HCLK ); - + vParTestInitialise(); } /*-----------------------------------------------------------*/ @@ -430,10 +430,10 @@ static unsigned portCHAR ucLine = 0; { /* Display one character on LCD */ LCD_DisplayChar( ucLine, usRefColumn, (u8) ch ); - + /* Decrement the column position by 16 */ usRefColumn -= mainCOLUMN_INCREMENT; - + /* Increment the character counter */ usColumn++; if( usColumn == mainMAX_COLUMN ) @@ -448,7 +448,7 @@ static unsigned portCHAR ucLine = 0; /* Move back to the first column of the next line. */ ucLine += mainROW_INCREMENT; usRefColumn = mainCOLUMN_START; - usColumn = 0; + usColumn = 0; } /* Wrap back to the top of the display. */ @@ -456,7 +456,7 @@ static unsigned portCHAR ucLine = 0; { ucLine = 0; } - + return ch; } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c index 1f26125aa..dfc2175a2 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -220,7 +220,7 @@ int main( void ) /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ xLCDQueue = xQueueCreate( mainLCD_QUEUE_SIZE, sizeof( xLCDMessage ) ); - + /* Start the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); @@ -231,20 +231,20 @@ int main( void ) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); - + /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); - + /* Start the scheduler. */ vTaskStartScheduler(); - + /* Will only get here if there was not enough heap space to create the idle task. */ return 0; @@ -279,7 +279,7 @@ extern unsigned portSHORT usMaxJitter; xLastExecutionTime = xTaskGetTickCount(); xMessage.pcMessage = cPassMessage; - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ @@ -314,7 +314,7 @@ extern unsigned portSHORT usMaxJitter; else if( xAreComTestTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR IN COM TEST\n"; - } + } else { sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK ); @@ -382,10 +382,10 @@ static void prvSetupHardware( void ) NVIC_SetVectorTable( NVIC_VectTab_FLASH, 0x0 ); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); - + /* Configure HCLK clock as SysTick clock source. */ SysTick_CLKSourceConfig( SysTick_CLKSource_HCLK ); - + vParTestInitialise(); } /*-----------------------------------------------------------*/ @@ -430,10 +430,10 @@ static unsigned portCHAR ucLine = 0; { /* Display one character on LCD */ LCD_DisplayChar( ucLine, usRefColumn, (u8) ch ); - + /* Decrement the column position by 16 */ usRefColumn -= mainCOLUMN_INCREMENT; - + /* Increment the character counter */ usColumn++; if( usColumn == mainMAX_COLUMN ) @@ -448,7 +448,7 @@ static unsigned portCHAR ucLine = 0; /* Move back to the first column of the next line. */ ucLine += mainROW_INCREMENT; usRefColumn = mainCOLUMN_START; - usColumn = 0; + usColumn = 0; } /* Wrap back to the top of the display. */ @@ -456,7 +456,7 @@ static unsigned portCHAR ucLine = 0; { ucLine = 0; } - + return ch; } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c index d8fda4f3d..0ae9fa57b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -96,13 +96,13 @@ * along with the max jitter time to the LCD (again via the LCD task), as * described above. * - * Tick Hook - A tick hook is provided just for demonstration purposes. In + * Tick Hook - A tick hook is provided just for demonstration purposes. In * this case it is used to periodically send an instruction to updated the * MEMS input to the LCD task. * */ -/* CircleOS includes. Some of the CircleOS peripheral functionality is +/* CircleOS includes. Some of the CircleOS peripheral functionality is utilised, although CircleOS itself is not used. */ #include "circle.h" @@ -224,7 +224,7 @@ extern void vSetupTimerTest( void ); /* * A cut down version of sprintf() used to percent the HUGE GCC library - * equivalent from being included in the binary image. + * equivalent from being included in the binary image. */ extern int sprintf(char *out, const char *format, ...); @@ -251,7 +251,7 @@ int main( void ) /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ xLCDQueue = xQueueCreate( mainLCD_QUEUE_SIZE, sizeof( xLCDMessage ) ); - + /* Start the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); @@ -260,16 +260,16 @@ int main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); /* Start the tasks defined within this file/specific to this demo. */ - xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( prvLCDTask, ( signed portCHAR * ) "LCD", configLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvFlashTask, ( signed portCHAR * ) "Flash", configMINIMAL_STACK_SIZE, NULL, mainFLASH_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvLCDTask, "LCD", configLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvFlashTask, "Flash", configMINIMAL_STACK_SIZE, NULL, mainFLASH_TASK_PRIORITY, NULL ); /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); - + /* Start the scheduler. */ vTaskStartScheduler(); - + /* Will only get here if there was not enough heap space to create the idle task. */ return 0; @@ -314,11 +314,11 @@ const portCHAR * const pcBlankLine = " "; cY -= mainLCD_CHAR_HEIGHT; if( cY <= ( mainLCD_CHAR_HEIGHT - 1 ) ) - { + { /* Wrap the line onto which we are going to write the text. */ cY = mainLCD_MAX_Y; } - + /* Display the message. */ DRAW_DisplayString( 0, cY, xMessage.pcMessage, strlen( xMessage.pcMessage ) ); } @@ -339,7 +339,7 @@ extern unsigned portSHORT usMaxJitter; /* Setup the message we are going to send to the LCD task. */ xMessage.xMessageType = mainWRITE_STRING_MESSAGE; xMessage.pcMessage = cPassMessage; - + for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ @@ -457,10 +457,10 @@ static void prvSetupHardware( void ) NVIC_SetVectorTable( NVIC_VectTab_FLASH, 0x0 ); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); - + /* Configure HCLK clock as SysTick clock source. */ SysTick_CLKSourceConfig( SysTick_CLKSource_HCLK ); - + /* Misc initialisation, including some of the CircleOS features. Note that CircleOS itself is not used. */ vParTestInitialise(); diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c index 8857f1252..b50c2e559 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -215,7 +215,7 @@ int main( void ) vStartRecursiveMutexTasks(); /* Create the uIP task. The WEB server runs in this task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ @@ -223,7 +223,7 @@ int main( void ) /* Start the LCD gatekeeper task - as described in the comments at the top of this file. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, NULL, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( prvLCDTask, "LCD", configMINIMAL_STACK_SIZE * 2, NULL, mainLCD_TASK_PRIORITY, NULL ); /* Configure the high frequency interrupt used to measure the interrupt jitter time. When debugging it can be helpful to comment this line out diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/httpd-cgi.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/httpd-cgi.c index 5e92b0ad2..4bd844f0f 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/httpd-cgi.c @@ -207,7 +207,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); static char cCountBuf[ 32 ]; long lRefreshCount = 0; static unsigned short @@ -216,7 +216,7 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", (int)lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -260,14 +260,14 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats(void *arg) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", (int)lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c index cfb2bc8da..a82e18080 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c @@ -177,11 +177,11 @@ xTimerHandle xCheckTimer = NULL; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c index f87042bee..91d6f568d 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c @@ -215,8 +215,8 @@ void main_low_power( void ) configASSERT( xQueue ); /* Start the two tasks as described at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( const signed char * const ) "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( const signed char * const ) "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the scheduler running running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c index ef7e96bcb..10dfd992c 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -238,11 +238,11 @@ void main( void ) /* Configure the peripherals used by this demo application. This includes configuring the joystick input select button to generate interrupts. */ prvSetupHardware(); - + /* Create the queue used by tasks and interrupts to send strings to the LCD task. */ xLCDQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( xQueueMessage ) ); - + /* If the queue could not be created then don't create any tasks that might attempt to use the queue. */ if( xLCDQueue != NULL ) @@ -250,22 +250,22 @@ void main( void ) /* Add the created queue to the queue registry so it can be viewed in the IAR FreeRTOS state viewer plug-in. */ vQueueAddToRegistry( xLCDQueue, "LCDQueue" ); - + /* Create the LCD and button poll tasks, as described at the top of this file. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", mainLCD_TASK_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); - xTaskCreate( prvButtonPollTask, ( signed char * ) "ButPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - + xTaskCreate( prvLCDTask, "LCD", mainLCD_TASK_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( prvButtonPollTask, "ButPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + /* Create a subset of the standard demo tasks. */ vStartDynamicPriorityTasks(); vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartGenericQueueTasks( mainGENERIC_QUEUE_TEST_PRIORITY ); - + /* Start the scheduler. */ vTaskStartScheduler(); } - + /* If all is well then this line will never be reached. If it is reached then it is likely that there was insufficient (FreeRTOS) heap memory space to create the idle task. This may have been trapped by the malloc() failed @@ -289,9 +289,9 @@ static char cBuffer[ 512 ]; /* This function is the only function that uses printf(). If printf() is used from any other function then some sort of mutual exclusion on stdout will be necessary. - + This is also the only function that is permitted to access the LCD. - + First print out the number of bytes that remain in the FreeRTOS heap. This can be viewed in the terminal IO window within the IAR Embedded Workbench. */ printf( "%d bytes of heap space remain unallocated\n", xPortGetFreeHeapSize() ); @@ -311,7 +311,7 @@ static char cBuffer[ 512 ]; LCD_Clear( Blue ); lLine = 0; } - + /* What is this message? What does it contain? */ switch( xReceivedMessage.cMessageID ) { @@ -330,9 +330,9 @@ static char cBuffer[ 512 ]; the terminal IO window in the IAR embedded workbench. */ printf( "\nTask\t Abs Time\t %%Time\n*****************************************" ); - vTaskGetRunTimeStats( ( signed char * ) cBuffer ); + vTaskGetRunTimeStats( cBuffer ); printf( cBuffer ); - + /* Also print out a message to the LCD - in this case the pointer to the string to print @@ -343,7 +343,7 @@ static char cBuffer[ 512 ]; technique. */ sprintf( cBuffer, "%s", ( char * ) xReceivedMessage.lMessageValue ); break; - + case mainMESSAGE_STATUS : /* The tick interrupt hook function has just informed this task of the system status. @@ -351,15 +351,15 @@ static char cBuffer[ 512 ]; with the status value. */ prvGenerateStatusMessage( cBuffer, xReceivedMessage.lMessageValue ); break; - + default : sprintf( cBuffer, "Unknown message" ); break; } - + /* Output the message that was placed into the cBuffer array within the switch statement above. */ LCD_DisplayStringLine( lLine, ( uint8_t * ) cBuffer ); - + /* Move onto the next LCD line, ready for the next iteration of this loop. */ lLine += lFontHeight; @@ -377,7 +377,7 @@ static void prvGenerateStatusMessage( char *pcBuffer, long lStatusValue ) break; case mainERROR_DYNAMIC_TASKS : sprintf( pcBuffer, "Error: Dynamic tasks" ); break; - case mainERROR_COM_TEST : sprintf( pcBuffer, "Err: loop connected?" ); /* Error in COM test - is the Loopback connector connected? */ + case mainERROR_COM_TEST : sprintf( pcBuffer, "Err: loop connected?" ); /* Error in COM test - is the Loopback connector connected? */ break; case mainERROR_GEN_QUEUE_TEST : sprintf( pcBuffer, "Error: Gen Q test" ); break; @@ -396,9 +396,9 @@ long lHigherPriorityTaskWoken = pdFALSE; /* This is the interrupt handler for the joystick select button input. The button has been pushed, write a message to the LCD via the LCD task. */ xQueueSendFromISR( xLCDQueue, &xMessage, &lHigherPriorityTaskWoken ); - + EXTI_ClearITPendingBit( SEL_BUTTON_EXTI_LINE ); - + /* If writing to xLCDQueue caused a task to unblock, and the unblocked task has a priority equal to or above the task that this interrupt interrupted, then lHigherPriorityTaskWoken will have been set to pdTRUE internally within @@ -432,17 +432,17 @@ static xQueueMessage xStatusMessage = { mainMESSAGE_STATUS, pdPASS }; { xStatusMessage.lMessageValue = mainERROR_DYNAMIC_TASKS; } - + if( xAreComTestTasksStillRunning() != pdPASS ) { xStatusMessage.lMessageValue = mainERROR_COM_TEST; } - + if( xAreGenericQueueTasksStillRunning() != pdPASS ) { xStatusMessage.lMessageValue = mainERROR_GEN_QUEUE_TEST; } - + /* As this is the tick hook the lHigherPriorityTaskWoken parameter is not needed (a context switch is going to be performed anyway), but it must still be provided. */ @@ -472,7 +472,7 @@ xQueueMessage xMessage; lLastState = lState; xQueueSend( xLCDQueue, &xMessage, portMAX_DELAY ); } - + /* Block for 10 milliseconds so this task does not utilise all the CPU time and debouncing of the button is not necessary. */ vTaskDelay( 10 / portTICK_RATE_MS ); @@ -485,7 +485,7 @@ static void prvSetupHardware( void ) /* Ensure that all 4 interrupt priority bits are used as the pre-emption priority. */ NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); - + /* Initialise the LEDs. */ vParTestInitialise(); @@ -494,7 +494,7 @@ static void prvSetupHardware( void ) STM_EVAL_PBInit( BUTTON_DOWN, BUTTON_MODE_GPIO ); STM_EVAL_PBInit( BUTTON_LEFT, BUTTON_MODE_GPIO ); STM_EVAL_PBInit( BUTTON_RIGHT, BUTTON_MODE_GPIO ); - + /* The select button in the middle of the joystick is configured to generate an interrupt. The Eval board library will configure the interrupt priority to be the lowest priority available so the priority need not be @@ -504,7 +504,7 @@ static void prvSetupHardware( void ) STM_EVAL_PBInit( BUTTON_SEL, BUTTON_MODE_EXTI ); /* Initialize the LCD */ - STM32L152_LCD_Init(); + STM32L152_LCD_Init(); LCD_Clear( Blue ); LCD_SetBackColor( Blue ); LCD_SetTextColor( White ); @@ -524,7 +524,7 @@ NVIC_InitTypeDef NVIC_InitStructure; significant two bytes are given by the current TIM6 counter value. Care must be taken with data consistency when combining the two in case a timer overflow occurs as the value is being read. - + The portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro (in FreeRTOSConfig.h) is defined to call this function, so the kernel will call this function automatically at the appropriate time. */ @@ -538,22 +538,22 @@ NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseStructure.TIM_Prescaler = 5000; TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; - + TIM_TimeBaseInit( TIM6, &TIM_TimeBaseStructure ); - + /* Only interrupt on overflow events. */ TIM6->CR1 |= TIM_CR1_URS; - + /* Enable the interrupt. */ TIM_ITConfig( TIM6, TIM_IT_Update, ENABLE ); - + /* Enable the TIM6 global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = TIM6_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = configLIBRARY_LOWEST_INTERRUPT_PRIORITY; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x00; /* Not used as 4 bits are used for the pre-emption priority. */ NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); - + TIM_ClearITPendingBit( TIM6, TIM_IT_Update ); TIM_Cmd( TIM6, ENABLE ); } @@ -562,7 +562,7 @@ NVIC_InitTypeDef NVIC_InitStructure; void TIM6_IRQHandler( void ) { /* Interrupt handler for TIM 6 - + The time base for the run time stats is generated by the 16 bit timer 6. Each time the timer overflows ulTIM6_OverflowCount is incremented. Therefore, when converting the total run time to a 32 bit number, the most @@ -582,7 +582,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName { ( void ) pcTaskName; ( void ) pxTask; - + /* Run time stack overflow checking is performed if configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is called if a stack overflow is detected. */ diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c index 3febd45f0..83c86d8a4 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -161,13 +161,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c index 995ddfadb..a5cf67c17 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT @@ -199,7 +199,7 @@ void vRegisterSampleCLICommands( void ) static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n"; +const char *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -209,8 +209,8 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac configASSERT( pcWriteBuffer ); /* Generate a table of task stats. */ - strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskList( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + strcpy( ( char * ) pcWriteBuffer, pcHeader ); + vTaskList( pcWriteBuffer + strlen( pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ @@ -220,7 +220,7 @@ const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stac static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString ) { -const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n"; +const char * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n"; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -230,8 +230,8 @@ const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Ti configASSERT( pcWriteBuffer ); /* Generate a table of task stats. */ - strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader ); - vTaskGetRunTimeStats( pcWriteBuffer + strlen( ( char * ) pcHeader ) ); + strcpy( ( char * ) pcWriteBuffer, pcHeader ); + vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c index 380215b67..6f0cab30a 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -141,12 +141,12 @@ void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPr prvConfigureUART(); /* Create that task that handles the console itself. */ - xTaskCreate( prvUARTCommandConsoleTask, /* The task that implements the command console. */ - ( const int8_t * const ) "CLI", /* Text name assigned to the task. This is just to assist debugging. The kernel does not use this name itself. */ - usStackSize, /* The size of the stack allocated to the task. */ - NULL, /* The parameter is not used, so NULL is passed. */ - uxPriority, /* The priority allocated to the task. */ - NULL ); /* A handle is not required, so just pass NULL. */ + xTaskCreate( prvUARTCommandConsoleTask, /* The task that implements the command console. */ + "CLI", /* Text name assigned to the task. This is just to assist debugging. The kernel does not use this name itself. */ + usStackSize, /* The size of the stack allocated to the task. */ + NULL, /* The parameter is not used, so NULL is passed. */ + uxPriority, /* The priority allocated to the task. */ + NULL ); /* A handle is not required, so just pass NULL. */ } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c index 8109fcd1d..9a29201d2 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -230,11 +230,11 @@ xTimerHandle xCheckTimer = NULL; /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c index f3ada08b8..374257bf4 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -85,8 +85,8 @@ static signed char seg7_digits[4]; void vStart7SegTasks( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( prvRefreshTask, ( signed char * ) "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); - xTaskCreate( prvCountTask, ( signed char * ) "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); + xTaskCreate( prvRefreshTask, "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); + xTaskCreate( prvCountTask, "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c index b12e8dc1f..d57cf5f10 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -85,8 +85,8 @@ static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL; void vStartRegTestTasks( void ) { - xTaskCreate( vRegTest1, ( signed char * ) "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2, ( signed char * ) "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1, "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2, "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c index 4cb9d4a9d..3002f70b5 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -180,7 +180,7 @@ int main( void ) vStartRegTestTasks(); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/httpd-cgi.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/httpd-cgi.c index 88cd4cb93..ecf40708b 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/httpd-cgi.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/httpd-cgi.c @@ -207,7 +207,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern unsigned long ulCheckErrors; static char cCountBuf[ 32 ]; long lRefreshCount = 0; @@ -217,9 +217,9 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", lRefreshCount ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); - + /* Have any errors been latched? */ if( ulCheckErrors != 0 ) { diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c index a01fd94a8..86a243a6b 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -79,11 +79,11 @@ * pages display some TCP/IP status information and permit LED3 to be turned on * and off using a check box. * - * Tick hook function that implements a "Check" function - This is executed - * every 5 seconds from the tick hook function. It checks to ensure that all - * the standard demo tasks are still operational and running without error. - * The system status (pass/fail) is then displayed underneith the task table on - * the served WEB pages. + * Tick hook function that implements a "Check" function - This is executed + * every 5 seconds from the tick hook function. It checks to ensure that all + * the standard demo tasks are still operational and running without error. + * The system status (pass/fail) is then displayed underneith the task table on + * the served WEB pages. * * "Reg test" tasks - These fill the registers with known values, then check * that each register still contains its expected value. Each task uses @@ -168,8 +168,8 @@ extern void vBasicWEBServer( void *pv ); /* Setup the hardware ready for this demo. */ prvSetupHardware(); - - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* Start the standard demo tasks. */ vStartLEDFlashTasks( tskIDLE_PRIORITY ); @@ -179,8 +179,8 @@ extern void vBasicWEBServer( void *pv ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the reg test tasks - defined in this file. */ - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -197,17 +197,17 @@ void vApplicationTickHook( void ) { static unsigned long ulExecutionCount = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0; const unsigned long ulExecutionRate = 5000 / portTICK_RATE_MS; - + /* Increment the count of how many times the tick hook has been called. */ ulExecutionCount++; - + /* Is it time to perform the check again? */ if( ulExecutionCount >= ulExecutionRate ) { /* Reset the execution count so this function is called again in 5 seconds time. */ ulExecutionCount = 0; - + /* Has an error been found in any task? */ if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { @@ -245,13 +245,13 @@ const unsigned long ulExecutionRate = 5000 / portTICK_RATE_MS; } /*-----------------------------------------------------------*/ -static void prvSetupHardware( void ) +static void prvSetupHardware( void ) { /* Disable the watchdog, STOP and WAIT modes. */ SOPT1 = 0; /* --- Setup clock to use external 25MHz source. --- */ - + /* Extal and xtal pin ON. */ PTDPF1_D4 = 0x03; PTDPF1_D5 = 0x03; @@ -261,12 +261,12 @@ static void prvSetupHardware( void ) MCGC2 = MCGC2_ERCLKEN_MASK /* Activate external reference clock */ | MCGC2_EREFS_MASK /* Because crystal is being used */ | MCGC2_RANGE_MASK; /* High range */ - + /* Select clock mode and clear IREFs. */ MCGC1 = (0x02 << 6 ) /* CLKS = 10 -> external reference clock. */ | (0x04 << 3 ) /* RDIV = 2^4 -> 25MHz/16 = 1.5625 MHz */ | MCGC1_IRCLKEN_MASK; /* IRCLK to RTC enabled */ - + /* Wait for Reference and Clock status bits to update. */ while( MCGSC_IREFST | ( MCGSC_CLKST != 0x02 ) ) { @@ -284,7 +284,7 @@ static void prvSetupHardware( void ) } - /* Now in PBE Mode, finally switch from PBE to PEE (PLL enabled external + /* Now in PBE Mode, finally switch from PBE to PEE (PLL enabled external mode). */ MCGC1_CLKS = 0b00; /* PLL clock to system (MCGOUT) */ @@ -319,7 +319,7 @@ static void vRegTest1Task( void *pvParameters ) { /* Just to remove compiler warnings. */ ( void ) pvParameters; - + /* Set all the registers to known values, then check that each retains its expected value - as described at the top of this file. If an error is found then the loop counter will no longer be incremented allowing the check @@ -330,7 +330,7 @@ static void vRegTest1Task( void *pvParameters ) " moveq #3, d2 \n\t" " moveq #4, d3 \n\t" " moveq #5, d4 \n\t" - " moveq #6, d5 \n\t" + " moveq #6, d5 \n\t" " moveq #7, d6 \n\t" " moveq #8, d7 \n\t" " move #9, a0 \n\t" diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c index 9634c1994..3478acf24 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -177,12 +177,12 @@ int main( void ) vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES ); /* Create the check task. */ - xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the reg test tasks - defined in this file. */ - xTaskCreate( vRegTest1Task, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -232,7 +232,7 @@ volatile unsigned portBASE_TYPE uxUnusedStack; { ulError |= 0x20UL; } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { ulError |= 0x40UL; @@ -260,7 +260,7 @@ volatile unsigned portBASE_TYPE uxUnusedStack; /* Toggle the LED each itteration. */ vParTestToggleLED( mainCHECK_LED ); - + /* For demo only - how much unused stack does this task have? */ uxUnusedStack = uxTaskGetStackHighWaterMark( NULL ); } diff --git a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/main.c index 3c91a2d27..bb914c0bf 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -155,7 +155,7 @@ static void vRegTest2Task( void *pvParameters ); /* Counters used to detect errors within the reg test tasks. */ static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222; -/* Any errors that the check task finds in any tasks are latched into +/* Any errors that the check task finds in any tasks are latched into ulErrorCode, and then displayed via the WEB server. */ static unsigned portLONG ulErrorCode = 0UL; @@ -167,7 +167,7 @@ int main( void ) prvSetupHardware(); /* Create the WEB server task. */ - xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); /* Start the standard demo tasks. */ vStartLEDFlashTasks( tskIDLE_PRIORITY ); @@ -180,11 +180,11 @@ int main( void ) vStartRecursiveMutexTasks(); /* Start the reg test tasks - defined in this file. */ - xTaskCreate( vRegTest1Task, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); /* Create the check task. */ - xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/webserver/httpd-cgi.c index 7b7fef7fd..9e880759a 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/webserver/httpd-cgi.c @@ -206,7 +206,7 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr)) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern unsigned long ulGetErrorCode( void ); static char cCountBuf[ 32 ]; @@ -217,7 +217,7 @@ generate_rtos_stats(void *arg) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d, Error code = %d (0 = no errors)", (int)lRefreshCount, (int)ulGetErrorCode() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -272,7 +272,7 @@ void vApplicationProcessFormInput( char *pcInputString ) { char *c = pcInputString; - /* Process the form input sent by the IO page of the served HTML. + /* Process the form input sent by the IO page of the served HTML. This just contains an instruction to either turn on or off the LED. */ while( ( *c != '?' ) && ( *c != 0x00 ) ) { diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c index 6228ccfd5..a20ee5593 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -162,21 +162,21 @@ static void vProcessConnection( struct netconn *pxNetCon ) ulPageHits++; sprintf( cPageHits, "%d", (int)ulPageHits ); - /* Write out the HTTP OK header. */ + /* Write out the HTTP OK header. */ netconn_write( pxNetCon, webHTTP_OK, ( u16_t ) strlen( webHTTP_OK ), NETCONN_COPY ); /* Generate the dynamic page... - + ... First the page header. */ strcpy( cDynamicPage, webHTML_START ); /* ... Then the hit count... */ strcat( cDynamicPage, cPageHits ); - + strcat( cDynamicPage, "

Task          State  Priority  Stack      #
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed portCHAR * )cDynamicPage + strlen( cDynamicPage ) ); - + vTaskList( cDynamicPage + strlen( cDynamicPage ) ); + /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); @@ -229,7 +229,7 @@ void vBasicWEBServer( void *pvParameters ) /* Loop forever */ for( ;; ) - { + { /* Wait for connection. */ pxNewConnection = netconn_accept( pxHTTPListener ); diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c index 516f3e493..f3221260f 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -182,11 +182,11 @@ extern void vBasicWEBServer( void *pv ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the reg test tasks - defined in this file. */ - xTaskCreate( vRegTest1Task, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); /* Create the check task. */ - xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c index 7f643fbca..f3819c950 100644 --- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -177,11 +177,11 @@ int main( void ) vStartInterruptQueueTasks(); /* Start the reg test tasks - defined in this file. */ - xTaskCreate( vRegTest1Task, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2Task, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest1Counter, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) &ulRegTest2Counter, tskIDLE_PRIORITY, NULL ); /* Create the check task. */ - xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c index aff7d32cd..0e180a121 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c +++ b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c @@ -171,8 +171,8 @@ const portTickType xDontBlock = ( portTickType ) 0; /* Note the producer has a lower priority than the consumer when the tasks are spawned. */ - xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL ); - xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL ); + xTaskCreate( vBlockingQueueProducer, "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL ); @@ -189,8 +189,8 @@ const portTickType xDontBlock = ( portTickType ) 0; pxQueueParameters4->xBlockTime = xBlockTime; pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] ); - xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueProducer, "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL ); @@ -206,8 +206,8 @@ const portTickType xDontBlock = ( portTickType ) 0; pxQueueParameters6->xBlockTime = xBlockTime; pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] ); - xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueProducer, "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlock.c b/FreeRTOS/Demo/Common/Minimal/AltBlock.c index 93c847219..9cf4c982b 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltBlock.c +++ b/FreeRTOS/Demo/Common/Minimal/AltBlock.c @@ -124,12 +124,12 @@ void vCreateAltBlockTimeTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xTestQueue, ( signed portCHAR * ) "AltBlockQueue" ); + vQueueAddToRegistry( xTestQueue, "AltBlockQueue" ); /* Create the two test tasks. */ - xTaskCreate( vPrimaryBlockTimeTestTask, ( signed portCHAR * )"FBTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); - xTaskCreate( vSecondaryBlockTimeTestTask, ( signed portCHAR * )"FBTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); + xTaskCreate( vPrimaryBlockTimeTestTask, "FBTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); + xTaskCreate( vSecondaryBlockTimeTestTask, "FBTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c index 25949ea55..f1af2a37c 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c +++ b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c @@ -134,12 +134,12 @@ static xQueueHandle xPolledQueue; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xPolledQueue, ( signed portCHAR * ) "AltPollQueue" ); + vQueueAddToRegistry( xPolledQueue, "AltPollQueue" ); /* Spawn the producer and consumer. */ - xTaskCreate( vPolledQueueConsumer, ( signed portCHAR * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( vPolledQueueProducer, ( signed portCHAR * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/AltQTest.c b/FreeRTOS/Demo/Common/Minimal/AltQTest.c index 971033662..4e17a1497 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/AltQTest.c @@ -154,12 +154,12 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xQueue, ( signed portCHAR * ) "Alt_Gen_Test_Queue" ); + vQueueAddToRegistry( xQueue, "Alt_Gen_Test_Queue" ); /* Create the demo task and pass it the queue just created. We are passing the queue handle by value so it does not matter that it is declared on the stack here. */ - xTaskCreate( prvSendFrontAndBackTest, ( signed portCHAR * ) "FGenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL ); + xTaskCreate( prvSendFrontAndBackTest, "FGenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL ); /* Create the mutex used by the prvMutexTest task. */ xMutex = xSemaphoreCreateMutex(); @@ -170,14 +170,14 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Alt_Q_Mutex" ); + vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Alt_Q_Mutex" ); /* Create the mutex demo tasks and pass it the mutex just created. We are passing the mutex handle by value so it does not matter that it is declared on the stack here. */ - xTaskCreate( prvLowPriorityMutexTask, ( signed portCHAR * ) "FMuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); - xTaskCreate( prvMediumPriorityMutexTask, ( signed portCHAR * ) "FMuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); - xTaskCreate( prvHighPriorityMutexTask, ( signed portCHAR * ) "FMuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask ); + xTaskCreate( prvLowPriorityMutexTask, "FMuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); + xTaskCreate( prvMediumPriorityMutexTask, "FMuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); + xTaskCreate( prvHighPriorityMutexTask, "FMuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/BlockQ.c b/FreeRTOS/Demo/Common/Minimal/BlockQ.c index be190501a..9c2d83323 100644 --- a/FreeRTOS/Demo/Common/Minimal/BlockQ.c +++ b/FreeRTOS/Demo/Common/Minimal/BlockQ.c @@ -168,8 +168,8 @@ const portTickType xDontBlock = ( portTickType ) 0; /* Note the producer has a lower priority than the consumer when the tasks are spawned. */ - xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL ); - xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL ); + xTaskCreate( vBlockingQueueProducer, "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL ); @@ -186,8 +186,8 @@ const portTickType xDontBlock = ( portTickType ) 0; pxQueueParameters4->xBlockTime = xBlockTime; pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] ); - xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QConsB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QProdB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QConsB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueProducer, "QProdB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL ); @@ -203,8 +203,8 @@ const portTickType xDontBlock = ( portTickType ) 0; pxQueueParameters6->xBlockTime = xBlockTime; pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] ); - xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueProducer, "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vBlockingQueueConsumer, "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c index e1425076c..90139c593 100644 --- a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c @@ -167,10 +167,10 @@ xTaskHandle xWaitBitsTaskHandle; * event groups API. */ - xTaskCreate( prvWaitBitsTask, ( signed char * ) "WaitO", configMINIMAL_STACK_SIZE, NULL, ebWAIT_BIT_TASK_PRIORITY, &xWaitBitsTaskHandle ); - xTaskCreate( prvSetBitsTask, ( signed char * ) "SetB", configMINIMAL_STACK_SIZE, ( void * ) xWaitBitsTaskHandle, ebSET_BIT_TASK_PRIORITY, NULL ); - xTaskCreate( prvSyncTask, ( signed char * ) "Rndv", configMINIMAL_STACK_SIZE, ( void * ) ebRENDESVOUS_TASK_1_SYNC_BIT, ebWAIT_BIT_TASK_PRIORITY, &xSyncTask1 ); - xTaskCreate( prvSyncTask, ( signed char * ) "Rndv", configMINIMAL_STACK_SIZE, ( void * ) ebRENDESVOUS_TASK_2_SYNC_BIT, ebWAIT_BIT_TASK_PRIORITY, &xSyncTask2 ); + xTaskCreate( prvWaitBitsTask, "WaitO", configMINIMAL_STACK_SIZE, NULL, ebWAIT_BIT_TASK_PRIORITY, &xWaitBitsTaskHandle ); + xTaskCreate( prvSetBitsTask, "SetB", configMINIMAL_STACK_SIZE, ( void * ) xWaitBitsTaskHandle, ebSET_BIT_TASK_PRIORITY, NULL ); + xTaskCreate( prvSyncTask, "Rndv", configMINIMAL_STACK_SIZE, ( void * ) ebRENDESVOUS_TASK_1_SYNC_BIT, ebWAIT_BIT_TASK_PRIORITY, &xSyncTask1 ); + xTaskCreate( prvSyncTask, "Rndv", configMINIMAL_STACK_SIZE, ( void * ) ebRENDESVOUS_TASK_2_SYNC_BIT, ebWAIT_BIT_TASK_PRIORITY, &xSyncTask2 ); /* If the last task was created then the others will have been too. */ configASSERT( xSyncTask2 ); diff --git a/FreeRTOS/Demo/Common/Minimal/GenQTest.c b/FreeRTOS/Demo/Common/Minimal/GenQTest.c index 90dac3520..232a90cd9 100644 --- a/FreeRTOS/Demo/Common/Minimal/GenQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/GenQTest.c @@ -156,12 +156,12 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xQueue, ( signed portCHAR * ) "Gen_Queue_Test" ); + vQueueAddToRegistry( xQueue, "Gen_Queue_Test" ); /* Create the demo task and pass it the queue just created. We are passing the queue handle by value so it does not matter that it is declared on the stack here. */ - xTaskCreate( prvSendFrontAndBackTest, ( signed portCHAR * )"GenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL ); + xTaskCreate( prvSendFrontAndBackTest, "GenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL ); /* Create the mutex used by the prvMutexTest task. */ xMutex = xSemaphoreCreateMutex(); @@ -172,14 +172,14 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Gen_Queue_Mutex" ); + vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Gen_Queue_Mutex" ); /* Create the mutex demo tasks and pass it the mutex just created. We are passing the mutex handle by value so it does not matter that it is declared on the stack here. */ - xTaskCreate( prvLowPriorityMutexTask, ( signed portCHAR * )"MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); - xTaskCreate( prvMediumPriorityMutexTask, ( signed portCHAR * )"MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); - xTaskCreate( prvHighPriorityMutexTask, ( signed portCHAR * )"MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask ); + xTaskCreate( prvLowPriorityMutexTask, "MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); + xTaskCreate( prvMediumPriorityMutexTask, "MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); + xTaskCreate( prvHighPriorityMutexTask, "MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/IntQueue.c b/FreeRTOS/Demo/Common/Minimal/IntQueue.c index 42d21032c..e54c4c549 100644 --- a/FreeRTOS/Demo/Common/Minimal/IntQueue.c +++ b/FreeRTOS/Demo/Common/Minimal/IntQueue.c @@ -225,12 +225,12 @@ static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine ); void vStartInterruptQueueTasks( void ) { /* Start the test tasks. */ - xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H1QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask1 ); - xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H2QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask2 ); - xTaskCreate( prvLowerPriorityNormallyEmptyTask, ( signed portCHAR * ) "L1QRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); - xTaskCreate( prv1stHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask1 ); - xTaskCreate( prv2ndHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H2QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 ); - xTaskCreate( prvLowerPriorityNormallyFullTask, ( signed portCHAR * ) "L2QRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); + xTaskCreate( prvHigherPriorityNormallyEmptyTask, "H1QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask1 ); + xTaskCreate( prvHigherPriorityNormallyEmptyTask, "H2QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask2 ); + xTaskCreate( prvLowerPriorityNormallyEmptyTask, "L1QRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); + xTaskCreate( prv1stHigherPriorityNormallyFullTask, "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask1 ); + xTaskCreate( prv2ndHigherPriorityNormallyFullTask, "H2QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 ); + xTaskCreate( prvLowerPriorityNormallyFullTask, "L2QRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); /* Create the queues that are accessed by multiple tasks and multiple interrupts. */ @@ -243,8 +243,8 @@ void vStartInterruptQueueTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xNormallyFullQueue, ( signed portCHAR * ) "NormallyFull" ); - vQueueAddToRegistry( xNormallyEmptyQueue, ( signed portCHAR * ) "NormallyEmpty" ); + vQueueAddToRegistry( xNormallyFullQueue, "NormallyFull" ); + vQueueAddToRegistry( xNormallyEmptyQueue, "NormallyEmpty" ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/PollQ.c b/FreeRTOS/Demo/Common/Minimal/PollQ.c index e3a3cb3c5..eb6158185 100644 --- a/FreeRTOS/Demo/Common/Minimal/PollQ.c +++ b/FreeRTOS/Demo/Common/Minimal/PollQ.c @@ -136,11 +136,11 @@ static xQueueHandle xPolledQueue; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xPolledQueue, ( signed char * ) "Poll_Test_Queue" ); + vQueueAddToRegistry( xPolledQueue, "Poll_Test_Queue" ); /* Spawn the producer and consumer. */ - xTaskCreate( vPolledQueueConsumer, ( signed char * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( vPolledQueueProducer, ( signed char * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/QPeek.c b/FreeRTOS/Demo/Common/Minimal/QPeek.c index 942155c90..76cb7dfd3 100644 --- a/FreeRTOS/Demo/Common/Minimal/QPeek.c +++ b/FreeRTOS/Demo/Common/Minimal/QPeek.c @@ -129,15 +129,15 @@ xQueueHandle xQueue; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xQueue, ( signed portCHAR * ) "QPeek_Test_Queue" ); + vQueueAddToRegistry( xQueue, "QPeek_Test_Queue" ); /* Create the demo tasks and pass it the queue just created. We are passing the queue handle by value so it does not matter that it is declared on the stack here. */ - xTaskCreate( prvLowPriorityPeekTask, ( signed portCHAR * )"PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL ); - xTaskCreate( prvMediumPriorityPeekTask, ( signed portCHAR * )"PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask ); - xTaskCreate( prvHighPriorityPeekTask, ( signed portCHAR * )"PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask ); - xTaskCreate( prvHighestPriorityPeekTask, ( signed portCHAR * )"PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask ); + xTaskCreate( prvLowPriorityPeekTask, "PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL ); + xTaskCreate( prvMediumPriorityPeekTask, "PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask ); + xTaskCreate( prvHighPriorityPeekTask, "PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask ); + xTaskCreate( prvHighestPriorityPeekTask, "PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c index b6259fc71..68cc62c07 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c @@ -109,7 +109,7 @@ const unsigned portBASE_TYPE uxQueueLength = 1; /* Create the test task. The queue used by the test task is created inside the task itself. */ - xTaskCreate( prvQueueOverwriteTask, ( signed char * ) "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvQueueOverwriteTask, "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSet.c b/FreeRTOS/Demo/Common/Minimal/QueueSet.c index dbd9db7f5..036b98b2c 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueSet.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueSet.c @@ -229,8 +229,8 @@ xTaskHandle xQueueSetSendingTask, xQueueSetReceivingTask; void vStartQueueSetTasks( void ) { /* Create the tasks. */ - xTaskCreate( prvQueueSetSendingTask, ( signed char * ) "SetTx", configMINIMAL_STACK_SIZE, NULL, queuesetMEDIUM_PRIORITY, &xQueueSetSendingTask ); - xTaskCreate( prvQueueSetReceivingTask, ( signed char * ) "SetRx", configMINIMAL_STACK_SIZE, ( void * ) xQueueSetSendingTask, queuesetMEDIUM_PRIORITY, &xQueueSetReceivingTask ); + xTaskCreate( prvQueueSetSendingTask, "SetTx", configMINIMAL_STACK_SIZE, NULL, queuesetMEDIUM_PRIORITY, &xQueueSetSendingTask ); + xTaskCreate( prvQueueSetReceivingTask, "SetRx", configMINIMAL_STACK_SIZE, ( void * ) xQueueSetSendingTask, queuesetMEDIUM_PRIORITY, &xQueueSetReceivingTask ); /* It is important that the sending task does not attempt to write to a queue before the queue has been created. It is therefore placed into the diff --git a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c index 62b675bcb..f04975bd1 100644 --- a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c @@ -175,7 +175,7 @@ void vStartTimerDemoTask( portTickType xBasePeriodIn ) task, which will then preempt this task). */ if( xTestStatus != pdFAIL ) { - xTaskCreate( prvTimerTestTask, ( signed portCHAR * ) "Tmr Tst", configMINIMAL_STACK_SIZE, NULL, configTIMER_TASK_PRIORITY - 1, NULL ); + xTaskCreate( prvTimerTestTask, "Tmr Tst", configMINIMAL_STACK_SIZE, NULL, configTIMER_TASK_PRIORITY - 1, NULL ); } } /*-----------------------------------------------------------*/ @@ -185,11 +185,11 @@ static void prvTimerTestTask( void *pvParameters ) ( void ) pvParameters; /* Create a one-shot timer for use later on in this test. */ - xOneShotTimer = xTimerCreate( ( const signed char * ) "Oneshot Timer",/* Text name to facilitate debugging. The kernel does not use this itself. */ - tmrdemoONE_SHOT_TIMER_PERIOD, /* The period for the timer. */ - pdFALSE, /* Don't auto-reload - hence a one shot timer. */ - ( void * ) 0, /* The timer identifier. In this case this is not used as the timer has its own callback. */ - prvOneShotTimerCallback ); /* The callback to be called when the timer expires. */ + xOneShotTimer = xTimerCreate( "Oneshot Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ + tmrdemoONE_SHOT_TIMER_PERIOD, /* The period for the timer. */ + pdFALSE, /* Don't auto-reload - hence a one shot timer. */ + ( void * ) 0, /* The timer identifier. In this case this is not used as the timer has its own callback. */ + prvOneShotTimerCallback ); /* The callback to be called when the timer expires. */ if( xOneShotTimer == NULL ) { @@ -285,7 +285,7 @@ unsigned portBASE_TYPE xTimer; and start a timer. These timers are being started before the scheduler has been started, so their block times should get set to zero within the timer API itself. */ - xAutoReloadTimers[ xTimer ] = xTimerCreate( ( const signed char * )"FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ + xAutoReloadTimers[ xTimer ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ ( ( xTimer + ( portTickType ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */ pdTRUE, /* Auto-reload is set to true. */ ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */ @@ -313,11 +313,11 @@ unsigned portBASE_TYPE xTimer; /* The timers queue should now be full, so it should be possible to create another timer, but not possible to start it (the timer queue will not get drained until the scheduler has been started. */ - xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] = xTimerCreate( ( const signed char * ) "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ - ( configTIMER_QUEUE_LENGTH * xBasePeriod ), /* The period for the timer. */ - pdTRUE, /* Auto-reload is set to true. */ - ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */ - prvAutoReloadTimerCallback ); /* The callback executed when the timer expires. */ + xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ + ( configTIMER_QUEUE_LENGTH * xBasePeriod ), /* The period for the timer. */ + pdTRUE, /* Auto-reload is set to true. */ + ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */ + prvAutoReloadTimerCallback ); /* The callback executed when the timer expires. */ if( xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] == NULL ) { @@ -337,13 +337,13 @@ unsigned portBASE_TYPE xTimer; /* Create the timers that are used from the tick interrupt to test the timer API functions that can be called from an ISR. */ - xISRAutoReloadTimer = xTimerCreate( ( const signed char * ) "ISR AR", /* The text name given to the timer. */ + xISRAutoReloadTimer = xTimerCreate( "ISR AR", /* The text name given to the timer. */ 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */ pdTRUE, /* This is an auto reload timer. */ ( void * ) NULL, /* The identifier is not required. */ prvISRAutoReloadTimerCallback ); /* The callback that is executed when the timer expires. */ - xISROneShotTimer = xTimerCreate( ( const signed char * ) "ISR OS", /* The text name given to the timer. */ + xISROneShotTimer = xTimerCreate( "ISR OS", /* The text name given to the timer. */ 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */ pdFALSE, /* This is a one shot timer. */ ( void * ) NULL, /* The identifier is not required. */ diff --git a/FreeRTOS/Demo/Common/Minimal/blocktim.c b/FreeRTOS/Demo/Common/Minimal/blocktim.c index cef2ba6a1..318caa147 100644 --- a/FreeRTOS/Demo/Common/Minimal/blocktim.c +++ b/FreeRTOS/Demo/Common/Minimal/blocktim.c @@ -127,11 +127,11 @@ void vCreateBlockTimeTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xTestQueue, ( signed char * ) "Block_Time_Queue" ); + vQueueAddToRegistry( xTestQueue, "Block_Time_Queue" ); /* Create the two test tasks. */ - xTaskCreate( vPrimaryBlockTimeTestTask, ( signed char * )"BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); - xTaskCreate( vSecondaryBlockTimeTestTask, ( signed char * )"BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); + xTaskCreate( vPrimaryBlockTimeTestTask, "BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); + xTaskCreate( vSecondaryBlockTimeTestTask, "BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/comtest.c b/FreeRTOS/Demo/Common/Minimal/comtest.c index 3295535ec..9c283e860 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -158,14 +158,14 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vComTxTask, pvParameters ) { -signed char cByteToSend; +char cByteToSend; portTickType xTimeToWait; /* Just to stop compiler warnings. */ diff --git a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c index 11b80c478..f77196f8b 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -72,18 +72,18 @@ * See http://www.serialporttool.com/CommEcho.htm for a suitable echo server * for Windows hosts. * - * The timer sends a string to the UART, toggles an LED, then resets itself by - * changing its own period. The period is calculated as a pseudo random number + * The timer sends a string to the UART, toggles an LED, then resets itself by + * changing its own period. The period is calculated as a pseudo random number * between comTX_MAX_BLOCK_TIME and comTX_MIN_BLOCK_TIME. * - * The task blocks on an Rx queue waiting for a character to become available. - * Received characters are checked to ensure they match those transmitted by the - * Tx timer. An error is latched if characters are missing, incorrect, or + * The task blocks on an Rx queue waiting for a character to become available. + * Received characters are checked to ensure they match those transmitted by the + * Tx timer. An error is latched if characters are missing, incorrect, or * arrive too slowly. * * How characters are actually transmitted and received is port specific. Demos * that include this test/demo file will provide example drivers. The Tx timer - * executes in the context of the timer service (daemon) task, and must + * executes in the context of the timer service (daemon) task, and must * therefore never attempt to block. * */ @@ -188,8 +188,8 @@ void vStartComTestStringsTasks( unsigned portBASE_TYPE uxPriority, unsigned long /* Create the Rx task and the Tx timer. The timer is started from the Rx task. */ - xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); - xTxTimer = xTimerCreate( ( const signed char * ) "TxTimer", comTX_MIN_BLOCK_TIME, pdFALSE, NULL, prvComTxTimerCallback ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTxTimer = xTimerCreate( "TxTimer", comTX_MIN_BLOCK_TIME, pdFALSE, NULL, prvComTxTimerCallback ); configASSERT( xTxTimer ); } /*-----------------------------------------------------------*/ @@ -205,7 +205,7 @@ portTickType xTimeToWait; sample driver provided with this demo. However - as this is a timer, it executes in the context of the timer task and therefore must not block. */ - vSerialPutString( xPort, ( const signed char * const ) comTRANSACTED_STRING, xStringLength ); + vSerialPutString( xPort, comTRANSACTED_STRING, xStringLength ); /* Toggle an LED to give a visible indication that another transmission has been performed. */ @@ -233,7 +233,7 @@ portTickType xTimeToWait; static void vComRxTask( void *pvParameters ) { portBASE_TYPE xState = comtstWAITING_START_OF_STRING, xErrorOccurred = pdFALSE; -signed char *pcExpectedByte, cRxedChar; +char *pcExpectedByte, cRxedChar; const xComPortHandle xPort = NULL; /* The parameter is not used in this example. */ @@ -245,7 +245,7 @@ const xComPortHandle xPort = NULL; /* The first expected Rx character is the first in the string that is transmitted. */ - pcExpectedByte = ( signed char * ) comTRANSACTED_STRING; + pcExpectedByte = comTRANSACTED_STRING; for( ;; ) { @@ -269,9 +269,9 @@ const xComPortHandle xPort = NULL; xState = comtstWAITING_END_OF_STRING; pcExpectedByte++; - /* Block for a short period. This just allows the Rx queue + /* Block for a short period. This just allows the Rx queue to contain more than one character, and therefore prevent - thrashing reads to the queue, and repetitive context + thrashing reads to the queue, and repetitive context switches as each character is received. */ vTaskDelay( comSHORT_DELAY ); } @@ -298,7 +298,7 @@ const xComPortHandle xPort = NULL; } /* Go back to wait for the start of the next string. */ - pcExpectedByte = ( signed char * ) comTRANSACTED_STRING; + pcExpectedByte = comTRANSACTED_STRING; xState = comtstWAITING_START_OF_STRING; } else diff --git a/FreeRTOS/Demo/Common/Minimal/countsem.c b/FreeRTOS/Demo/Common/Minimal/countsem.c index d38e4f4c3..4df90a601 100644 --- a/FreeRTOS/Demo/Common/Minimal/countsem.c +++ b/FreeRTOS/Demo/Common/Minimal/countsem.c @@ -161,16 +161,16 @@ void vStartCountingSemaphoreTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 0 ].xSemaphore, ( signed portCHAR * ) "Counting_Sem_1" ); - vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 1 ].xSemaphore, ( signed portCHAR * ) "Counting_Sem_2" ); + vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" ); + vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" ); /* Were the semaphores created? */ if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) ) { /* Create the demo tasks, passing in the semaphore to use as the parameter. */ - xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvCountingSemaphoreTask, "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvCountingSemaphoreTask, "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/death.c b/FreeRTOS/Demo/Common/Minimal/death.c index d6a9110b7..ca7981a7d 100644 --- a/FreeRTOS/Demo/Common/Minimal/death.c +++ b/FreeRTOS/Demo/Common/Minimal/death.c @@ -143,7 +143,7 @@ unsigned portBASE_TYPE *puxPriority; puxPriority = ( unsigned portBASE_TYPE * ) pvPortMalloc( sizeof( unsigned portBASE_TYPE ) ); *puxPriority = uxPriority; - xTaskCreate( vCreateTasks, ( signed char * ) "CREATOR", deathSTACK_SIZE, ( void * ) puxPriority, uxPriority, NULL ); + xTaskCreate( vCreateTasks, "CREATOR", deathSTACK_SIZE, ( void * ) puxPriority, uxPriority, NULL ); /* Record the number of tasks that are running now so we know if any of the suicidal tasks have failed to be killed. */ @@ -221,8 +221,8 @@ unsigned portBASE_TYPE uxPriority; xCreatedTask = NULL; - xTaskCreate( vSuicidalTask, ( signed char * ) "SUICID1", configMINIMAL_STACK_SIZE, NULL, uxPriority, &xCreatedTask ); - xTaskCreate( vSuicidalTask, ( signed char * ) "SUICID2", configMINIMAL_STACK_SIZE, &xCreatedTask, uxPriority, NULL ); + xTaskCreate( vSuicidalTask, "SUICID1", configMINIMAL_STACK_SIZE, NULL, uxPriority, &xCreatedTask ); + xTaskCreate( vSuicidalTask, "SUICID2", configMINIMAL_STACK_SIZE, &xCreatedTask, uxPriority, NULL ); ++usCreationCount; } diff --git a/FreeRTOS/Demo/Common/Minimal/dynamic.c b/FreeRTOS/Demo/Common/Minimal/dynamic.c index 2a900afd9..8790886d0 100644 --- a/FreeRTOS/Demo/Common/Minimal/dynamic.c +++ b/FreeRTOS/Demo/Common/Minimal/dynamic.c @@ -191,13 +191,13 @@ void vStartDynamicPriorityTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( xSuspendedTestQueue, ( signed char * ) "Suspended_Test_Queue" ); + vQueueAddToRegistry( xSuspendedTestQueue, "Suspended_Test_Queue" ); - xTaskCreate( vContinuousIncrementTask, ( signed char * ) "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle ); - xTaskCreate( vLimitedIncrementTask, ( signed char * ) "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); - xTaskCreate( vCounterControlTask, ( signed char * ) "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vQueueSendWhenSuspendedTask, ( signed char * ) "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vQueueReceiveWhenSuspendedTask, ( signed char * ) "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vContinuousIncrementTask, "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle ); + xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); + xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vQueueSendWhenSuspendedTask, "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vQueueReceiveWhenSuspendedTask, "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/flash.c b/FreeRTOS/Demo/Common/Minimal/flash.c index fda587093..9ea5487b6 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash.c +++ b/FreeRTOS/Demo/Common/Minimal/flash.c @@ -108,7 +108,7 @@ signed portBASE_TYPE xLEDTask; for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask ) { /* Spawn the task. */ - xTaskCreate( vLEDFlashTask, ( signed char * ) "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/flash_timer.c b/FreeRTOS/Demo/Common/Minimal/flash_timer.c index a5985ff98..7bd9654f5 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash_timer.c +++ b/FreeRTOS/Demo/Common/Minimal/flash_timer.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -67,7 +67,7 @@ * Repeatedly toggles one or more LEDs using software timers - one timer per * LED. */ - + /* Scheduler include files. */ #include "FreeRTOS.h" #include "timers.h" @@ -102,13 +102,13 @@ xTimerHandle xTimer; for( uxLEDTimer = 0; uxLEDTimer < uxNumberOfLEDs; ++uxLEDTimer ) { /* Create the timer. */ - xTimer = xTimerCreate( ( const signed char * const ) "Flasher",/* A text name, purely to help debugging. */ - ledFLASH_RATE_BASE * ( uxLEDTimer + 1 ), /* The timer period, which is a multiple of ledFLASH_RATE_BASE. */ + xTimer = xTimerCreate( "Flasher", /* A text name, purely to help debugging. */ + ledFLASH_RATE_BASE * ( uxLEDTimer + 1 ),/* The timer period, which is a multiple of ledFLASH_RATE_BASE. */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) uxLEDTimer, /* The ID is used to identify the timer within the timer callback function, as each timer uses the same callback. */ prvLEDTimerCallback /* Each timer uses the same callback. */ ); - + /* If the timer was created successfully, attempt to start it. If the scheduler has not yet been started then the timer command queue must be long enough to hold each command sent to it until such time that the @@ -117,7 +117,7 @@ xTimerHandle xTimer; if( xTimer != NULL ) { xTimerStart( xTimer, ledDONT_BLOCK ); - } + } } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/flop.c b/FreeRTOS/Demo/Common/Minimal/flop.c index e45ec642b..97da2fbda 100644 --- a/FreeRTOS/Demo/Common/Minimal/flop.c +++ b/FreeRTOS/Demo/Common/Minimal/flop.c @@ -104,10 +104,10 @@ static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/integer.c b/FreeRTOS/Demo/Common/Minimal/integer.c index 76ea4237c..ca1459858 100644 --- a/FreeRTOS/Demo/Common/Minimal/integer.c +++ b/FreeRTOS/Demo/Common/Minimal/integer.c @@ -110,7 +110,7 @@ short sTask; for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ ) { - xTaskCreate( vCompeteingIntMathTask, ( signed char * ) "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vCompeteingIntMathTask, "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/recmutex.c b/FreeRTOS/Demo/Common/Minimal/recmutex.c index 760233cd6..0741248f5 100644 --- a/FreeRTOS/Demo/Common/Minimal/recmutex.c +++ b/FreeRTOS/Demo/Common/Minimal/recmutex.c @@ -153,14 +153,14 @@ void vStartRecursiveMutexTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" ); + vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" ); if( xMutex != NULL ) { - xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); - xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); - xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL ); + xTaskCreate( prvRecursiveMutexControllingTask, "Rec1", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); + xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); + xTaskCreate( prvRecursiveMutexPollingTask, "Rec3", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c index f25547f86..1033fd73a 100644 --- a/FreeRTOS/Demo/Common/Minimal/semtest.c +++ b/FreeRTOS/Demo/Common/Minimal/semtest.c @@ -150,8 +150,8 @@ const portTickType xBlockTime = ( portTickType ) 100; pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0; /* Spawn the first two tasks. As they poll they operate at the idle priority. */ - xTaskCreate( prvSemaphoreTest, ( signed char * ) "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, ( signed char * ) "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); } } @@ -169,8 +169,8 @@ const portTickType xBlockTime = ( portTickType ) 100; *( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE; pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS; - xTaskCreate( prvSemaphoreTest, ( signed char * ) "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, ( signed char * ) "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); } } @@ -180,8 +180,8 @@ const portTickType xBlockTime = ( portTickType ) 100; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, ( signed char * ) "Counting_Sem_1" ); - vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, ( signed char * ) "Counting_Sem_2" ); + vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" ); + vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/sp_flop.c b/FreeRTOS/Demo/Common/Minimal/sp_flop.c index 75453443e..321086fa5 100644 --- a/FreeRTOS/Demo/Common/Minimal/sp_flop.c +++ b/FreeRTOS/Demo/Common/Minimal/sp_flop.c @@ -105,14 +105,14 @@ static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, NULL ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, NULL ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c index b6f02b1aa..36e612f08 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c @@ -501,7 +501,7 @@ const unsigned char ucMACAddress[6] = #endif /* Create the task that handles the EMAC. */ - xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask ); + xTaskCreate( ethernetif_input, "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask ); fec_irq_enable(); MCF_FEC_ECR = MCF_FEC_ECR_ETHER_EN; diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c index 54210efb6..7097b3307 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c @@ -131,7 +131,7 @@ sys_arch_unprotect( sys_prot_t pval ) */ void sys_assert( const char *msg ) -{ +{ /*FSL:only needed for debugging printf(msg); printf("\n\r"); @@ -204,7 +204,7 @@ sys_thread_new(char *name, void ( *thread ) ( void *arg ), void *arg, int /*size THREAD_INIT( p ); /* Now q points to a free element in the list. */ - if( xTaskCreate( thread, (const signed char *const)name, stacksize, arg, prio, &p->pid ) == pdPASS ) + if( xTaskCreate( thread, name, stacksize, arg, prio, &p->pid ) == pdPASS ) { thread_hdl = p; } @@ -257,7 +257,7 @@ sys_arch_thread_remove( sys_thread_t hdl ) vPortFree( toremove ); } } - /* We are done with accessing the shared datastructure. Release the + /* We are done with accessing the shared datastructure. Release the * resources. */ vPortExitCritical( ); @@ -489,7 +489,7 @@ sys_mbox_post( sys_mbox_t mbox, void *data ) } /*FSL*/ -/* +/* *Try to post the "msg" to the mailbox. Returns ERR_MEM if this one *is full, else, ERR_OK if the "msg" is posted. */ diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c index 1ff37d44e..bd7ff38fb 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c @@ -55,9 +55,9 @@ static u16_t s_nextthread = 0; sys_mbox_t sys_mbox_new(int size) { xQueueHandle mbox; - + ( void ) size; - + mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) ); #if SYS_STATS @@ -85,7 +85,7 @@ void sys_mbox_free(sys_mbox_t mbox) #if SYS_STATS lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ - + // TODO notify the user of failure. } @@ -117,11 +117,11 @@ err_t result; else { // could not post, queue must be full result = ERR_MEM; - + #if SYS_STATS lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ - + } return result; @@ -154,20 +154,20 @@ portTickType StartTime, EndTime, Elapsed; { msg = &dummyptr; } - + if ( timeout != 0 ) { if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_RATE_MS ) ) { EndTime = xTaskGetTickCount(); Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - + return ( Elapsed ); } else // timed out blocking for message { *msg = NULL; - + return SYS_ARCH_TIMEOUT; } } @@ -176,8 +176,8 @@ portTickType StartTime, EndTime, Elapsed; while( pdTRUE != xQueueReceive( mbox, &(*msg), portMAX_DELAY ) ){} // time is arbitrary EndTime = xTaskGetTickCount(); Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - - return ( Elapsed ); // return time blocked TODO test + + return ( Elapsed ); // return time blocked TODO test } } @@ -213,17 +213,17 @@ sys_sem_t sys_sem_new(u8_t count) xSemaphoreHandle xSemaphore; vSemaphoreCreateBinary( xSemaphore ); - + if( xSemaphore == NULL ) { - + #if SYS_STATS ++lwip_stats.sys.sem.err; #endif /* SYS_STATS */ - + return SYS_SEM_NULL; // TODO need assert } - + if(count == 0) // Means it can't be taken { xSemaphoreTake(xSemaphore,1); @@ -235,7 +235,7 @@ sys_sem_t sys_sem_new(u8_t count) lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; } #endif /* SYS_STATS */ - + return xSemaphore; } @@ -267,8 +267,8 @@ portTickType StartTime, EndTime, Elapsed; { EndTime = xTaskGetTickCount(); Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - - return (Elapsed); // return time blocked TODO test + + return (Elapsed); // return time blocked TODO test } else { @@ -281,8 +281,8 @@ portTickType StartTime, EndTime, Elapsed; EndTime = xTaskGetTickCount(); Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - return ( Elapsed ); // return time blocked - + return ( Elapsed ); // return time blocked + } } @@ -300,7 +300,7 @@ void sys_sem_free(sys_sem_t sem) #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ - + vQueueDelete( sem ); } @@ -372,7 +372,7 @@ int result; if ( s_nextthread < SYS_THREAD_MAX ) { - result = xTaskCreate( thread, ( signed portCHAR * ) name, stacksize, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, name, stacksize, arg, prio, &CreatedTask ); // For each task created, store the task handle (pid) in the timers array. // This scheme doesn't allow for threads to be deleted @@ -428,7 +428,7 @@ void sys_arch_unprotect(sys_prot_t pval) * Prints an assertion messages and aborts execution. */ void sys_assert( const char *msg ) -{ +{ ( void ) msg; /*FSL:only needed for debugging printf(msg); diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c index 1b58aac4e..5d1328fa3 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c @@ -134,7 +134,7 @@ static void low_level_init(struct netif *netif) netif->flags |= NETIF_FLAG_LINK_UP; /* Create the task that handles the EMAC. */ - xTaskCreate( ethernetif_input, ( signed portCHAR * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, (void *)netif, netifINTERFACE_TASK_PRIORITY, NULL ); + xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, (void *)netif, netifINTERFACE_TASK_PRIORITY, NULL ); } diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c index c65e1f82b..8e07c13f0 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c @@ -393,16 +393,16 @@ err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); - if( *pxMutex != NULL ) + if( *pxMutex != NULL ) { xReturn = ERR_OK; SYS_STATS_INC_USED( mutex ); - } - else + } + else { SYS_STATS_INC( mutex.err ); } - + return xReturn; } @@ -505,7 +505,7 @@ xTaskHandle xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; - xResult = xTaskCreate( pxThread, ( signed char * ) pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); + xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); if( xResult == pdPASS ) { diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c index 6714cc35b..99ff96106 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c @@ -327,7 +327,7 @@ unsigned long ulNetMask; /* Create a task that simulates an interrupt in a real system. This will block waiting for packets, then send a message to the uIP task when data is available. */ - xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL ); + xTaskCreate( prvInterruptSimulator, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c index dd136c0e2..8ba261e49 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c @@ -648,6 +648,6 @@ unsigned long ulNetMask; /* Create a task that simulates an interrupt in a real system. This will block waiting for packets, then send a message to the uIP task when data is available. */ - xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL ); + xTaskCreate( prvInterruptSimulator, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL ); } diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c index bf4080039..904ffc8a9 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c @@ -143,7 +143,7 @@ err_t xReturn; xReturn = ERR_OK; } else - { + { /* The queue was already full. */ xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); @@ -199,7 +199,7 @@ unsigned long ulReturn; ulReturn = xElapsed; } - else + else { /* Timed out. */ *ppvBuffer = NULL; @@ -359,22 +359,22 @@ unsigned long ulReturn; /** Create a new mutex * @param mutex pointer to the mutex to create * @return a new mutex */ -err_t sys_mutex_new( sys_mutex_t *pxMutex ) +err_t sys_mutex_new( sys_mutex_t *pxMutex ) { err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); - if( *pxMutex != NULL ) + if( *pxMutex != NULL ) { xReturn = ERR_OK; SYS_STATS_INC_USED( mutex ); - } - else + } + else { SYS_STATS_INC( mutex.err ); } - + return xReturn; } @@ -468,7 +468,7 @@ xTaskHandle xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; - xResult = xTaskCreate( pxThread, ( signed char * ) pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); + xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); if( xResult == pdPASS ) { diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/main.c b/FreeRTOS/Demo/H8S/RTOSDemo/main.c index 7ef16c98f..b553062aa 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/main.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -66,21 +66,21 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * - * Main.c also creates a task called "Check". This only executes every three - * seconds but has the highest priority so is guaranteed to get processor time. + * + * Main.c also creates a task called "Check". This only executes every three + * seconds but has the highest priority so is guaranteed to get processor time. * Its main function is to check that all the other tasks are still operational. - * Each task (other than the "flash" tasks) maintains a unique count that is - * incremented each time the task successfully completes its function. Should - * any error occur within such a task the count is permanently halted. The + * Each task (other than the "flash" tasks) maintains a unique count that is + * incremented each time the task successfully completes its function. Should + * any error occur within such a task the count is permanently halted. The * check task inspects the count of each task to ensure it has changed since - * the last time the check task executed. If all the count variables have + * the last time the check task executed. If all the count variables have * changed all the tasks are still executing error free, and the check task - * toggles the onboard LED. Should any task contain an error at any time + * toggles the onboard LED. Should any task contain an error at any time * the LED toggle rate will change from 3 seconds to 500ms. * - * To check the operation of the memory allocator the check task also - * dynamically creates a task before delaying, and deletes it again when it + * To check the operation of the memory allocator the check task also + * dynamically creates a task before delaying, and deletes it again when it * wakes. If memory cannot be allocated for the new task the call to xTaskCreate * will fail and an error is signalled. The dynamically created task itself * allocates and frees memory just to give the allocator a bit more exercise. @@ -125,7 +125,7 @@ and mainCOM_TEST_LED + 1 is toggles on each character Rx. */ /* LED that is toggled by the check task. The check task periodically checks that all the other tasks are operating without error. If no errors are found -the LED is toggled with mainCHECK_PERIOD frequency. If an error is found +the LED is toggled with mainCHECK_PERIOD frequency. If an error is found the the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainCHECK_TASK_LED ( 5 ) #define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) @@ -178,10 +178,10 @@ int main( void ) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the 'Check' task. */ - xTaskCreate( vErrorChecks, ( signed char * )"Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - /* In this port, to use preemptive scheduler define configUSE_PREEMPTION - as 1 in portmacro.h. To use the cooperative scheduler define + /* In this port, to use preemptive scheduler define configUSE_PREEMPTION + as 1 in portmacro.h. To use the cooperative scheduler define configUSE_PREEMPTION as 0. */ vTaskStartScheduler(); @@ -194,14 +194,14 @@ int main( void ) * Cycle for ever, delaying then checking all the other tasks are still * operating without error. If an error is detected then the delay period * is decreased from mainCHECK_PERIOD to mainERROR_CHECK_PERIOD so - * the on board LED flash rate will increase. + * the on board LED flash rate will increase. * * In addition to the standard tests the memory allocator is tested through - * the dynamic creation and deletion of a task each cycle. Each time the + * the dynamic creation and deletion of a task each cycle. Each time the * task is created memory must be allocated for its stack. When the task is - * deleted this memory is returned to the heap. If the task cannot be created + * deleted this memory is returned to the heap. If the task cannot be created * then it is likely that the memory allocation failed. In addition the - * dynamically created task allocates and frees memory while it runs. + * dynamically created task allocates and frees memory while it runs. */ static void vErrorChecks( void *pvParameters ) { @@ -220,28 +220,28 @@ portTickType xLastWakeTime; later that it has changed. */ ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; - /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a - parameter. */ + /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a + parameter. */ xCreatedTask = mainNO_TASK; - if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) + if( xTaskCreate( vMemCheckTask, "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { /* Could not create the task - we have probably run out of heap. */ xDelayPeriod = mainERROR_CHECK_PERIOD; } - /* Delay until it is time to execute again. The delay period is + /* Delay until it is time to execute again. The delay period is shorter following an error. */ vTaskDelayUntil( &xLastWakeTime, xDelayPeriod ); - + /* Delete the dynamically created task. */ if( xCreatedTask != mainNO_TASK ) { vTaskDelete( xCreatedTask ); } - /* Check all the standard demo application tasks are executing without + /* Check all the standard demo application tasks are executing without error. ulMemCheckTaskRunningCount is checked to ensure it was modified by the task just deleted. */ if( prvCheckOtherTasksAreStillRunning( ulMemCheckTaskRunningCount ) != pdPASS ) @@ -257,7 +257,7 @@ portTickType xLastWakeTime; /* * Check each set of tasks in turn to see if they have experienced any - * error conditions. + * error conditions. */ static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ) { @@ -319,10 +319,10 @@ static long lErrorOccurred = pdFALSE; vErrorChecks task to check the operation of the memory allocator. Each time the task is created memory is allocated for the stack and TCB. Each time the task is deleted this memory is returned to the heap. This task itself - exercises the allocator by allocating and freeing blocks. - - The task executes at the idle priority so does not require a delay. - + exercises the allocator by allocating and freeing blocks. + + The task executes at the idle priority so does not require a delay. + pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the vErrorChecks() task that this task is still executing without error. */ @@ -337,12 +337,12 @@ static long lErrorOccurred = pdFALSE; } else { - /* Reset the count so an error is detected by the + /* Reset the count so an error is detected by the prvCheckOtherTasksAreStillRunning() function. */ *pulMemCheckTaskRunningCounter = mainCOUNT_INITIAL_VALUE; } - /* Allocate some memory - just to give the allocator some extra + /* Allocate some memory - just to give the allocator some extra exercise. This has to be in a critical section to ensure the task does not get deleted while it has memory allocated. */ vTaskSuspendAll(); diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c index 3fe943c93..802c9c53b 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -67,19 +67,19 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * + * * In addition to the standard demo tasks, the follow demo specific tasks are * create: * - * The "Check" task. This only executes every three seconds but has the highest - * priority so is guaranteed to get processor time. Its main function is to - * check that all the other tasks are still operational. Most tasks maintain - * a unique count that is incremented each time the task successfully completes - * its function. Should any error occur within such a task the count is - * permanently halted. The check task inspects the count of each task to ensure - * it has changed since the last time the check task executed. If all the count - * variables have changed all the tasks are still executing error free, and the - * check task toggles the onboard LED. Should any task contain an error at any time + * The "Check" task. This only executes every three seconds but has the highest + * priority so is guaranteed to get processor time. Its main function is to + * check that all the other tasks are still operational. Most tasks maintain + * a unique count that is incremented each time the task successfully completes + * its function. Should any error occur within such a task the count is + * permanently halted. The check task inspects the count of each task to ensure + * it has changed since the last time the check task executed. If all the count + * variables have changed all the tasks are still executing error free, and the + * check task toggles the onboard LED. Should any task contain an error at any time * the LED toggle rate will change from 3 seconds to 500ms. * * The "Register Check" tasks. These tasks fill the CPU registers with known @@ -88,7 +88,7 @@ * context switch mechanism. The register check tasks operate at low priority * so are switched in and out frequently. * - * The "Trace Utility" task. This can be used to obtain trace and debug + * The "Trace Utility" task. This can be used to obtain trace and debug * information via UART5. */ @@ -117,7 +117,7 @@ #include "taskutility.h" #include "partest.h" #include "crflash.h" - + /* Demo task priorities. */ #define mainWATCHDOG_TASK_PRIORITY ( tskIDLE_PRIORITY + 5 ) #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 ) @@ -132,10 +132,10 @@ /* Baud rate used by the COM test tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 ) -/* The frequency at which the 'Check' tasks executes. See the comments at the +/* The frequency at which the 'Check' tasks executes. See the comments at the top of the page. When the system is operating error free the 'Check' task toggles an LED every three seconds. If an error is discovered in any task the -rate is increased to 500 milliseconds. [in this case the '*' characters on the +rate is increased to 500 milliseconds. [in this case the '*' characters on the LCD represent LEDs]*/ #define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) #define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) @@ -157,10 +157,10 @@ LCD represent LEDs]*/ /*---------------------------------------------------------------------------*/ -/* +/* * The function that implements the Check task. See the comments at the head * of the page for implementation details. - */ + */ static void prvErrorChecks( void *pvParameters ); /* @@ -169,8 +169,8 @@ static void prvErrorChecks( void *pvParameters ); */ static portSHORT prvCheckOtherTasksAreStillRunning( void ); -/* - * Setup the microcontroller as used by this demo. +/* + * Setup the microcontroller as used by this demo. */ static void prvSetupHardware( void ); @@ -185,7 +185,7 @@ static void vSecondRegisterTestTask( void *pvParameters ); /*---------------------------------------------------------------------------*/ -/* The variable that is set to true should an error be found in one of the +/* The variable that is set to true should an error be found in one of the register test tasks. */ unsigned portLONG ulRegTestError = pdFALSE; @@ -194,48 +194,48 @@ unsigned portLONG ulRegTestError = pdFALSE; /* Start all the demo application tasks, then start the scheduler. */ void main(void) { - /* Initialise the hardware ready for the demo. */ + /* Initialise the hardware ready for the demo. */ prvSetupHardware(); /* Start the standard demo application tasks. */ - vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); + vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); - vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); - vStartDynamicPriorityTasks(); - vStartMathTasks( tskIDLE_PRIORITY ); + vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); + vStartDynamicPriorityTasks(); + vStartMathTasks( tskIDLE_PRIORITY ); vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY ); vStartQueuePeekTasks(); vCreateBlockTimeTasks(); vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES ); /* Start the 'Check' task which is defined in this file. */ - xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the 'Register Test' tasks as described at the top of this file. */ - xTaskCreate( vFirstRegisterTestTask, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vSecondRegisterTestTask, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vFirstRegisterTestTask, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vSecondRegisterTestTask, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - /* Start the task that write trace information to the UART. */ + /* Start the task that write trace information to the UART. */ vUtilityStartTraceTask( mainUTILITY_TASK_PRIORITY ); /* If we are going to service the watchdog from within a task, then create - the task here. */ - #if WATCHDOG == WTC_IN_TASK + the task here. */ + #if WATCHDOG == WTC_IN_TASK vStartWatchdogTask( mainWATCHDOG_TASK_PRIORITY ); - #endif - + #endif + /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run time the number of tasks that exists is within expected bounds. */ vCreateSuicidalTasks( mainDEATH_PRIORITY ); /* Now start the scheduler. Following this call the created tasks should - be executing. */ + be executing. */ vTaskStartScheduler( ); - - /* vTaskStartScheduler() will only return if an error occurs while the + + /* vTaskStartScheduler() will only return if an error occurs while the idle task is being created. */ for( ;; ); } @@ -254,7 +254,7 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; for( ;; ) { /* Wait until it is time to check again. The time we wait here depends - on whether an error has been detected or not. When an error is + on whether an error has been detected or not. When an error is detected the time is shortened resulting in a faster LED flash rate. */ /* Perform this check every mainCHECK_DELAY milliseconds. */ vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod ); @@ -262,7 +262,7 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; /* See if the other tasks are all ok. */ if( prvCheckOtherTasksAreStillRunning() != pdPASS ) { - /* An error occurred in one of the tasks so shorten the delay + /* An error occurred in one of the tasks so shorten the delay period - which has the effect of increasing the frequency of the LED toggle. */ xDelayPeriod = mainERROR_CHECK_DELAY; @@ -279,7 +279,7 @@ static portSHORT prvCheckOtherTasksAreStillRunning( void ) portBASE_TYPE lReturn = pdPASS; /* The demo tasks maintain a count that increments every cycle of the task - provided that the task has never encountered an error. This function + provided that the task has never encountered an error. This function checks the counts maintained by the tasks to ensure they are still being incremented. A count remaining at the same value between calls therefore indicates that an error has been detected. */ @@ -293,42 +293,42 @@ portBASE_TYPE lReturn = pdPASS; { lReturn = pdFAIL; } - + if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if( xAreMathsTaskStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if( xIsCreateTaskStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if ( xAreGenericQueueTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } - + if ( xAreQueuePeekTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; @@ -356,7 +356,7 @@ static void prvSetupHardware( void ) vParTestInitialise(); /* If we are going to use the watchdog, then initialise it now. */ - #if WATCHDOG != WTC_NONE + #if WATCHDOG != WTC_NONE InitWatchdog(); #endif } @@ -429,7 +429,7 @@ extern volatile unsigned portLONG ulCriticalNesting; LDI #0xbbbbbbbb, R10 LDI #0xcccccccc, R11 LDI #0xdddddddd, R12 - + ;Check each register still contains the expected value. LDI #0x11111111, R13 CMP R13, R0 @@ -488,7 +488,7 @@ extern volatile unsigned portLONG ulCriticalNesting; First_Set_Error: ; Latch that an error has occurred. - LDI #_ulRegTestError, R0 + LDI #_ulRegTestError, R0 LDI #0x00000001, R1 ST R1, @R0 @@ -529,7 +529,7 @@ extern volatile unsigned portLONG ulCriticalNesting; LDI #0xbbbbbbbb, R11 LDI #0xcccccccc, R12 LDI #0xdddddddd, R0 - + ;Check each register still contains the expected value. LDI #0x11111111, R13 CMP R13, R1 @@ -592,7 +592,7 @@ extern volatile unsigned portLONG ulCriticalNesting; Second_Set_Error: ; Latch that an error has occurred. - LDI #_ulRegTestError, R0 + LDI #_ulRegTestError, R0 LDI #0x00000001, R1 ST R1, @R0 diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c b/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c index 0d4622631..9844ee40c 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c @@ -4,7 +4,7 @@ /* (C) Fujitsu Microelectronics Europe GmbH */ /*------------------------------------------------------------------------ taskutility.C - - + - -------------------------------------------------------------------------*/ #include "mb91467d.h" #include "vectors.h" @@ -133,7 +133,7 @@ void vUtilityStartTraceTask( unsigned portBASE_TYPE uxPriority ) vInitUart5(); portENTER_CRITICAL(); - xTaskCreate( vUART5Task, (signed portCHAR *) "UART5", configMINIMAL_STACK_SIZE * 2, ( void * ) NULL, uxPriority, NULL ); + xTaskCreate( vUART5Task, "UART5", configMINIMAL_STACK_SIZE * 2, ( void * ) NULL, uxPriority, NULL ); } } @@ -163,7 +163,7 @@ static void vUART5Task( void *pvParameters ) switch( ch ) { case '1': - vTaskList( (signed char *) buff ); + vTaskList( buff ); Puts5( "\n\rThe current task list is as follows...." ); Puts5( "\n\r----------------------------------------------" ); Puts5( "\n\rName State Priority Stack Number" ); diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c b/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c index e75d80bf8..7660b4205 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c @@ -14,7 +14,7 @@ /*--------------------------------------------------------------------------- * Setup Watchdog - *---------------------------------------------------------------------------*/ + *---------------------------------------------------------------------------*/ #if WATCHDOG != WTC_NONE void InitWatchdog(void) { @@ -25,32 +25,32 @@ void InitWatchdog(void) /*--------------------------------------------------------------------------- * The below task clears the watchdog and blocks itself for WTC_CLR_PER ticks. *---------------------------------------------------------------------------*/ -#if WATCHDOG == WTC_IN_TASK +#if WATCHDOG == WTC_IN_TASK static void prvWatchdogTask ( void *pvParameters ) { const portTickType xFrequency = WTC_CLR_PER; portTickType xLastWakeTime; - /* Get currrent tick count */ + /* Get currrent tick count */ xLastWakeTime = xTaskGetTickCount(); - + for( ; ; ) { Kick_Watchdog(); - - /* Block the task for WTC_CLR_PER ticks (300 ms) at watchdog overflow - period of WTC_PER_2_16 CLKRC cycles (655.36 ms) */ + + /* Block the task for WTC_CLR_PER ticks (300 ms) at watchdog overflow + period of WTC_PER_2_16 CLKRC cycles (655.36 ms) */ vTaskDelayUntil( &xLastWakeTime, xFrequency ); - } + } } #endif /*--------------------------------------------------------------------------- * The below function creates hardware watchdog task. - *---------------------------------------------------------------------------*/ -#if WATCHDOG == WTC_IN_TASK + *---------------------------------------------------------------------------*/ +#if WATCHDOG == WTC_IN_TASK void vStartWatchdogTask( unsigned portSHORT uxPriority ) { - xTaskCreate( prvWatchdogTask , ( signed portCHAR * ) "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); } #endif diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c index 171f0460d..440ffb1b2 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -66,22 +66,22 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * + * * In addition to the standard demo tasks, the follow demo specific tasks are * create: * - * The "Check" task. This only executes every three seconds but has the highest - * priority so is guaranteed to get processor time. Its main function is to - * check that all the other tasks are still operational. Most tasks maintain - * a unique count that is incremented each time the task successfully completes - * its function. Should any error occur within such a task the count is - * permanently halted. The check task inspects the count of each task to ensure - * it has changed since the last time the check task executed. If all the count - * variables have changed all the tasks are still executing error free, and the - * check task toggles the onboard LED. Should any task contain an error at any time + * The "Check" task. This only executes every three seconds but has the highest + * priority so is guaranteed to get processor time. Its main function is to + * check that all the other tasks are still operational. Most tasks maintain + * a unique count that is incremented each time the task successfully completes + * its function. Should any error occur within such a task the count is + * permanently halted. The check task inspects the count of each task to ensure + * it has changed since the last time the check task executed. If all the count + * variables have changed all the tasks are still executing error free, and the + * check task toggles the onboard LED. Should any task contain an error at any time * the LED toggle rate will change from 3 seconds to 500ms. * - * The "Trace Utility" task. This can be used to obtain trace and debug + * The "Trace Utility" task. This can be used to obtain trace and debug * information via UART1. */ @@ -129,10 +129,10 @@ /* Baud rate used by the COM test tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 ) -/* The frequency at which the 'Check' tasks executes. See the comments at the +/* The frequency at which the 'Check' tasks executes. See the comments at the top of the page. When the system is operating error free the 'Check' task toggles an LED every three seconds. If an error is discovered in any task the -rate is increased to 500 milliseconds. [in this case the '*' characters on the +rate is increased to 500 milliseconds. [in this case the '*' characters on the LCD represent LED's] */ #define mainNO_ERROR_CHECK_DELAY ( (portTickType) 3000 / portTICK_RATE_MS ) #define mainERROR_CHECK_DELAY ( (portTickType) 500 / portTICK_RATE_MS ) @@ -144,7 +144,7 @@ LCD represent LED's] */ /*-----------------------------------------------------------*/ -/* +/* * The function that implements the Check task. See the comments at the head * of the page for implementation details. */ @@ -176,7 +176,7 @@ void main( void ) /* Start the standard demo application tasks. */ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); - vStartIntegerMathTasks( tskIDLE_PRIORITY ); + vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY ); @@ -193,7 +193,7 @@ void main( void ) #endif /* Start the 'Check' task which is defined in this file. */ - xTaskCreate( vErrorChecks, (signed char *) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run @@ -201,10 +201,10 @@ void main( void ) vCreateSuicidalTasks( mainDEATH_PRIORITY ); /* Now start the scheduler. Following this call the created tasks should - be executing. */ + be executing. */ vTaskStartScheduler( ); - - /* vTaskStartScheduler() will only return if an error occurs while the + + /* vTaskStartScheduler() will only return if an error occurs while the idle task is being created. */ for( ;; ); } @@ -234,14 +234,14 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY; for( ;; ) { /* Wait until it is time to check again. The time we wait here depends - on whether an error has been detected or not. When an error is + on whether an error has been detected or not. When an error is detected the time is shortened resulting in a faster LED flash rate. */ vTaskDelay( xDelayPeriod ); /* See if the other tasks are all ok. */ if( prvCheckOtherTasksAreStillRunning() != pdPASS ) { - /* An error occurred in one of the tasks so shorten the delay + /* An error occurred in one of the tasks so shorten the delay period - which has the effect of increasing the frequency of the LED toggle. */ xDelayPeriod = mainERROR_CHECK_DELAY; @@ -258,7 +258,7 @@ static short prvCheckOtherTasksAreStillRunning( void ) static short sNoErrorFound = pdTRUE; /* The demo tasks maintain a count that increments every cycle of the task - provided that the task has never encountered an error. This function + provided that the task has never encountered an error. This function checks the counts maintained by the tasks to ensure they are still being incremented. A count remaining at the same value between calls therefore indicates that an error has been detected. Only tasks that do not flash diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c index fe10964c9..c37b8b87e 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c @@ -8,7 +8,7 @@ /*------------------------------------------------------------------------ taskutility.C - - + - -------------------------------------------------------------------------*/ /*************************@INCLUDE_START************************/ @@ -138,7 +138,7 @@ void vUtilityStartTraceTask( unsigned portBASE_TYPE uxPriority ) portENTER_CRITICAL(); InitUart0(); portENTER_CRITICAL(); - xTaskCreate( vUART0Task, (signed portCHAR *) "UART1", configMINIMAL_STACK_SIZE * 3, ( void * ) NULL, uxPriority, &UART_TaskHandle ); + xTaskCreate( vUART0Task, "UART1", configMINIMAL_STACK_SIZE * 3, ( void * ) NULL, uxPriority, &UART_TaskHandle ); } } @@ -171,7 +171,7 @@ static void vUART0Task( void *pvParameters ) switch( ch ) { case '1': - vTaskList( (signed char *) buff ); + vTaskList( buff ); Puts0( "\n\rThe current task list is as follows...." ); Puts0( "\n\r----------------------------------------------" ); Puts0( "\n\rName State Priority Stack Number" ); diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c index 84d5f730f..b65f376cc 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c @@ -58,7 +58,7 @@ static void prvWatchdogTask( void *pvParameters ) #if WATCHDOG == WTC_IN_TASK void vStartWatchdogTask( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( prvWatchdogTask, (signed portCHAR *) "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvWatchdogTask, "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); } #endif diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c index 16717c6a9..b01118a08 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -126,12 +126,12 @@ signed short sLEDTask; for( sLEDTask = 0; sLEDTask < ledNUM_OF_LED_TASKS; ++sLEDTask ) { /* Spawn the task. */ - xTaskCreate( vLEDFlashTask, ( signed char * ) "LEDt", configMINIMAL_STACK_SIZE, ( void * ) sLEDTask, ( tskIDLE_PRIORITY + 1 ), &( xFlashTaskHandles[ sLEDTask ] ) ); + xTaskCreate( vLEDFlashTask, "LEDt", configMINIMAL_STACK_SIZE, ( void * ) sLEDTask, ( tskIDLE_PRIORITY + 1 ), &( xFlashTaskHandles[ sLEDTask ] ) ); } /* Create the task in which the co-routines run. The co-routines themselves are created within the task. */ - xTaskCreate( vLEDCoRoutineControlTask, ( signed char * ) "LEDc", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCoroutineTask ); + xTaskCreate( vLEDCoRoutineControlTask, "LEDc", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCoroutineTask ); } /*-----------------------------------------------------------*/ @@ -190,7 +190,7 @@ unsigned short usLED; delay is only half the total period. */ xFlashRate /= ( portTickType ) 2; - /* We need to initialise xLastFlashTime prior to the first call to + /* We need to initialise xLastFlashTime prior to the first call to vTaskDelayUntil(). */ xLastFlashTime = xTaskGetTickCount(); diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c index 7be5228f3..9624f2c64 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -67,26 +67,26 @@ /***** * * See http://www.freertos.org/Documentation/FreeRTOS-documentation-and-book.html - * for an introductory guide to using real time kernels, and FreeRTOS in - * particular. + * for an introductory guide to using real time kernels, and FreeRTOS in + * particular. * ***** - * + * * The DICE-KIT-16FX has two 7 segment displays and two buttons that can * generate interrupts. This example uses this IO as follows: * * - * - Left 7 segment display - + * - Left 7 segment display - * - * 7 'flash' tasks are created, each of which toggles a single segment of the - * left display. Each task executes at a fixed frequency, with a different + * 7 'flash' tasks are created, each of which toggles a single segment of the + * left display. Each task executes at a fixed frequency, with a different * frequency being used by each task. * * When button SW2 is pressed an interrupt is generated that wakes up a 'dice' * task. The dice task suspends the 7 tasks that are accessing the left display * before simulating a dice being thrown by generating a random number between * 1 and 6. After the number has been generated the task sleeps for 5 seconds, - * if SW2 is pressed again within the 5 seconds another random number is + * if SW2 is pressed again within the 5 seconds another random number is * generated, if SW2 is not pressed within the 5 seconds then the 7 tasks are * un-suspended and will once again toggle the segments of the left hand display. * @@ -103,12 +103,12 @@ * Only one dice task is actually defined. Two instances of this single * definition are created, the first to simulate a dice being thrown on the left * display, and the other to simulate a dice being thrown on the right display. - * The task parameter is used to let the dice tasks know which display to + * The task parameter is used to let the dice tasks know which display to * control. * * Both dice tasks and the flash tasks operate completely independently under * the control of FreeRTOS. 11 tasks and 7 co-routines are created in total, - * including the idle task. + * including the idle task. * * The co-routines all execute within a single low priority task. * @@ -160,10 +160,10 @@ void main( void ) vCreateFlashTasksAndCoRoutines(); /* Create a 'dice' task to control the left hand display. */ - xTaskCreate( vDiceTask, ( signed char * ) "Dice1", configMINIMAL_STACK_SIZE, ( void * ) configLEFT_DISPLAY, mainDICE_PRIORITY, NULL ); + xTaskCreate( vDiceTask, "Dice1", configMINIMAL_STACK_SIZE, ( void * ) configLEFT_DISPLAY, mainDICE_PRIORITY, NULL ); /* Create a 'dice' task to control the right hand display. */ - xTaskCreate( vDiceTask, ( signed char * ) "Dice2", configMINIMAL_STACK_SIZE, ( void * ) configRIGHT_DISPLAY, mainDICE_PRIORITY, NULL ); + xTaskCreate( vDiceTask, "Dice2", configMINIMAL_STACK_SIZE, ( void * ) configRIGHT_DISPLAY, mainDICE_PRIORITY, NULL ); /* Start the scheduler running. */ vTaskStartScheduler(); @@ -181,7 +181,7 @@ static void prvSetupHardware( void ) scheduler has been started. */ InitIrqLevels(); portDISABLE_INTERRUPTS(); - __set_il( 7 ); + __set_il( 7 ); /* Set Port3 as output (7Segment Display). */ DDR03 = 0xff; @@ -210,7 +210,7 @@ static void prvSetupHardware( void ) /* Enable external interrupt 8. */ PIER00_IE0 = 1; - + /* LB0, LA0 = 11 -> falling edge. */ ELVRL1_LB8 = 1; ELVRL1_LA8 = 1; @@ -221,13 +221,13 @@ static void prvSetupHardware( void ) /* Enable external interrupt 9. */ PIER00_IE1 = 1; - + /* LB1, LA1 = 11 -> falling edge. */ ELVRL1_LB9 = 1; ELVRL1_LA9 = 1; /* Reset and enable the interrupt request. */ EIRR1_ER9 = 0; - ENIR1_EN9 = 1; + ENIR1_EN9 = 1; } diff --git a/FreeRTOS/Demo/MCF5235_GCC/demo.c b/FreeRTOS/Demo/MCF5235_GCC/demo.c index e4c4f8695..0e0066cae 100644 --- a/FreeRTOS/Demo/MCF5235_GCC/demo.c +++ b/FreeRTOS/Demo/MCF5235_GCC/demo.c @@ -41,13 +41,13 @@ Please ensure to read the configuration and relevant port sections of the online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and + http://www.FreeRTOS.org - Documentation, latest information, license and contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety + http://www.SafeRTOS.com - A version that is certified for use in safety critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, + http://www.OpenRTOS.com - Commercial support, development, porting, licensing and training services. */ @@ -122,7 +122,7 @@ main( int argc, char *argv[] ) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * )"Check", 512, NULL, + xTaskCreate( vErrorChecks, "Check", 512, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. */ @@ -151,7 +151,7 @@ portTASK_FUNCTION( vErrorChecks, pvParameters ) xCreatedTask = mainNO_TASK; if( xTaskCreate - ( vMemCheckTask, ( signed char * )"MEM_CHECK", + ( vMemCheckTask, "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * )&ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c index 40122b74c..77f32ef24 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c @@ -296,17 +296,17 @@ void main( void ) /* Create the LCD, button poll and register test tasks, as described at the top of this file. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, mainTASK_PARAMETER_CHECK_VALUE, mainLCD_TASK_PRIORITY, NULL ); - xTaskCreate( prvButtonPollTask, ( signed char * ) "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); + xTaskCreate( prvLCDTask, "LCD", configMINIMAL_STACK_SIZE * 2, mainTASK_PARAMETER_CHECK_VALUE, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( prvButtonPollTask, "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); /* Create the 'check' timer - the timer that periodically calls the check function as described at the top of this file. Note that, for the reasons stated in the comments above the call to vStartTimerDemoTask(), that the check timer is not actually started until after the scheduler has been started. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "Check timer", mainCHECK_TIMER_PERIOD, pdTRUE, ( void * ) 0, vCheckTimerCallback ); + xCheckTimer = xTimerCreate( "Check timer", mainCHECK_TIMER_PERIOD, pdTRUE, ( void * ) 0, vCheckTimerCallback ); /* Start the scheduler. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c index db025bebe..e7062c689 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -251,9 +251,9 @@ typedef struct /*-----------------------------------------------------------*/ -/* The linker script can be used to test the FreeRTOS ports use of 20bit -addresses by locating all code in high memory. The following pragma ensures -that main remains in low memory when that is done. The ISR_CODE segment is used +/* The linker script can be used to test the FreeRTOS ports use of 20bit +addresses by locating all code in high memory. The following pragma ensures +that main remains in low memory when that is done. The ISR_CODE segment is used for convenience as ISR functions are always placed in low memory. */ #pragma location="ISR_CODE" void main( void ) @@ -278,22 +278,22 @@ void main( void ) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartDynamicPriorityTasks(); vStartGenericQueueTasks( mainGENERIC_QUEUE_TEST_PRIORITY ); - + /* Create the LCD, button poll and register test tasks, as described at the top of this file. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, mainTASK_PARAMETER_CHECK_VALUE, mainLCD_TASK_PRIORITY, NULL ); - xTaskCreate( prvButtonPollTask, ( signed char * ) "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); - xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); + xTaskCreate( prvLCDTask, "LCD", configMINIMAL_STACK_SIZE * 2, mainTASK_PARAMETER_CHECK_VALUE, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( prvButtonPollTask, "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); + xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); } - + /* If all is well then this line will never be reached. If it is reached then it is likely that there was insufficient (FreeRTOS) heap memory space to create the idle task. This may have been trapped by the malloc() failed - hook function, if one is configured. */ + hook function, if one is configured. */ for( ;; ); } /*-----------------------------------------------------------*/ @@ -313,19 +313,19 @@ unsigned char ucLine = 1; /* This function is the only function that uses printf(). If printf() is used from any other function then some sort of mutual exclusion on stdout will be necessary. - + This is also the only function that is permitted to access the LCD. - + First print out the number of bytes that remain in the FreeRTOS heap. This can be viewed in the terminal IO window within the IAR Embedded Workbench. */ printf( "%d bytes of heap space remain unallocated\n", ( int ) xPortGetFreeHeapSize() ); - + /* Just as a test of the port, and for no functional reason, check the task parameter contains its expected value. */ if( pvParameters != mainTASK_PARAMETER_CHECK_VALUE ) { halLcdPrintLine( "Invalid parameter", ucLine, OVERWRITE_TEXT ); - ucLine++; + ucLine++; } for( ;; ) @@ -343,7 +343,7 @@ unsigned char ucLine = 1; halLcdClearScreen(); ucLine = 0; } - + /* What is this message? What does it contain? */ switch( xReceivedMessage.cMessageID ) { @@ -362,9 +362,9 @@ unsigned char ucLine = 1; the terminal IO window in the IAR embedded workbench. */ printf( "\nTask\t Abs Time\t %%Time\n*****************************************" ); - vTaskGetRunTimeStats( ( signed char * ) cBuffer ); + vTaskGetRunTimeStats( cBuffer ); printf( cBuffer ); - + /* Also print out a message to the LCD - in this case the pointer to the string to print @@ -375,7 +375,7 @@ unsigned char ucLine = 1; technique. */ sprintf( cBuffer, "%s", ( char * ) xReceivedMessage.ulMessageValue ); break; - + case mainMESSAGE_STATUS : /* The tick interrupt hook function has just informed this task of the system status. @@ -383,11 +383,11 @@ unsigned char ucLine = 1; with the status value. */ prvGenerateStatusMessage( cBuffer, xReceivedMessage.ulMessageValue ); break; - + default : sprintf( cBuffer, "Unknown message" ); break; } - + /* Output the message that was placed into the cBuffer array within the switch statement above, then move onto the next line ready for the next message to arrive on the queue. */ @@ -430,13 +430,13 @@ xQueueMessage xMessage; { /* Check the button state. */ ucState = ( halButtonsPressed() & BUTTON_UP ); - + if( ucState != 0 ) { /* The button was pressed. */ ucState = pdTRUE; } - + if( ucState != ucLastState ) { /* The state has changed, send a message to the LCD task. */ @@ -445,7 +445,7 @@ xQueueMessage xMessage; ucLastState = ucState; xQueueSend( xLCDQueue, &xMessage, portMAX_DELAY ); } - + /* Block for 10 milliseconds so this task does not utilise all the CPU time and debouncing of the button is not necessary. */ vTaskDelay( 10 / portTICK_RATE_MS ); @@ -472,7 +472,7 @@ static void prvSetupHardware( void ) halLcdInit(); halLcdSetContrast( 100 ); halLcdClearScreen(); - + halLcdPrintLine( " www.FreeRTOS.org", 0, OVERWRITE_TEXT ); } /*-----------------------------------------------------------*/ @@ -507,11 +507,11 @@ static xQueueMessage xStatusMessage = { mainMESSAGE_STATUS, pdPASS }; { xStatusMessage.ulMessageValue = mainERROR_DYNAMIC_TASKS; } - + if( xAreGenericQueueTasksStillRunning() != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_GEN_QUEUE_TEST; - } + } /* Check the reg test tasks are still cycling. They will stop incrementing their loop counters if they encounter an error. */ @@ -527,7 +527,7 @@ static xQueueMessage xStatusMessage = { mainMESSAGE_STATUS, pdPASS }; usLastRegTest1Counter = usRegTest1Counter; usLastRegTest2Counter = usRegTest2Counter; - + /* As this is the tick hook the lHigherPriorityTaskWoken parameter is not needed (a context switch is going to be performed anyway), but it must still be provided. */ @@ -564,7 +564,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; xQueueSendFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken ); P2IFG = 0; - + /* If writing to xLCDQueue caused a task to unblock, and the unblocked task has a priority equal to or above the task that this interrupt interrupted, then lHigherPriorityTaskWoken will have been set to pdTRUE internally within @@ -630,7 +630,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName { ( void ) pxTask; ( void ) pcTaskName; - + /* Run time stack overflow checking is performed if configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is called if a stack overflow is detected. */ diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c index eca7fc03f..655767dd1 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -187,15 +187,15 @@ int main( void ) /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer */ - xExampleSoftwareTimer = xTimerCreate( ( const signed char * ) "SoftwareTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vSoftwareTimerCallback /* The callback function that switches the LED off. */ + xExampleSoftwareTimer = xTimerCreate( "SoftwareTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vSoftwareTimerCallback /* The callback function that switches the LED off. */ ); /* Start the software timer. */ diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/lwIP/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/lwIP/lwIP_Apps/lwIP_Apps.c index 4588a73bc..8687d2c94 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/lwIP/lwIP_Apps/lwIP_Apps.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/lwIP/lwIP_Apps/lwIP_Apps.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -88,7 +88,7 @@ address are located at the bottom of FreeRTOSConfig.h. */ #define LWIP_PORT_INIT_NETMASK(addr) IP4_ADDR((addr), configNET_MASK0,configNET_MASK1,configNET_MASK2,configNET_MASK3) #define LWIP_MAC_ADDR_BASE { configMAC_ADDR0, configMAC_ADDR1, configMAC_ADDR2, configMAC_ADDR3, configMAC_ADDR4, configMAC_ADDR5 } -/* Definitions of the various SSI callback functions within the pccSSITags +/* Definitions of the various SSI callback functions within the pccSSITags array. If pccSSITags is updated, then these definitions must also be updated. */ #define ssiTASK_STATS_INDEX 0 #define ssiRUN_TIME_STATS_INDEX 1 @@ -101,9 +101,9 @@ static unsigned short uslwIPAppsSSIHandler( int iIndex, char *pcBuffer, int iBuf /*-----------------------------------------------------------*/ /* The SSI strings that are embedded in the served html files. If this array -is changed, then the index position defined by the #defines such as +is changed, then the index position defined by the #defines such as ssiTASK_STATS_INDEX above must also be updated. */ -static const char *pccSSITags[] = +static const char *pccSSITags[] = { "rtos_stats", "run_stats" @@ -151,15 +151,15 @@ extern char *pcMainGetTaskStatusMessage( void ); /* The SSI handler function that generates text depending on the index of the SSI tag encountered. */ - + switch( iIndex ) { case ssiTASK_STATS_INDEX : - vTaskList( ( signed char * ) pcBuffer ); + vTaskList( pcBuffer ); break; case ssiRUN_TIME_STATS_INDEX : - vTaskGetRunTimeStats( ( signed char * ) pcBuffer ); + vTaskGetRunTimeStats( pcBuffer ); break; } diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c index 5cb54eef8..352567e0e 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -71,7 +71,7 @@ * one queue, and one timer. It also demonstrates how MicroBlaze interrupts * can interact with FreeRTOS tasks/timers. * - * This simple demo project was developed and tested on the Spartan-6 SP605 + * This simple demo project was developed and tested on the Spartan-6 SP605 * development board, using the hardware configuration found in the hardware * project that is already included in the Eclipse project. * @@ -95,7 +95,7 @@ * in this file. prvQueueReceiveTask() sits in a loop that causes it to * repeatedly attempt to read data from the queue that was created within * main(). When data is received, the task checks the value of the data, and - * if the value equals the expected 100, toggles an LED. The 'block time' + * if the value equals the expected 100, toggles an LED. The 'block time' * parameter passed to the queue receive function specifies that the task * should be held in the Blocked state indefinitely to wait for data to be * available on the queue. The queue receive task will only leave the Blocked @@ -132,7 +132,7 @@ converted to ticks using the portTICK_RATE_MS constant. */ #define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) /* The number of items the queue can hold. This is 1 as the receive task -will remove items as they are added because it has the higher priority, meaning +will remove items as they are added because it has the higher priority, meaning the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) @@ -164,7 +164,7 @@ static void prvQueueSendTask( void *pvParameters ); */ static void vLEDTimerCallback( xTimerHandle xTimer ); -/* +/* * The handler executed each time a button interrupt is generated. This ensures * the LED defined by mainTIMER_CONTROLLED_LED is on, and resets the timer so * the timer will not turn the LED off for a full 5 seconds after the button @@ -200,10 +200,10 @@ static const unsigned long ulGPIOOutputChannel = 1UL, ulGPIOInputChannel = 1UL; int main( void ) { /* ************************************************************************* - This is a very simple project suitable for getting started with FreeRTOS. - If you would prefer a more complex project that demonstrates a lot more - features and tests, then select the 'Full' build configuration within the - SDK Eclipse IDE. + This is a very simple project suitable for getting started with FreeRTOS. + If you would prefer a more complex project that demonstrates a lot more + features and tests, then select the 'Full' build configuration within the + SDK Eclipse IDE. ***************************************************************************/ /* Configure the interrupt controller, LED outputs and button inputs. */ @@ -216,20 +216,20 @@ int main( void ) /* Sanity check that the queue was created. */ configASSERT( xQueue ); - /* Start the two tasks as described in the comments at the top of this + /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the software timer that is responsible for turning off the LED if the button is not pushed within 5000ms, as described at the top of this file. The timer is not actually started until a button interrupt is pushed, as it is not until that point that the LED is turned on. */ - xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ - pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - vLEDTimerCallback /* The callback function that switches the LED off. */ + xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ + ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + vLEDTimerCallback /* The callback function that switches the LED off. */ ); /* Start the tasks and timer running. */ @@ -368,7 +368,7 @@ const unsigned char ucSetToOutput = 0U; if( xStatus == XST_SUCCESS ) { - /* Install the handler defined in this task for the button input. + /* Install the handler defined in this task for the button input. *NOTE* The FreeRTOS defined xPortInstallInterruptHandler() API function must be used for this purpose. */ xStatus = xPortInstallInterruptHandler( XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR, prvButtonInputInterruptHandler, NULL ); @@ -377,7 +377,7 @@ const unsigned char ucSetToOutput = 0U; { /* Set buttons to input. */ XGpio_SetDataDirection( &xInputGPIOInstance, ulGPIOInputChannel, ~( ucSetToOutput ) ); - + /* Enable the button input interrupts in the interrupt controller. *NOTE* The vPortEnableInterrupt() API function must be used for this purpose. */ @@ -397,7 +397,7 @@ void vApplicationMallocFailedHook( void ) { /* vApplicationMallocFailedHook() will only be called if configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook - function that will get called if a call to pvPortMalloc() fails. + function that will get called if a call to pvPortMalloc() fails. pvPortMalloc() is called internally by the kernel whenever a task, queue or semaphore is created. It is also called by various parts of the demo application. If heap_1.c or heap_2.c are used, then the size of the heap @@ -417,7 +417,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName /* vApplicationStackOverflowHook() will only be called if configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2. The handle and name - of the offending task will be passed into the hook function via its + of the offending task will be passed into the hook function via its parameters. However, when a stack has overflowed, it is possible that the parameters will have been corrupted, in which case the pxCurrentTCB variable can be inspected directly. */ @@ -468,7 +468,7 @@ will run on lots of different MicroBlaze and FPGA configurations - not all of which will have the same timer peripherals defined or available. This example uses the AXI Timer 0. If that is available on your hardware platform then this example callback implementation should not require modification. The name of -the interrupt handler that should be installed is vPortTickISR(), which the +the interrupt handler that should be installed is vPortTickISR(), which the function below declares as an extern. */ void vApplicationSetupTimerInterrupt( void ) { @@ -482,7 +482,7 @@ extern void vPortTickISR( void *pvUnused ); if( xStatus == XST_SUCCESS ) { - /* Install the tick interrupt handler as the timer ISR. + /* Install the tick interrupt handler as the timer ISR. *NOTE* The xPortInstallInterruptHandler() API function must be used for this purpose. */ xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL ); @@ -518,11 +518,11 @@ extern void vPortTickISR( void *pvUnused ); /* This is an application defined callback function used to clear whichever interrupt was installed by the the vApplicationSetupTimerInterrupt() callback -function - in this case the interrupt generated by the AXI timer. It is -provided as an application callback because the kernel will run on lots of -different MicroBlaze and FPGA configurations - not all of which will have the -same timer peripherals defined or available. This example uses the AXI Timer 0. -If that is available on your hardware platform then this example callback +function - in this case the interrupt generated by the AXI timer. It is +provided as an application callback because the kernel will run on lots of +different MicroBlaze and FPGA configurations - not all of which will have the +same timer peripherals defined or available. This example uses the AXI Timer 0. +If that is available on your hardware platform then this example callback implementation should not require modification provided the example definition of vApplicationSetupTimerInterrupt() is also not modified. */ void vApplicationClearTimerInterrupt( void ) diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c index 8b8b7862d..3e9ac9ab8 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -67,17 +67,17 @@ * main-blinky.c is included when the "Blinky" build configuration is used. * main-full.c is included when the "Full" build configuration is used. * - * main-full.c creates a lot of demo and test tasks and timers, and is - * therefore very comprehensive but also complex. If you would prefer a much - * simpler project to get started with, then select the 'Blinky' build + * main-full.c creates a lot of demo and test tasks and timers, and is + * therefore very comprehensive but also complex. If you would prefer a much + * simpler project to get started with, then select the 'Blinky' build * configuration within the SDK Eclipse IDE. See the documentation page for * this demo on the http://www.FreeRTOS.org web site for more information. * **************************************************************************** * - * main() creates all the demo application tasks and timers, then starts the - * scheduler. The web documentation provides more details of the standard demo - * application tasks, which provide no particular functionality, but do provide - * a good example of how to use the FreeRTOS API. + * main() creates all the demo application tasks and timers, then starts the + * scheduler. The web documentation provides more details of the standard demo + * application tasks, which provide no particular functionality, but do provide + * a good example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are * defined and/or created within this file: @@ -89,13 +89,13 @@ * http://www.FreeRTOS.org/Free-RTOS-for-Xilinx-MicroBlaze-on-Spartan-6-FPGA.html * for details on setting up and using the embedded web server. * - * "Reg test" tasks - These test the task context switch mechanism by first + * "Reg test" tasks - These test the task context switch mechanism by first * filling the MicroBlaze registers with known values, before checking that each * register maintains the value that was written to it as the tasks are switched * in and out. The two register test tasks do not use the same values, and * execute at a very low priority, to ensure they are pre-empted regularly. * - * "Check" timer - The check timer period is initially set to five seconds. + * "Check" timer - The check timer period is initially set to five seconds. * The check timer callback function checks that all the standard demo tasks, * and the register check tasks, are not only still executing, but are executing * without reporting any errors. If the check timer discovers that a task has @@ -172,7 +172,7 @@ top of this file. */ #define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_RATE_MS ) /* The rate at which mainCHECK_LED will toggle when an error has been reported -by at least one task. See the description of the check timer in the comments at +by at least one task. See the description of the check timer in the comments at the top of this file. */ #define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_RATE_MS ) @@ -184,13 +184,13 @@ information. In this case an invalid LED number is provided as all four available LEDs (LEDs 0 to 3) are already in use. */ #define mainCOM_TEST_LED ( 4 ) -/* Baud rate used by the comtest tasks. The baud rate used is actually fixed in -UARTLite IP when the hardware was built, but the standard serial init function -required a baud rate parameter to be provided - in this case it is just +/* Baud rate used by the comtest tasks. The baud rate used is actually fixed in +UARTLite IP when the hardware was built, but the standard serial init function +required a baud rate parameter to be provided - in this case it is just ignored. */ #define mainCOM_TEST_BAUD_RATE ( XPAR_RS232_UART_1_BAUDRATE ) -/* The timer test task generates a lot of timers that all use a different +/* The timer test task generates a lot of timers that all use a different period that is a multiple of the mainTIMER_TEST_PERIOD definition. */ #define mainTIMER_TEST_PERIOD ( 20 ) @@ -205,13 +205,13 @@ extern void vRegisterTest1( void *pvParameters ); extern void vRegisterTest2( void *pvParameters ); /* - * Defines the 'check' timer functionality as described at the top of this file. + * Defines the 'check' timer functionality as described at the top of this file. * This function is the callback function associated with the 'check' timer. */ static void vCheckTimerCallback( xTimerHandle xTimer ); -/* - * Configure the interrupt controller, LED outputs and button inputs. +/* + * Configure the interrupt controller, LED outputs and button inputs. */ static void prvSetupHardware( void ); @@ -244,9 +244,9 @@ static const unsigned long ulCounterReloadValue = ( ( XPAR_AXI_TIMER_0_CLOCK_FRE int main( void ) { /*************************************************************************** - This project includes a lot of demo and test tasks and timers, and is - therefore comprehensive, but complex. If you would prefer a much simpler - project to get started with, then select the 'Blinky' build configuration + This project includes a lot of demo and test tasks and timers, and is + therefore comprehensive, but complex. If you would prefer a much simpler + project to get started with, then select the 'Blinky' build configuration within the SDK Eclipse IDE. ***************************************************************************/ @@ -258,8 +258,8 @@ int main( void ) /* Start the reg test tasks, as described in the comments at the top of this file. */ - xTaskCreate( vRegisterTest1, ( const signed char * const ) "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) 0, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegisterTest2, ( const signed char * const ) "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) 0, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegisterTest1, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) 0, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegisterTest2, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) 0, tskIDLE_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); @@ -284,25 +284,25 @@ int main( void ) vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* The suicide tasks must be created last as they need to know how many - tasks were running prior to their creation. This then allows them to - ascertain whether or not the correct/expected number of tasks are running at + tasks were running prior to their creation. This then allows them to + ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Create the 'check' timer - the timer that periodically calls the - check function as described in the comments at the top of this file. Note + check function as described in the comments at the top of this file. Note that, for reasons stated in the comments within vApplicationIdleHook() - (defined in this file), the check timer is not actually started until after + (defined in this file), the check timer is not actually started until after the scheduler has been started. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "Check timer", mainNO_ERROR_CHECK_TIMER_PERIOD, pdTRUE, ( void * ) 0, vCheckTimerCallback ); + xCheckTimer = xTimerCreate( "Check timer", mainNO_ERROR_CHECK_TIMER_PERIOD, pdTRUE, ( void * ) 0, vCheckTimerCallback ); - /* Start the scheduler running. From this point on, only tasks and + /* Start the scheduler running. From this point on, only tasks and interrupts will be executing. */ vTaskStartScheduler(); /* If all is well then the following line will never be reached. If execution does reach here, then it is highly probably that the heap size - is too small for the idle and/or timer tasks to be created within + is too small for the idle and/or timer tasks to be created within vTaskStartScheduler(). */ taskDISABLE_INTERRUPTS(); for( ;; ); @@ -429,7 +429,7 @@ will run on lots of different MicroBlaze and FPGA configurations - not all of which will have the same timer peripherals defined or available. This example uses the AXI Timer 0. If that is available on your hardware platform then this example callback implementation should not require modification. The name of -the interrupt handler that should be installed is vPortTickISR(), which the +the interrupt handler that should be installed is vPortTickISR(), which the function below declares as an extern. */ void vApplicationSetupTimerInterrupt( void ) { @@ -441,7 +441,7 @@ extern void vPortTickISR( void *pvUnused ); if( xStatus == XST_SUCCESS ) { - /* Install the tick interrupt handler as the timer ISR. + /* Install the tick interrupt handler as the timer ISR. *NOTE* The xPortInstallInterruptHandler() API function must be used for this purpose. */ xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL ); @@ -477,11 +477,11 @@ extern void vPortTickISR( void *pvUnused ); /* This is an application defined callback function used to clear whichever interrupt was installed by the the vApplicationSetupTimerInterrupt() callback -function - in this case the interrupt generated by the AXI timer. It is -provided as an application callback because the kernel will run on lots of -different MicroBlaze and FPGA configurations - not all of which will have the -same timer peripherals defined or available. This example uses the AXI Timer 0. -If that is available on your hardware platform then this example callback +function - in this case the interrupt generated by the AXI timer. It is +provided as an application callback because the kernel will run on lots of +different MicroBlaze and FPGA configurations - not all of which will have the +same timer peripherals defined or available. This example uses the AXI Timer 0. +If that is available on your hardware platform then this example callback implementation should not require modification provided the example definition of vApplicationSetupTimerInterrupt() is also not modified. */ void vApplicationClearTimerInterrupt( void ) @@ -498,7 +498,7 @@ void vApplicationMallocFailedHook( void ) { /* vApplicationMallocFailedHook() will only be called if configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook - function that will get called if a call to pvPortMalloc() fails. + function that will get called if a call to pvPortMalloc() fails. pvPortMalloc() is called internally by the kernel whenever a task, queue or semaphore is created. It is also called by various parts of the demo application. If heap_1.c or heap_2.c are used, then the size of the heap @@ -518,7 +518,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName /* vApplicationStackOverflowHook() will only be called if configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2. The handle and name - of the offending task will be passed into the hook function via its + of the offending task will be passed into the hook function via its parameters. However, when a stack has overflowed, it is possible that the parameters will have been corrupted, in which case the pxCurrentTCB variable can be inspected directly. */ @@ -531,14 +531,14 @@ void vApplicationIdleHook( void ) { static long lCheckTimerStarted = pdFALSE; - /* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set - to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle - task. It is essential that code added to this hook function never attempts - to block in any way (for example, call xQueueReceive() with a block time - specified, or call vTaskDelay()). If the application makes use of the - vTaskDelete() API function (as this demo application does) then it is also - important that vApplicationIdleHook() is permitted to return to its calling - function, because it is the responsibility of the idle task to clean up + /* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set + to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle + task. It is essential that code added to this hook function never attempts + to block in any way (for example, call xQueueReceive() with a block time + specified, or call vTaskDelay()). If the application makes use of the + vTaskDelete() API function (as this demo application does) then it is also + important that vApplicationIdleHook() is permitted to return to its calling + function, because it is the responsibility of the idle task to clean up memory allocated by the kernel to any task that has since been deleted. */ /* If the check timer has not already been started, then start it now. @@ -550,7 +550,7 @@ static long lCheckTimerStarted = pdFALSE; queue will have been drained. */ if( lCheckTimerStarted == pdFALSE ) { - xTimerStart( xCheckTimer, mainDONT_BLOCK ); + xTimerStart( xCheckTimer, mainDONT_BLOCK ); lCheckTimerStarted = pdTRUE; } } @@ -560,11 +560,11 @@ void vApplicationExceptionRegisterDump( xPortRegisterDump *xRegisterDump ) { ( void ) xRegisterDump; - /* If configINSTALL_EXCEPTION_HANDLERS is set to 1 in FreeRTOSConfig.h, then - the kernel will automatically install its own exception handlers before the - kernel is started, if the application writer has not already caused them to - be installed by calling either of the vPortExceptionsInstallHandlers() - or xPortInstallInterruptHandler() API functions before that time. The + /* If configINSTALL_EXCEPTION_HANDLERS is set to 1 in FreeRTOSConfig.h, then + the kernel will automatically install its own exception handlers before the + kernel is started, if the application writer has not already caused them to + be installed by calling either of the vPortExceptionsInstallHandlers() + or xPortInstallInterruptHandler() API functions before that time. The kernels exception handler populates an xPortRegisterDump structure with the processor state at the point that the exception was triggered - and also includes a strings that say what the exception cause was and which task was @@ -584,7 +584,7 @@ void vApplicationExceptionRegisterDump( xPortRegisterDump *xRegisterDump ) static void prvSetupHardware( void ) { taskDISABLE_INTERRUPTS(); - + /* Configure the LED outputs. */ vParTestInitialise(); diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main1.c b/FreeRTOS/Demo/PIC18_MPLAB/main1.c index e96048adc..3748e8388 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main1.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main1.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -64,36 +64,36 @@ */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the first. This enables the - * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin - * devices require a more costly development platform and are not so readily + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the first. This enables the + * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin + * devices require a more costly development platform and are not so readily * available. * - * The RTOSDemo1 project is configured for a PIC18F452 device. Main1.c starts 5 + * The RTOSDemo1 project is configured for a PIC18F452 device. Main1.c starts 5 * tasks (including the idle task). * - * The first task runs at the idle priority. It repeatedly performs a 32bit - * calculation and checks it's result against the expected value. This checks - * that the temporary storage utilised by the compiler to hold intermediate - * results does not get corrupted when the task gets switched in and out. See + * The first task runs at the idle priority. It repeatedly performs a 32bit + * calculation and checks it's result against the expected value. This checks + * that the temporary storage utilised by the compiler to hold intermediate + * results does not get corrupted when the task gets switched in and out. See * demo/common/minimal/integer.c for more information. * - * The second and third tasks pass an incrementing value between each other on + * The second and third tasks pass an incrementing value between each other on * a message queue. See demo/common/minimal/PollQ.c for more information. * - * Main1.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report and error, the frequency of the LED flash will increase + * Main1.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report and error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * PIC18F port. */ @@ -128,7 +128,7 @@ priority. */ /* The LED that is flashed by the check task. */ #define mainCHECK_TASK_LED ( 0 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -163,7 +163,7 @@ void main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main2.c b/FreeRTOS/Demo/PIC18_MPLAB/main2.c index 89f82435a..2afaac39c 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main2.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main2.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -64,32 +64,32 @@ */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the second. This enables the - * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin - * devices require a more costly development platform and are not so readily + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the second. This enables the + * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin + * devices require a more costly development platform and are not so readily * available. * - * The RTOSDemo2 project is configured for a PIC18F452 device. Main2.c starts + * The RTOSDemo2 project is configured for a PIC18F452 device. Main2.c starts * 5 tasks (including the idle task). - * + * * The first, second and third tasks do nothing but flash an LED. This gives * visual feedback that everything is executing as expected. One task flashes * an LED every 333ms (i.e. on and off every 333/2 ms), then next every 666ms * and the last every 999ms. * - * The last task runs at the idle priority. It repeatedly performs a 32bit - * calculation and checks it's result against the expected value. This checks - * that the temporary storage utilised by the compiler to hold intermediate + * The last task runs at the idle priority. It repeatedly performs a 32bit + * calculation and checks it's result against the expected value. This checks + * that the temporary storage utilised by the compiler to hold intermediate * results does not get corrupted when the task gets switched in and out. * should the calculation ever provide an incorrect result the final LED is * turned on. * * On entry to main() an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * PIC18F port. */ @@ -116,7 +116,7 @@ priority. */ /* The LED that is lit when should the calculation fail. */ #define mainCHECK_TASK_LED ( ( unsigned portBASE_TYPE ) 3 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -144,7 +144,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vCalculationTask, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vCalculationTask, "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main3.c b/FreeRTOS/Demo/PIC18_MPLAB/main3.c index e1a2b1c67..2ab3b277b 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main3.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main3.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -67,37 +67,37 @@ * THIS DEMO APPLICATION REQUIRES A LOOPBACK CONNECTOR TO BE FITTED TO THE PIC * USART PORT - connect pin 2 to pin 3 on J2. * - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the third. This enables the - * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin - * devices require a more costly development platform and are not so readily + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the third. This enables the + * demo's to be executed on the RAM limited 40 pin devices. The 64 and 80 pin + * devices require a more costly development platform and are not so readily * available. * * The RTOSDemo3 project is configured for a PIC18F452 device. Main3.c starts * 5 tasks (including the idle task). - * + * * The first task repeatedly transmits a string of characters on the PIC USART * port. The second task receives the characters, checking that the correct - * sequence is maintained (i.e. what is transmitted is identical to that - * received). Each transmitted and each received character causes an LED to + * sequence is maintained (i.e. what is transmitted is identical to that + * received). Each transmitted and each received character causes an LED to * flash. See demo/common/minimal/comtest. c for more information. * * The third task continuously performs a 32 bit calculation. This is a good - * test of the context switch mechanism as the 8 bit architecture requires + * test of the context switch mechanism as the 8 bit architecture requires * the use of several file registers to perform the 32 bit operations. See * demo/common/minimal/integer. c for more information. * * The third task is the check task. This periodically checks that the other * tasks are still running and have not experienced any errors. If no errors * have been reported by either the comms or integer tasks an LED is flashed - * with a frequency mainNO_ERROR_CHECK_PERIOD. If an error is discovered the + * with a frequency mainNO_ERROR_CHECK_PERIOD. If an error is discovered the * frequency is increased to mainERROR_FLASH_RATE. * * The check task also provides a visual indication of a system reset by - * flashing the one remaining LED (mainRESET_LED) when it starts. After + * flashing the one remaining LED (mainRESET_LED) when it starts. After * this initial flash mainRESET_LED should remain off. * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * PIC18F port. */ @@ -136,7 +136,7 @@ more frequently - increasing the LED flash rate. */ mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */ #define mainCOMM_TX_RX_LED ( ( unsigned portBASE_TYPE ) 2 ) -/* The LED that is flashed by the check task at a rate that indicates the +/* The LED that is flashed by the check task at a rate that indicates the error status. */ #define mainCHECK_TASK_LED ( ( unsigned portBASE_TYPE ) 1 ) @@ -148,9 +148,9 @@ error status. */ #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /*-----------------------------------------------------------*/ -/* +/* * Task function which periodically checks the other tasks for errors. Flashes - * an LED at a rate that indicates whether an error has ever been detected. + * an LED at a rate that indicates whether an error has ever been detected. */ static void vErrorChecks( void *pvParameters ); @@ -173,7 +173,7 @@ void main( void ) vStartIntegerMathTasks( tskIDLE_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. This will never return. */ vTaskStartScheduler(); @@ -214,7 +214,7 @@ volatile unsigned long ulDummy = 3UL; xDelayTime = mainERROR_CHECK_PERIOD; } - /* Flash the LED for visual feedback. The rate of the flash will + /* Flash the LED for visual feedback. The rate of the flash will indicate the health of the system. */ vParTestToggleLED( mainCHECK_TASK_LED ); } diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c index 11f555eb6..47a6feebb 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,11 +70,11 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the second. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the second. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo2 project is configured for a PIC18F4620 device. Main.c starts 12 + * The Demo2 project is configured for a PIC18F4620 device. Main.c starts 12 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * @@ -83,18 +83,18 @@ Changes from V3.0.1 * demo/common/minimal/semtest.c: Creates 4 tasks * demo/common/minimal/flash.c: Creates 3 tasks * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -125,7 +125,7 @@ priority. */ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 ) #define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -161,7 +161,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler(); @@ -178,17 +178,17 @@ portTickType xLastCheckTime; portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) { /* Wait until it is time to check the other tasks again. */ vTaskDelayUntil( &xLastCheckTime, xDelayTime ); - + /* Check all the other tasks are running, and running without ever having an error. */ cErrorOccurred = prvCheckOtherTasksAreStillRunning(); diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c index e2e867505..3ecb768b6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,11 +70,11 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the third. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the third. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo3 project is configured for a PIC18F4620 device. Main.c starts 12 + * The Demo3 project is configured for a PIC18F4620 device. Main.c starts 12 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * @@ -82,18 +82,18 @@ Changes from V3.0.1 * demo/common/minimal/BlockQ.c: Creates 6 tasks * demo/common/minimal/flash.c: Creates 3 tasks * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -122,7 +122,7 @@ priority. */ #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 ) #define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -157,7 +157,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler( ); @@ -174,10 +174,10 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters ) portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c index 030c576bc..b63f5751e 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,11 +70,11 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the fourth. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the fourth. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo4 project is configured for a PIC18F4620 device. Main.c starts 11 + * The Demo4 project is configured for a PIC18F4620 device. Main.c starts 11 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * @@ -82,18 +82,18 @@ Changes from V3.0.1 * demo/common/minimal/dynamic.c: Creates 5 tasks * demo/common/minimal/flash.c: Creates 3 tasks * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -121,7 +121,7 @@ priority. */ #define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 ) #define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -156,7 +156,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler( ); @@ -173,10 +173,10 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters ) portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c index e0af85f4f..1786bbf06 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,29 +70,29 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the fifth. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the fifth. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo5 project is configured for a PIC18F4620 device. Main.c starts 13 + * The Demo5 project is configured for a PIC18F4620 device. Main.c starts 13 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * * demo/common/minimal/flop.c: Creates 8 tasks * demo/common/minimal/flash.c: Creates 3 tasks * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -118,7 +118,7 @@ priority. */ #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 ) #define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -152,7 +152,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler(); @@ -169,17 +169,17 @@ portTickType xLastCheckTime; portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) { /* Wait until it is time to check the other tasks again. */ vTaskDelayUntil( &xLastCheckTime, xDelayTime ); - + /* Check all the other tasks are running, and running without ever having an error. */ cErrorOccurred = prvCheckOtherTasksAreStillRunning(); diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c index 1f045f5f5..9f85a3a44 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,25 +70,25 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the sixth. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the sixth. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo6 project is configured for a PIC18F4620 device. Main.c starts 4 + * The Demo6 project is configured for a PIC18F4620 device. Main.c starts 4 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * * demo/common/minimal/comtest.c: Creates 2 tasks * ATTENTION: Comtest needs a loopback-connector on the serial port. * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -143,7 +143,7 @@ void main( void ) vAltStartComTestTasks( mainCOMM_TEST_PRIORITY, mainBAUD_RATE, mainCOMM_TX_RX_LED ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler(); @@ -160,17 +160,17 @@ portTickType xLastCheckTime; portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) { /* Wait until it is time to check the other tasks again. */ vTaskDelayUntil( &xLastCheckTime, xDelayTime ); - + /* Check all the other tasks are running, and running without ever having an error. */ cErrorOccurred = prvCheckOtherTasksAreStillRunning(); diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c index 6d7134a68..f0891ff52 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,11 +70,11 @@ Changes from V3.0.1 */ /* - * Instead of the normal single demo application, the PIC18F demo is split - * into several smaller programs of which this is the seventh. This enables the + * Instead of the normal single demo application, the PIC18F demo is split + * into several smaller programs of which this is the seventh. This enables the * demo's to be executed on the RAM limited PIC-devices. * - * The Demo7 project is configured for a PIC18F4620 device. Main.c starts 10 + * The Demo7 project is configured for a PIC18F4620 device. Main.c starts 10 * tasks (including the idle task). See the indicated files in the demo/common * directory for more information. * @@ -82,18 +82,18 @@ Changes from V3.0.1 * demo/common/minimal/death.c: Creates 1 controltask and * creates/deletes 4 suicidaltasks * - * Main.c also creates a check task. This periodically checks that all the - * other tasks are still running and have not experienced any unexpected - * results. If all the other tasks are executing correctly an LED is flashed - * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not - * executed, or report an error, the frequency of the LED flash will increase + * Main.c also creates a check task. This periodically checks that all the + * other tasks are still running and have not experienced any unexpected + * results. If all the other tasks are executing correctly an LED is flashed + * once every mainCHECK_PERIOD milliseconds. If any of the tasks have not + * executed, or report an error, the frequency of the LED flash will increase * to mainERROR_FLASH_RATE. * * On entry to main an 'X' is transmitted. Monitoring the serial port using a - * dumb terminal allows for verification that the device is not continuously + * dumb terminal allows for verification that the device is not continuously * being reset (no more than one 'X' should be transmitted). * - * http://www.FreeRTOS.org contains important information on the use of the + * http://www.FreeRTOS.org contains important information on the use of the * wizC PIC18F port. */ @@ -120,7 +120,7 @@ priority. */ #define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 ) #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 ) -/* Constants required for the communications. Only one character is ever +/* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) #define mainNO_BLOCK ( ( portTickType ) 0 ) @@ -153,7 +153,7 @@ void main( void ) vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ - xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* This task has to be created last as it keeps account of the number of tasks it expects to see running. */ @@ -174,17 +174,17 @@ portTickType xLastCheckTime; portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; - /* We need to initialise xLastCheckTime prior to the first call to + /* We need to initialise xLastCheckTime prior to the first call to vTaskDelayUntil(). */ xLastCheckTime = xTaskGetTickCount(); - + /* Cycle for ever, delaying then checking all the other tasks are still operating without error. */ for( ;; ) { /* Wait until it is time to check the other tasks again. */ vTaskDelayUntil( &xLastCheckTime, xDelayTime ); - + /* Check all the other tasks are running, and running without ever having an error. */ cErrorOccurred = prvCheckOtherTasksAreStillRunning(); diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c index b8f4fecb4..8e3ba08eb 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c @@ -131,7 +131,7 @@ xQueueHandle xStartLCDTask( void ) /* Start the task that will write to the LCD. The LCD hardware is initialised from within the task itself so delays can be used. */ - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); return xLCDQueue; } diff --git a/FreeRTOS/Demo/PIC24_MPLAB/main.c b/FreeRTOS/Demo/PIC24_MPLAB/main.c index d489b1448..7974e6aa6 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/main.c @@ -184,7 +184,7 @@ int main( void ) vCreateBlockTimeTasks(); /* Create the test tasks defined within this file. */ - xTaskCreate( vCheckTask, ( signed char * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the task that will control the LCD. This returns the handle to the queue used to write text out to the task. */ diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c index 10d3e51e2..c124d9eba 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c @@ -146,7 +146,7 @@ xQueueHandle xStartLCDTask( void ) /* Start the task that will write to the LCD. The LCD hardware is initialised from within the task itself so delays can be used. */ - xTaskCreate( vLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); return xLCDQueue; } diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c index 841c4dc90..d1f69aaae 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -75,7 +75,7 @@ * required to configure the hardware, are defined in main.c. ****************************************************************************** * - * main_blinky() creates one queue, two tasks, and one software timer. It then + * main_blinky() creates one queue, two tasks, and one software timer. It then * starts the scheduler. * * The Blinky Software Timer: @@ -158,7 +158,7 @@ static void prvQueueSendTask( void *pvParameters ); * of this file. */ static void prvBlinkyTimerCallback( xTimerHandle xTimer ); - + /* * Called by main() to create the simply blinky style application if * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. @@ -184,28 +184,28 @@ xTimerHandle xTimer; /* Create the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the blinky software timer as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "Blinky", /* A text name, purely to help debugging. */ - ( mainBLINKY_TIMER_PERIOD ), /* The timer period. */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvBlinkyTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + xTimer = xTimerCreate( "Blinky", /* A text name, purely to help debugging. */ + ( mainBLINKY_TIMER_PERIOD ),/* The timer period. */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvBlinkyTimerCallback /* The callback function that inspects the status of all the other tasks. */ + ); + if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); } - + /* Start the tasks and timer running. */ vTaskStartScheduler(); } diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c index 6ebec91b9..6f398a354 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -75,9 +75,9 @@ * required to configure the hardware, are defined in main.c. ****************************************************************************** * - * main_full() creates all the demo application tasks and software timers, then - * starts the scheduler. The WEB documentation provides more details of the - * standard demo application tasks. In addition to the standard demo tasks, the + * main_full() creates all the demo application tasks and software timers, then + * starts the scheduler. The WEB documentation provides more details of the + * standard demo application tasks. In addition to the standard demo tasks, the * following tasks and tests are defined and/or created within this file: * * "LCD" task - the LCD task is a 'gatekeeper' task. It is the only task that @@ -93,34 +93,34 @@ * the check software timer discovers that a task has either stalled, or * reported an error, then it changes its own execution period from the initial * three seconds, to just 200ms. The check software timer callback function - * also writes a status message to the LCD (via the LCD task). If all the demo - * tasks are executing with their expected behaviour then the check task writes + * also writes a status message to the LCD (via the LCD task). If all the demo + * tasks are executing with their expected behaviour then the check task writes * a count of the number of times the high frequency interrupt has incremented * ulHighFrequencyTimerInterrupts - which is one in every 20,000 interrupts. * * "Register test" tasks - These tasks are used in part to test the kernel port. - * They set each processor register to a known value, then check that the + * They set each processor register to a known value, then check that the * register still contains that value. Each of the tasks sets the registers - * to different values, and will get swapping in and out between setting and + * to different values, and will get swapping in and out between setting and * then subsequently checking the register values. Discovery of an incorrect * value would be indicative of an error in the task switching mechanism. * - * By way of demonstration, the demo application defines - * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY + * By way of demonstration, the demo application defines + * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY * to be 1, and all other interrupts as follows: * - * + The UART is allocated a priority of 2. This means it can interrupt the + * + The UART is allocated a priority of 2. This means it can interrupt the * RTOS tick, and can also safely use queues. - * + Two timers are configured to generate interrupts just to test the nesting - * and queue access mechanisms. These timers are allocated priorities 2 and 3 - * respectively. Even though they both access the same two queues, the - * priority 3 interrupt can safely interrupt the priority 2 interrupt. Both + * + Two timers are configured to generate interrupts just to test the nesting + * and queue access mechanisms. These timers are allocated priorities 2 and 3 + * respectively. Even though they both access the same two queues, the + * priority 3 interrupt can safely interrupt the priority 2 interrupt. Both * can interrupt the RTOS tick. - * + Finally a high frequency timer interrupt is configured to use priority 4 - - * therefore kernel activity will never prevent the high frequency timer from - * executing immediately that the interrupt is raised (within the limitations - * of the hardware itself). It would not be safe to access a queue from this - * interrupt as it is above configMAX_SYSCALL_INTERRUPT_PRIORITY. + * + Finally a high frequency timer interrupt is configured to use priority 4 - + * therefore kernel activity will never prevent the high frequency timer from + * executing immediately that the interrupt is raised (within the limitations + * of the hardware itself). It would not be safe to access a queue from this + * interrupt as it is above configMAX_SYSCALL_INTERRUPT_PRIORITY. * * See the online documentation for this demo for more information on interrupt * usage. @@ -176,14 +176,14 @@ See the comtest.c file for more information. */ /* Misc. */ #define mainDONT_BLOCK ( 0 ) -/* Dimension the buffer used to hold the value of the high frequency timer +/* Dimension the buffer used to hold the value of the high frequency timer count when it is converted to a string. */ #define mainMAX_STRING_LENGTH ( 20 ) /* The frequency at which the "fast interrupt test" interrupt will occur. */ #define mainTEST_INTERRUPT_FREQUENCY ( 20000 ) -/* The number of timer clocks expected to occur between each "fast interrupt +/* The number of timer clocks expected to occur between each "fast interrupt test" interrupt. */ #define mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ( ( configCPU_CLOCK_HZ >> 1 ) / mainTEST_INTERRUPT_FREQUENCY ) @@ -219,11 +219,11 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ); static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ); /* - * Tasks that test the context switch mechanism by filling the processor + * Tasks that test the context switch mechanism by filling the processor * registers with known values, then checking that the values contained * within the registers is as expected. The tasks are likely to get swapped * in and out between setting the register values and checking the register - * values. + * values. */ static void prvRegTestTask1( void *pvParameters ); static void prvRegTestTask2( void *pvParameters ); @@ -233,7 +233,7 @@ static void prvRegTestTask2( void *pvParameters ); /* The queue used to send messages to the LCD task. */ static xQueueHandle xLCDQueue; -/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on +/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on each iteration of their function. This is used to detect either task stopping their execution.. */ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; @@ -247,7 +247,7 @@ int main_full( void ) { xTimerHandle xTimer = NULL; - /* Create the LCD task - this returns the queue to use when writing + /* Create the LCD task - this returns the queue to use when writing messages to the LCD. */ xLCDQueue = xStartLCDTask(); @@ -260,34 +260,34 @@ xTimerHandle xTimer = NULL; vStartInterruptQueueTasks(); /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( const signed char * const ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( const signed char * const ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - /* The PIC32MX795 uses an 8 deep fifo where TX interrupts are asserted - whilst the TX buffer is empty. This causes an issue with the test driver so + /* The PIC32MX795 uses an 8 deep fifo where TX interrupts are asserted + whilst the TX buffer is empty. This causes an issue with the test driver so it is not used in this demo */ #if !defined(__32MX795F512L__) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); - #endif - - /* Create the software timer that performs the 'check' functionality, as + #endif + + /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - + ); + if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); } - + /* A software timer is also used to start the high frequency timer test. This is to ensure the test does not start before the kernel. This time a one shot software timer is used. */ - xTimer = xTimerCreate( ( const signed char * ) "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest ); + xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest ); if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); @@ -356,16 +356,16 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; } ulLastRegTest1Value = ulRegTest1Cycles; - + /* Check that the register test 2 task is still running. */ if( ulLastRegTest2Value == ulRegTest2Cycles ) { xMessage.pcMessage = "Error: Reg test3"; } ulLastRegTest2Value = ulRegTest2Cycles; - - /* Have any of the standard demo tasks detected an error in their + + /* Have any of the standard demo tasks detected an error in their operation? */ if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { @@ -403,25 +403,25 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; - + /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block as to do so could impact other software timers. */ xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); - } + } } else { - /* Write the ulHighFrequencyTimerInterrupts value to the string + /* Write the ulHighFrequencyTimerInterrupts value to the string buffer. It will only be displayed if no errors have been detected. */ sprintf( cStringBuffer, "Pass %u", ( unsigned int ) ulHighFrequencyTimerInterrupts ); } - /* Send the status message to the LCD task for display on the LCD. This is + /* Send the status message to the LCD task for display on the LCD. This is a timer callback function, so the queue send function *must not* block. */ xQueueSend( xLCDQueue, &xMessage, mainDONT_BLOCK ); - vParTestToggleLED( mainCHECK_LED ); + vParTestToggleLED( mainCHECK_LED ); } /*-----------------------------------------------------------*/ @@ -430,6 +430,6 @@ static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ) /* Setup the high frequency, high priority, timer test. It is setup in this software timer callback to ensure it does not start before the kernel does. This is a one shot timer - so the setup routine will only be executed once. */ - vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY ); + vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY ); } diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c index e6e8f1b54..c326986b3 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c @@ -133,12 +133,12 @@ void vStartISRTriggeredTask( void ) { /* Create the task described at the top of this file. The timer is configured by the task itself. */ - xTaskCreate( prvISRTriggeredTask, /* The function that implements the task. */ - ( const signed char * const ) "ISRt", /* Text name to help debugging - not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task - defined in words, not bytes. */ - NULL, /* The parameter to pass into the task. Not used in this case. */ - configMAX_PRIORITIES - 1, /* The priority at which the task is created. */ - NULL ); /* Used to pass a handle to the created task out of the function. Not used in this case. */ + xTaskCreate( prvISRTriggeredTask, /* The function that implements the task. */ + "ISRt", /* Text name to help debugging - not used by the kernel. */ + configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task - defined in words, not bytes. */ + NULL, /* The parameter to pass into the task. Not used in this case. */ + configMAX_PRIORITIES - 1, /* The priority at which the task is created. */ + NULL ); /* Used to pass a handle to the created task out of the function. Not used in this case. */ } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c index e4aba6165..07fabfb16 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c @@ -177,21 +177,21 @@ xTimerHandle xTimer; /* Create the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Create the blinky software timer as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "Blinky",/* A text name, purely to help debugging. */ - ( mainBLINKY_TIMER_PERIOD ), /* The timer period. */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvBlinkyTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ + xTimer = xTimerCreate( "Blinky", /* A text name, purely to help debugging. */ + ( mainBLINKY_TIMER_PERIOD ),/* The timer period. */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvBlinkyTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ configASSERT( xTimer ); if( xTimer != NULL ) diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c index a176abf17..9820fe807 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c @@ -238,18 +238,18 @@ xTimerHandle xTimer = NULL; vStartRecursiveMutexTasks(); /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, /* The function that implements the task. */ - ( const signed char * const ) "Reg1", /* Text name for the task to assist debugger - not used by FreeRTOS itself. */ - configMINIMAL_STACK_SIZE, /* The stack size to allocate for the task - specified in words not bytes. */ - NULL, /* The parameter to pass into the task - not used in this case so set to NULL. */ - tskIDLE_PRIORITY, /* The priority to assign to the task. */ - NULL ); /* Used to obtain a handle to the task being created - not used in this case so set to NULL. */ + xTaskCreate( prvRegTestTask1, /* The function that implements the task. */ + "Reg1", /* Text name for the task to assist debugger - not used by FreeRTOS itself. */ + configMINIMAL_STACK_SIZE, /* The stack size to allocate for the task - specified in words not bytes. */ + NULL, /* The parameter to pass into the task - not used in this case so set to NULL. */ + tskIDLE_PRIORITY, /* The priority to assign to the task. */ + NULL ); /* Used to obtain a handle to the task being created - not used in this case so set to NULL. */ - xTaskCreate( prvRegTestTask2, ( const signed char * const ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ @@ -263,7 +263,7 @@ xTimerHandle xTimer = NULL; /* A software timer is also used to start the high frequency timer test. This is to ensure the test does not start before the kernel. This time a one shot software timer is used. */ - xTimer = xTimerCreate( ( const signed char * ) "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest ); + xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest ); if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c index 9f484b952..f06ea14a3 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c @@ -155,7 +155,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Create the first task. */ - xTaskCreate( vFlopTest1, ( signed portCHAR * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest1, "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -165,7 +165,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Do the same for the second task. */ - xTaskCreate( vFlopTest2, ( signed portCHAR * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest2, "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c index 9459d7572..54e8c3bce 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c @@ -136,7 +136,7 @@ portBASE_TYPE x, y; /* Create the first task - passing it the address of the check variable that it is going to increment. This check variable is used as an indication that the task is still running. */ - xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -146,25 +146,25 @@ portBASE_TYPE x, y; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Create another 7 tasks, allocating a buffer for each. */ - xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c index 5f9a7e425..0b523edd2 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c @@ -202,9 +202,9 @@ int main( void ) #endif /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c index 9f484b952..f06ea14a3 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c @@ -155,7 +155,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Create the first task. */ - xTaskCreate( vFlopTest1, ( signed portCHAR * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest1, "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -165,7 +165,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Do the same for the second task. */ - xTaskCreate( vFlopTest2, ( signed portCHAR * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest2, "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c index 9459d7572..54e8c3bce 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c @@ -136,7 +136,7 @@ portBASE_TYPE x, y; /* Create the first task - passing it the address of the check variable that it is going to increment. This check variable is used as an indication that the task is still running. */ - xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -146,25 +146,25 @@ portBASE_TYPE x, y; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Create another 7 tasks, allocating a buffer for each. */ - xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c index 68925a00d..f65f99487 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c @@ -208,9 +208,9 @@ int main( void ) #endif /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 5a606884c..620ae4607 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -156,7 +156,7 @@ portDOUBLE z = flopSTART_VALUE; /* Create the first task. */ - xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest1, "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -166,7 +166,7 @@ portDOUBLE z = flopSTART_VALUE; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 0 ][ 0 ] ) ); /* Do the same for the second task. */ - xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest2, "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 1 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index bb51961bd..3b6297dae 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -136,7 +136,7 @@ portBASE_TYPE x, y; /* Create the first task - passing it the address of the check variable that it is going to increment. This check variable is used as an indication that the task is still running. */ - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -146,25 +146,25 @@ portBASE_TYPE x, y; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 0 ][ 0 ] ) ); /* Create another 7 tasks, allocating a buffer for each. */ - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 1 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 2 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 3 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 4 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 5 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 6 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 7 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index ac563e29a..92364cdc7 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -202,9 +202,9 @@ int main( void ) #endif /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 6bf86ea99..4aa9d7bd4 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -155,7 +155,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Create the first task. */ - xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest1, "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -165,7 +165,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Do the same for the second task. */ - xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest2, "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index b439960a2..f8b13ce6a 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -136,7 +136,7 @@ portBASE_TYPE x, y; /* Create the first task - passing it the address of the check variable that it is going to increment. This check variable is used as an indication that the task is still running. */ - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -146,25 +146,25 @@ portBASE_TYPE x, y; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Create another 7 tasks, allocating a buffer for each. */ - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index 8218535c0..1729304f6 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -202,9 +202,9 @@ int main( void ) #endif /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 6bf86ea99..4aa9d7bd4 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -155,7 +155,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Create the first task. */ - xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest1, "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -165,7 +165,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Do the same for the second task. */ - xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); + xTaskCreate( vFlopTest2, "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index b439960a2..f8b13ce6a 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -136,7 +136,7 @@ portBASE_TYPE x, y; /* Create the first task - passing it the address of the check variable that it is going to increment. This check variable is used as an indication that the task is still running. */ - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated ); /* The task tag value is a value that can be associated with a task, but is not used by the scheduler itself. Its use is down to the application so @@ -146,25 +146,25 @@ portBASE_TYPE x, y; vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) ); /* Create another 7 tasks, allocating a buffer for each. */ - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated ); vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c index e5b7922c9..661c42578 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -208,9 +208,9 @@ int main( void ) #endif /* Create the tasks defined within this file. */ - xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c index 3c2bca19c..528f898d0 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c @@ -56,19 +56,19 @@ *************************************************************************** - http://www.FreeRTOS.org - Documentation, books, training, latest versions, + 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, and our new fully thread aware and reentrant UDP/IP stack. - http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High - Integrity Systems, who sell the code with commercial support, + http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High + Integrity Systems, who sell the code with commercial support, indemnification and middleware, under the OpenRTOS brand. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and + + 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. */ @@ -139,8 +139,8 @@ void vCreateBlockTimeTasks( void ) vQueueAddToRegistry( xTestQueue, ( signed char * ) "Block_Time_Queue" ); /* Create the two test tasks. */ - xTaskCreate( vPrimaryBlockTimeTestTask, ( signed char * )"BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); - xTaskCreate( vSecondaryBlockTimeTestTask, ( signed char * )"BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); + xTaskCreate( vPrimaryBlockTimeTestTask, "BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); + xTaskCreate( vSecondaryBlockTimeTestTask, "BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/timers.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/timers.c index ddfdb7047..3309741c6 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/timers.c +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/timers.c @@ -208,12 +208,12 @@ portBASE_TYPE xReturn = pdFAIL; { /* Create the timer task, storing its handle in xTimerTaskHandle so it can be returned by the xTimerGetTimerDaemonTaskHandle() function. */ - xReturn = xTaskCreate( prvTimerTask, ( const signed char * ) "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, &xTimerTaskHandle ); + xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, &xTimerTaskHandle ); } #else { /* Create the timer task without storing its handle. */ - xReturn = xTaskCreate( prvTimerTask, ( const signed char * ) "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, NULL); + xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, NULL); } #endif } diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c index 80b2a2ed1..a866218a9 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c @@ -231,31 +231,31 @@ void main_full( void ) vCreateBlockTimeTasks(); /* Create the RegTest tasks as described at the top of this file. */ - xTaskCreate( prvRegTest1Entry, /* The function that implements the task. */ - ( const signed char * ) "Reg1",/* Text name for the task - to assist debugging only, not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack allocated to the task (in words, not bytes). */ - mainREG_TEST_1_PARAMETER, /* The parameter passed into the task. */ - tskIDLE_PRIORITY, /* The priority at which the task will execute. */ - NULL ); /* Used to pass the handle of the created task out to the function caller - not used in this case. */ + xTaskCreate( prvRegTest1Entry, /* The function that implements the task. */ + "Reg1", /* Text name for the task - to assist debugging only, not used by the kernel. */ + configMINIMAL_STACK_SIZE, /* The size of the stack allocated to the task (in words, not bytes). */ + mainREG_TEST_1_PARAMETER, /* The parameter passed into the task. */ + tskIDLE_PRIORITY, /* The priority at which the task will execute. */ + NULL ); /* Used to pass the handle of the created task out to the function caller - not used in this case. */ - xTaskCreate( prvRegTest2Entry, ( const signed char * ) "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest2Entry, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create the software timer that just increments a variable for demo purposes. */ - xDemoTimer = xTimerCreate( ( const signed char * ) "DemoTimer",/* A text name, purely to help debugging. */ - ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xDemoTimer = xTimerCreate( "DemoTimer", /* A text name, purely to help debugging. */ + ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Start both the check timer and the demo timer. The timers won't actually diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c index bbad469c9..0600a276c 100644 --- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c +++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c @@ -232,7 +232,7 @@ short main( void ) /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ @@ -241,7 +241,7 @@ short main( void ) /* Create the software timer that just increments a variable for demo purposes. */ - xDemoTimer = xTimerCreate( ( const signed char * ) "DemoTimer",/* A text name, purely to help debugging. */ + xDemoTimer = xTimerCreate( "DemoTimer",/* A text name, purely to help debugging. */ ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c index c621ea2a1..4c427484e 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c +++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -156,14 +156,14 @@ void main_blinky( void ) { /* Start the two tasks as described in the comments at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ - NULL, /* The parameter passed to the task - not used in this case. */ - mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ - NULL ); /* The task handle is not required, so NULL is passed. */ - - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ + NULL, /* The parameter passed to the task - not used in this case. */ + mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ + NULL ); /* The task handle is not required, so NULL is passed. */ + + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c index d509657b8..b566c120c 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c +++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -223,26 +223,26 @@ void main_full( void ) /* Create the RegTest tasks as described at the top of this file. */ xTaskCreate( prvRegTest1Entry, /* The function that implements the task. */ - ( const signed char * ) "Reg1",/* Text name for the task - to assist debugging only, not used by the kernel. */ + "Reg1", /* Text name for the task - to assist debugging only, not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack allocated to the task (in words, not bytes). */ mainREG_TEST_1_PARAMETER, /* The parameter passed into the task. */ tskIDLE_PRIORITY, /* The priority at which the task will execute. */ NULL ); /* Used to pass the handle of the created task out to the function caller - not used in this case. */ - xTaskCreate( prvRegTest2Entry, ( const signed char * ) "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest2Entry, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ + xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ + ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ + pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ + ( void * ) 0, /* The ID is not used, so can be set to anything. */ + prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); /* Create the software timer that just increments a variable for demo purposes. */ - xDemoTimer = xTimerCreate( ( const signed char * ) "DemoTimer",/* A text name, purely to help debugging. */ + xDemoTimer = xTimerCreate( "DemoTimer",/* A text name, purely to help debugging. */ ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c index d42cff302..11ce59fcf 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c @@ -206,7 +206,7 @@ void main_full( void ) /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c index c7a9c8b86..2993e59e4 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c @@ -210,7 +210,7 @@ void main_full( void ) /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c index 04184a0b5..763f9eb39 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c @@ -206,7 +206,7 @@ void main_full( void ) /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c index b1b0f05dc..365958dc5 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c @@ -294,7 +294,7 @@ extern void HardwareSetup( void ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c index 7c5b0f4f6..d055c940b 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c @@ -125,8 +125,8 @@ extern void HardwareSetup( void ); if( xQueue != NULL ) { /* Start the two tasks as described at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c index d27d11148..d3f0c87f4 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c @@ -272,14 +272,14 @@ extern void HardwareSetup( void ); vParTestInitialise(); /* Start the reg test tasks which test the context switching mechanism. */ - xTaskCreate( prvRegTest1Task, ( signed char * ) "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTest2Task, ( signed char * ) "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* The web server task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* Start the check task as described at the top of this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c index 5af9ca973..94f1682a2 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -111,7 +111,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -146,7 +146,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -161,10 +161,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -200,11 +200,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -219,14 +219,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -255,14 +255,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -319,7 +319,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/httpd-cgi.c index 432f957bb..be4d71175 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/httpd-cgi.c index 432f957bb..be4d71175 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c index 5af9ca973..94f1682a2 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -111,7 +111,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -146,7 +146,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -161,10 +161,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -200,11 +200,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -219,14 +219,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -255,14 +255,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -319,7 +319,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c index 432f957bb..be4d71175 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c index 7c5b0f4f6..d055c940b 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c @@ -125,8 +125,8 @@ extern void HardwareSetup( void ); if( xQueue != NULL ) { /* Start the two tasks as described at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c index d27d11148..d3f0c87f4 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c @@ -272,14 +272,14 @@ extern void HardwareSetup( void ); vParTestInitialise(); /* Start the reg test tasks which test the context switching mechanism. */ - xTaskCreate( prvRegTest1Task, ( signed char * ) "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTest2Task, ( signed char * ) "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* The web server task. */ - xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* Start the check task as described at the top of this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c index 5af9ca973..94f1682a2 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -111,7 +111,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -146,7 +146,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -161,10 +161,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -200,11 +200,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -219,14 +219,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -255,14 +255,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -319,7 +319,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/httpd-cgi.c index 047332d9a..016644aa0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/httpd-cgi.c index 047332d9a..016644aa0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c index 5af9ca973..94f1682a2 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -111,7 +111,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -146,7 +146,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -161,10 +161,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -200,11 +200,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -219,14 +219,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -255,14 +255,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -319,7 +319,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c index 047332d9a..016644aa0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c index 5f0bf0788..b7b57a02e 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c @@ -282,7 +282,7 @@ extern void HardwareSetup( void ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c index 5af9ca973..94f1682a2 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -111,7 +111,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -146,7 +146,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -161,10 +161,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -200,11 +200,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -219,14 +219,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -255,14 +255,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -319,7 +319,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c index 047332d9a..016644aa0 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c index e40540a24..4cc130aa1 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c @@ -56,19 +56,19 @@ *************************************************************************** - http://www.FreeRTOS.org - Documentation, books, training, latest versions, + 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, and our new fully thread aware and reentrant UDP/IP stack. - http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High - Integrity Systems, who sell the code with commercial support, + http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High + Integrity Systems, who sell the code with commercial support, indemnification and middleware, under the OpenRTOS brand. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and + + 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. */ @@ -120,7 +120,7 @@ constants are assigned to the timer IDs. */ static void prvSetMACAddress( void ); /* - * Perform any uIP initialisation necessary. + * Perform any uIP initialisation necessary. */ static void prvInitialise_uIP( void ); @@ -155,7 +155,7 @@ unsigned long ulNewEvent = 0UL; unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ prvInitialise_uIP(); @@ -170,10 +170,10 @@ unsigned long ulUIP_Events = 0UL; for( ;; ) { if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { + { /* Is there received data ready to be processed? */ uip_len = ( unsigned short ) ulEMACRead(); - + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { /* Standard uIP loop taken from the uIP manual. */ @@ -209,11 +209,11 @@ unsigned long ulUIP_Events = 0UL; ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -228,14 +228,14 @@ unsigned long ulUIP_Events = 0UL; } } } - + /* Call the ARP timer function every 10 seconds. */ if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { ulUIP_Events &= ~uipARP_TIMER_EVENT; uip_arp_timer(); } - + if( ulUIP_Events == pdFALSE ) { xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); @@ -264,14 +264,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL; xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); - xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + xPeriodicTimer = xTimerCreate( "PeriodicTimer", ( 50 / portTICK_RATE_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, @@ -328,7 +328,7 @@ char *c; /* Only interested in processing form input if this is the IO page. */ c = strstr( pcInputString, "io.shtml" ); - + if( c ) { /* Is there a command in the string? */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c index 047332d9a..016644aa0 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c @@ -104,7 +104,7 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) PSOCK_BEGIN( &s->sout ); ( void ) PT_YIELD_FLAG; - + PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); PSOCK_END( &s->sout ); @@ -177,7 +177,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -186,7 +186,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -227,7 +227,7 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); extern unsigned short usMaxJitter; static char cJitterBuffer[ 200 ]; static unsigned short generate_runtime_stats( void *arg ) @@ -235,11 +235,11 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - + #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST { sprintf( cJitterBuffer, "


Max high frequency timer jitter = %d peripheral clock periods.


", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cJitterBuffer ); } #else @@ -247,7 +247,7 @@ static unsigned short generate_runtime_stats( void *arg ) ( void ) cJitterBuffer; strcpy( uip_appdata, "

Run time stats are only available in the debug_with_optimisation build configuration.

" ); } - #endif + #endif strcat( uip_appdata, cCountBuf ); diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c index 96c051371..4e2b31b2e 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c @@ -112,31 +112,31 @@ void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) xTaskHandle xCreatedTask; /* Create one of the floating point tasks... */ - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xCreatedTask ); /* ... then enable floating point support for the created task so its flop flop registers are maintained in a consistent state. */ xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask3, "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask4, "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask1, "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask2, "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask3, "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); - xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xCreatedTask ); + xTaskCreate( vCompetingMathTask4, "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/httpd-cgi.c index f840171ed..6c2ae8161 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/httpd-cgi.c @@ -126,11 +126,11 @@ static unsigned short generate_tcp_stats( void *arg ) struct httpd_state *s = ( struct httpd_state * ) arg; conn = &uip_conns[s->count]; - return sprintf( ( char * ) uip_appdata, + return sprintf( ( char * ) uip_appdata, "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", htons(conn->lport), htons(conn->ripaddr.u16[0]) >> 8, htons(conn->ripaddr.u16[0]) & 0xff, htons(conn->ripaddr.u16[1]) >> 8, htons(conn->ripaddr.u16[1]) & 0xff, htons(conn->rport), states[conn->tcpstateflags & UIP_TS_MASK], conn->nrtx, conn->timer, - (uip_outstanding(conn)) ? '*' : ' ', (uip_stopped(conn)) ? '!' : ' ' ); + (uip_outstanding(conn)) ? '*' : ' ', (uip_stopped(conn)) ? '!' : ' ' ); } /*---------------------------------------------------------------------------*/ @@ -172,7 +172,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) } /*---------------------------------------------------------------------------*/ -extern void vTaskList( signed char *pcWriteBuffer ); +extern void vTaskList( char *pcWriteBuffer ); extern char *pcGetTaskStatusMessage( void ); static char cCountBuf[128]; long lRefreshCount = 0; @@ -181,7 +181,7 @@ static unsigned short generate_rtos_stats( void *arg ) ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d


%s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( uip_appdata ); + vTaskList( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); @@ -221,13 +221,13 @@ static unsigned short generate_io_state( void *arg ) } /*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer ); +extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); static unsigned short generate_runtime_stats( void *arg ) { ( void ) arg; lRefreshCount++; sprintf( cCountBuf, "


Refresh count = %d", ( int ) lRefreshCount ); - vTaskGetRunTimeStats( uip_appdata ); + vTaskGetRunTimeStats( ( char * ) uip_appdata ); strcat( uip_appdata, cCountBuf ); return strlen( uip_appdata ); diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c index 251e33d35..4711eaf70 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c @@ -144,7 +144,7 @@ unsigned long ulCompareMatchBits; /* Create the task that pends on the semaphore that is given by the high frequency interrupt. */ - xTaskCreate( prvHighFrequencyTimerTask, ( signed char * ) "HFTmr", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + xTaskCreate( prvHighFrequencyTimerTask, "HFTmr", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); /* Setup the interrupt itself. The STM module clock divider is setup when the tick interrupt is configured - which is when the scheduler is started - diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c index ab49902ff..c9bbb327b 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c @@ -494,11 +494,11 @@ static void prvOptionallyCreateComprehensveTestApplication( void ) vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); /* Create the register test tasks, as described at the top of this file. */ - xTaskCreate( prvRegisterCheckTask1, ( signed char * ) "Reg 1", configMINIMAL_STACK_SIZE, &ulRegisterTest1Count, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegisterCheckTask2, ( signed char * ) "Reg 2", configMINIMAL_STACK_SIZE, &ulRegisterTest2Count, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegisterCheckTask1, "Reg 1", configMINIMAL_STACK_SIZE, &ulRegisterTest1Count, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvRegisterCheckTask2, "Reg 2", configMINIMAL_STACK_SIZE, &ulRegisterTest2Count, tskIDLE_PRIORITY, NULL ); /* Start the check task - which is defined in this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* This task has to be created last as it keeps account of the number of tasks it expects to see running. */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c index 35f929a41..34f341d02 100644 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c +++ b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c @@ -175,7 +175,7 @@ static struct netif xNetIf; /* Create the FreeRTOS defined basic command server. This demonstrates use of the lwIP sockets API. */ - xTaskCreate( vBasicSocketsCommandInterpreterTask, ( signed char * ) "CmdInt", configMINIMAL_STACK_SIZE * 10, NULL, configMAX_PRIORITIES - 2, NULL ); + xTaskCreate( vBasicSocketsCommandInterpreterTask, "CmdInt", configMINIMAL_STACK_SIZE * 10, NULL, configMAX_PRIORITIES - 2, NULL ); } /*-----------------------------------------------------------*/ @@ -194,11 +194,11 @@ extern char *pcMainGetTaskStatusMessage( void ); switch( iIndex ) { case ssiTASK_STATS_INDEX : - vTaskList( ( signed char * ) pcBuffer ); + vTaskList( pcBuffer ); break; case ssiRUN_TIME_STATS_INDEX : - vTaskGetRunTimeStats( ( signed char * ) pcBuffer ); + vTaskGetRunTimeStats( pcBuffer ); break; } diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c index 775499ad9..1d8935683 100644 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c @@ -188,7 +188,7 @@ const unsigned long ulLongTime_ms = 1000UL; tcpip_init( lwIPAppsInit, NULL ); /* Create and start the check timer, as described at the top of this file. */ - xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ + xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ @@ -373,7 +373,7 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* /* Generate a table of task stats. */ strcpy( pcWriteBuffer, pcHeader ); - vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) ); + vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( pcHeader ) ); /* There is no more data to return after this single string, so return pdFALSE. */ diff --git a/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c b/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c index 67a6cb423..5c78ce96e 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c +++ b/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c @@ -153,14 +153,14 @@ void vStartRecursiveMutexTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" ); + vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" ); if( xMutex != NULL ) { - xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); - xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); - xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle ); + xTaskCreate( prvRecursiveMutexControllingTask, "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); + xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); + xTaskCreate( prvRecursiveMutexPollingTask, "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index 3684506d0..19ef0f29f 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -105,7 +105,7 @@ mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two. The simply blinky demo is implemented and described in main_blinky.c. The more comprehensive test and demo application is implemented and described in main_full.c. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1 +#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 /* * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. @@ -257,6 +257,8 @@ void vApplicationTickHook( void ) void vAssertCalled( unsigned long ulLine, const char * const pcFileName ) { +static portBASE_TYPE xPrinted = pdFALSE; + /* Parameters are not used. */ ( void ) ulLine; ( void ) pcFileName; @@ -264,12 +266,15 @@ void vAssertCalled( unsigned long ulLine, const char * const pcFileName ) taskDISABLE_INTERRUPTS(); /* Stop the trace recording. */ - if( xTraceRunning == pdTRUE ) + if( xPrinted == pdFALSE ) { + xPrinted = pdTRUE; + if( xTraceRunning == pdTRUE ) + { vTraceStop(); prvSaveTraceFile(); + } } - for( ;; ); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c index ca4824fd6..a3683efe5 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -69,21 +69,21 @@ * application. It is provided as a convenient development and demonstration * test bed only. This was tested using Windows XP on a dual core laptop. * - * Windows will not be running the FreeRTOS simulator threads continuously, so - * the timing information in the FreeRTOS+Trace logs have no meaningful units. - * See the documentation page for the Windows simulator for an explanation of + * Windows will not be running the FreeRTOS simulator threads continuously, so + * the timing information in the FreeRTOS+Trace logs have no meaningful units. + * See the documentation page for the Windows simulator for an explanation of * the slow timing: * http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html * - READ THE WEB DOCUMENTATION FOR THIS PORT FOR MORE INFORMATION ON USING IT - * * NOTE 2: This project provides two demo applications. A simple blinky style * project, and a more comprehensive test and demo application. The - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select - * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY + * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select + * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY * in main.c. This file implements the simply blinky style version. * * NOTE 3: This file only contains the source code that is specific to the - * basic demo. Generic functions, such FreeRTOS hook functions, are defined + * basic demo. Generic functions, such FreeRTOS hook functions, are defined * in main.c. ****************************************************************************** * @@ -94,9 +94,9 @@ * The queue send task is implemented by the prvQueueSendTask() function in * this file. prvQueueSendTask() sits in a loop that causes it to repeatedly * block for 200 (simulated as far as the scheduler is concerned, but in - * reality much longer - see notes above) milliseconds, before sending the - * value 100 to the queue that was created within main_blinky(). Once the - * value is sent, the task loops back around to block for another 200 + * reality much longer - see notes above) milliseconds, before sending the + * value 100 to the queue that was created within main_blinky(). Once the + * value is sent, the task loops back around to block for another 200 * (simulated) milliseconds. * * The Queue Receive Task: @@ -104,13 +104,13 @@ * in this file. prvQueueReceiveTask() sits in a loop where it repeatedly * blocks on attempts to read data from the queue that was created within * main_blinky(). When data is received, the task checks the value of the - * data, and if the value equals the expected 100, outputs a message. The - * 'block time' parameter passed to the queue receive function specifies that - * the task should be held in the Blocked state indefinitely to wait for data + * data, and if the value equals the expected 100, outputs a message. The + * 'block time' parameter passed to the queue receive function specifies that + * the task should be held in the Blocked state indefinitely to wait for data * to be available on the queue. The queue receive task will only leave the * Blocked state when the queue send task writes to the queue. As the queue - * send task writes to the queue every 200 (simulated - see notes above) - * milliseconds, the queue receive task leaves the Blocked state every 200 + * send task writes to the queue every 200 (simulated - see notes above) + * milliseconds, the queue receive task leaves the Blocked state every 200 * milliseconds, and therefore outputs a message every 200 milliseconds. */ @@ -165,13 +165,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); @@ -191,7 +191,7 @@ static void prvQueueSendTask( void *pvParameters ) portTickType xNextWakeTime; const unsigned long ulValueToSend = 100UL; - /* Remove compiler warning in the case that configASSERT() is not + /* Remove compiler warning in the case that configASSERT() is not defined. */ ( void ) pvParameters; @@ -222,7 +222,7 @@ static void prvQueueReceiveTask( void *pvParameters ) { unsigned long ulReceivedValue; - /* Remove compiler warning in the case that configASSERT() is not + /* Remove compiler warning in the case that configASSERT() is not defined. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_full.c b/FreeRTOS/Demo/WIN32-MSVC/main_full.c index 11ac892ae..d5fc31146 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_full.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_full.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,27 +70,27 @@ * application. It is provided as a convenient development and demonstration * test bed only. This was tested using Windows XP on a dual core laptop. * - * Windows will not be running the FreeRTOS simulator threads continuously, so - * the timing information in the FreeRTOS+Trace logs have no meaningful units. - * See the documentation page for the Windows simulator for an explanation of + * Windows will not be running the FreeRTOS simulator threads continuously, so + * the timing information in the FreeRTOS+Trace logs have no meaningful units. + * See the documentation page for the Windows simulator for an explanation of * the slow timing: * http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html * - READ THE WEB DOCUMENTATION FOR THIS PORT FOR MORE INFORMATION ON USING IT - * * NOTE 2: This project provides two demo applications. A simple blinky style * project, and a more comprehensive test and demo application. The - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select - * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY + * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select + * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY * in main.c. This file implements the comprehensive test and demo version. * * NOTE 3: This file only contains the source code that is specific to the - * basic demo. Generic functions, such FreeRTOS hook functions, are defined in + * basic demo. Generic functions, such FreeRTOS hook functions, are defined in * main.c. ******************************************************************************* * - * main() creates all the demo application tasks, then starts the scheduler. - * The web documentation provides more details of the standard demo application - * tasks, which provide no particular functionality but do provide a good + * main() creates all the demo application tasks, then starts the scheduler. + * The web documentation provides more details of the standard demo application + * tasks, which provide no particular functionality but do provide a good * example of how to use the FreeRTOS API. * * In addition to the standard demo tasks, the following tasks and tests are @@ -152,7 +152,7 @@ /* Task function prototypes. */ static void prvCheckTask( void *pvParameters ); -/* A task that is created from the idle task to test the functionality of +/* A task that is created from the idle task to test the functionality of eTaskStateGet(). */ static void prvTestTask( void *pvParameters ); @@ -181,7 +181,7 @@ static xSemaphoreHandle xMutexToDelete = NULL; int main_full( void ) { /* Start the check task as described at the top of this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); @@ -191,12 +191,12 @@ int main_full( void ) vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); - vStartRecursiveMutexTasks(); + vStartRecursiveMutexTasks(); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartQueueSetTasks(); - vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); - xTaskCreate( prvDemoQueueSpaceFunctions, ( signed char * ) "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); + xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); vStartEventGroupTasks(); #if( configUSE_PREEMPTION != 0 ) @@ -207,8 +207,8 @@ int main_full( void ) #endif /* The suicide tasks must be created last as they need to know how many - tasks were running prior to their creation. This then allows them to - ascertain whether or not the correct/expected number of tasks are running at + tasks were running prior to their creation. This then allows them to + ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); @@ -219,7 +219,7 @@ int main_full( void ) /* Start the scheduler itself. */ vTaskStartScheduler(); - /* Should never get here unless there was not enough heap space to create + /* Should never get here unless there was not enough heap space to create the idle and other system tasks. */ return 0; } @@ -259,9 +259,9 @@ const portTickType xCycleFrequency = 2500 / portTICK_RATE_MS; else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { pcStatusMessage = "Error: IntMath"; - } + } else if( xAreGenericQueueTasksStillRunning() != pdTRUE ) - { + { pcStatusMessage = "Error: GenQueue"; } else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) @@ -309,7 +309,7 @@ const portTickType xCycleFrequency = 2500 / portTICK_RATE_MS; pcStatusMessage = "Error: Queue overwrite"; } - /* This is the only task that uses stdout so its ok to call printf() + /* This is the only task that uses stdout so its ok to call printf() directly. */ printf( "%s - %d\r\n", pcStatusMessage, xTaskGetTickCount() ); } @@ -358,7 +358,7 @@ extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask ); prvDemonstrateTaskStateAndHandleGetFunctions(); /* If xMutexToDelete has not already been deleted, then delete it now. - This is done purely to demonstrate the use of, and test, the + This is done purely to demonstrate the use of, and test, the vSemaphoreDelete() macro. Care must be taken not to delete a semaphore that has tasks blocked on it. */ if( xMutexToDelete != NULL ) @@ -377,7 +377,7 @@ extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask ); xMutexToDelete = NULL; } - /* Exercise heap_4 a bit. The malloc failed hook will trap failed + /* Exercise heap_4 a bit. The malloc failed hook will trap failed allocations so there is no need to test here. */ pvAllocated = pvPortMalloc( ( rand() % 100 ) + 1 ); vPortFree( pvAllocated ); @@ -399,7 +399,7 @@ void vFullDemoTickHookFunction( void ) /* Call the periodic queue overwrite from ISR demo. */ vQueueOverwritePeriodicISRDemo(); - /* Write to a queue that is in use as part of the queue set demo to + /* Write to a queue that is in use as part of the queue set demo to demonstrate using queue sets from an ISR. */ vQueueSetAccessQueueSetFromISR(); } @@ -413,7 +413,7 @@ signed char *pcTaskName; static portBASE_TYPE xPerformedOneShotTests = pdFALSE; xTaskHandle xTestTask; - /* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and + /* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and xTaskGetIdleTaskHandle() functions. Also try using the function that sets the task number. */ xIdleTaskHandle = xTaskGetIdleTaskHandle(); @@ -421,7 +421,7 @@ xTaskHandle xTestTask; vTaskSetTaskNumber( xIdleTaskHandle, ( unsigned long ) ucConstTaskNumber ); configASSERT( uxTaskGetTaskNumber( xIdleTaskHandle ) == ucConstTaskNumber ); - /* This is the idle hook, so the current task handle should equal the + /* This is the idle hook, so the current task handle should equal the returned idle task handle. */ if( xTaskGetCurrentTaskHandle() != xIdleTaskHandle ) { @@ -502,7 +502,7 @@ unsigned portBASE_TYPE uxReturn, x; { /* Ask how many messages are available... */ uxReturn = uxQueueMessagesWaiting( xQueue ); - + /* Check the number of messages being reported as being available is as expected, and force an assert if not. */ if( uxReturn != x ) @@ -514,7 +514,7 @@ unsigned portBASE_TYPE uxReturn, x; /* Ask how many spaces remain in the queue... */ uxReturn = uxQueueSpacesAvailable( xQueue ); - + /* Check the number of spaces being reported as being available is as expected, and force an assert if not. */ if( uxReturn != ( uxQueueLength - x ) ) @@ -536,7 +536,7 @@ unsigned portBASE_TYPE uxReturn, x; } uxReturn = uxQueueSpacesAvailable( xQueue ); - + if( uxReturn != 0 ) { configASSERT( xQueue == NULL ); diff --git a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c index 67a6cb423..5c78ce96e 100644 --- a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c +++ b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c @@ -153,14 +153,14 @@ void vStartRecursiveMutexTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" ); + vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" ); if( xMutex != NULL ) { - xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); - xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); - xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle ); + xTaskCreate( prvRecursiveMutexControllingTask, "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); + xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); + xTaskCreate( prvRecursiveMutexPollingTask, "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, &xPollingTaskHandle ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/WIN32-MingW/main.c b/FreeRTOS/Demo/WIN32-MingW/main.c index d09adb4d8..d11c74d45 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main.c +++ b/FreeRTOS/Demo/WIN32-MingW/main.c @@ -105,7 +105,7 @@ mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two. The simply blinky demo is implemented and described in main_blinky.c. The more comprehensive test and demo application is implemented and described in main_full.c. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 +#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1 /* * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. @@ -143,19 +143,17 @@ static portBASE_TYPE xTraceRunning = pdTRUE; /*-----------------------------------------------------------*/ - int main( void ) { /* Initialise the trace recorder and create the label used to post user events to the trace recording on each tick interrupt. */ vTraceInitTraceData(); - printf( "Trace started. Hit a key to dump trace file to disk. Note stdin does not work when using the Eclipse console with MingW.\r\n" ); - fflush( stdout ); - xTickTraceUserEvent = xTraceOpenLabel( "tick" ); /* Start the trace recording - the recording is written to a file if configASSERT() is called. */ + printf( "\r\nTrace started. Hit a key to dump trace file to disk (does not work from Eclipse console).\r\n" ); + fflush( stdout ); uiTraceStart(); /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top @@ -203,7 +201,7 @@ void vApplicationIdleHook( void ) memory allocated by the kernel to any task that has since been deleted. */ /* The trace can be stopped with any key press. */ - if( kbhit() != pdFALSE ) + if( _kbhit() != pdFALSE ) { if( xTraceRunning == pdTRUE ) { @@ -260,6 +258,8 @@ void vApplicationTickHook( void ) void vAssertCalled( unsigned long ulLine, const char * const pcFileName ) { +static portBASE_TYPE xPrinted = pdFALSE; + /* Parameters are not used. */ ( void ) ulLine; ( void ) pcFileName; @@ -268,10 +268,14 @@ void vAssertCalled( unsigned long ulLine, const char * const pcFileName ) __asm volatile( "int $3" ); /* Stop the trace recording. */ - if( xTraceRunning == pdTRUE ) + if( xPrinted == pdFALSE ) { + xPrinted = pdTRUE; + if( xTraceRunning == pdTRUE ) + { vTraceStop(); prvSaveTraceFile(); + } } taskENABLE_INTERRUPTS(); @@ -289,11 +293,9 @@ FILE* pxOutputFile; fwrite( RecorderDataPtr, sizeof( RecorderDataType ), 1, pxOutputFile ); fclose( pxOutputFile ); printf( "\r\nTrace output saved to Trace.dump\r\n" ); - fflush( stdout ); } else { printf( "\r\nFailed to create trace dump file\r\n" ); - fflush( stdout ); } } diff --git a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c index bc4191140..4a85834f9 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c +++ b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c @@ -165,13 +165,13 @@ void main_blinky( void ) /* Start the two tasks as described in the comments at the top of this file. */ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ + "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ NULL ); /* The task handle is not required, so NULL is passed. */ - xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); + xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/WIN32-MingW/main_full.c b/FreeRTOS/Demo/WIN32-MingW/main_full.c index 75098dc0b..22c81055f 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main_full.c +++ b/FreeRTOS/Demo/WIN32-MingW/main_full.c @@ -181,7 +181,7 @@ static xSemaphoreHandle xMutexToDelete = NULL; int main_full( void ) { /* Start the check task as described at the top of this file. */ - xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); @@ -196,7 +196,7 @@ int main_full( void ) vStartDynamicPriorityTasks(); vStartQueueSetTasks(); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); - xTaskCreate( prvDemoQueueSpaceFunctions, ( signed char * ) "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); vStartEventGroupTasks(); #if( configUSE_PREEMPTION != 0 ) @@ -410,7 +410,7 @@ static void prvDemonstrateTaskStateAndHandleGetFunctions( void ) { xTaskHandle xIdleTaskHandle, xTimerTaskHandle; const unsigned char ucConstTaskNumber = 0x55U; -signed char *pcTaskName; +char *pcTaskName; static portBASE_TYPE xPerformedOneShotTests = pdFALSE; xTaskHandle xTestTask; @@ -457,7 +457,7 @@ xTaskHandle xTestTask; xPerformedOneShotTests = pdTRUE; /* Create a test task to use to test other eTaskStateGet() return values. */ - if( xTaskCreate( prvTestTask, ( const signed char * const ) "Test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTestTask ) == pdPASS ) + if( xTaskCreate( prvTestTask, "Test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTestTask ) == pdPASS ) { /* If this task is running, the test task must be in the ready state. */ if( eTaskStateGet( xTestTask ) != eReady ) diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c index 2a8ee1c37..b9505cf6a 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -63,9 +63,9 @@ 1 tab == 4 spaces! */ -/* +/* NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used. @@ -74,7 +74,7 @@ /* * Program entry point. - * + * * main() is responsible for setting up the microcontroller peripherals, then * starting the demo application tasks. Once the tasks have been created the * scheduler is started and main() should never complete. @@ -144,7 +144,7 @@ /* * The Olimex demo board has a single built in LED. This function simply - * toggles its state. + * toggles its state. */ void prvToggleOnBoardLED( void ); @@ -159,7 +159,7 @@ static void prvSetupHardware( void ); static void prvErrorChecks( void *pvParameters ); /* - * Return true if the demo tasks are executing without error - otherwise + * Return true if the demo tasks are executing without error - otherwise * return false. */ static void prvMainCheckOtherTasksAreStillRunning( void ); @@ -170,14 +170,14 @@ long lErrorInTask = pdFALSE; /* * Application entry point: - * Starts all the other tasks, then starts the scheduler. + * Starts all the other tasks, then starts the scheduler. */ int main( void ) { /* Setup the hardware for use with the Olimex demo board. */ prvSetupHardware(); - /* Start the standard flash tasks so the WEB server is not the only thing + /* Start the standard flash tasks so the WEB server is not the only thing running. */ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartSemaphoreTasks( tskIDLE_PRIORITY ); @@ -187,13 +187,13 @@ int main( void ) vStartIntegerMathTasks( tskIDLE_PRIORITY ); /* Start the WEB server task and the error check task. */ - xTaskCreate( vHTTPServerTask, ( signed char * ) "HTTP", configMINIMAL_STACK_SIZE, NULL, mainHTTP_TASK_PRIORITY, NULL ); - xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainERROR_CHECK_PRIORITY, NULL ); - + xTaskCreate( vHTTPServerTask, "HTTP", configMINIMAL_STACK_SIZE, NULL, mainHTTP_TASK_PRIORITY, NULL ); + xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainERROR_CHECK_PRIORITY, NULL ); + /* Now all the tasks have been started - start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used. */ @@ -211,8 +211,8 @@ static void prvSetupHardware( void ) SCB_MEMMAP = 2; #endif - /* Set all GPIO to output other than the P0.14 (BSL), and the JTAG pins. - The JTAG pins are left as input as I'm not sure what will happen if the + /* Set all GPIO to output other than the P0.14 (BSL), and the JTAG pins. + The JTAG pins are left as input as I'm not sure what will happen if the Wiggler is connected after powerup - not that it would be a good idea to do that anyway. */ GPIO_IODIR = ~( mainJTAG_PORT ); @@ -297,7 +297,7 @@ unsigned long ulState; else { GPIO_IOSET = mainON_BOARD_LED_BIT; - } + } } /*-----------------------------------------------------------*/ @@ -311,7 +311,7 @@ portTickType xDelay = mainNO_ERROR_DELAY; for( ;; ) { /* How long we delay depends on whether an error has been detected - or not. Therefore the flash rate of the on board LED indicates + or not. Therefore the flash rate of the on board LED indicates whether or not an error has occurred. */ vTaskDelay( xDelay ); diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c index b6a167bc8..87af91a4b 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -63,11 +63,11 @@ 1 tab == 4 spaces! */ -/* +/* * Very simple task that responds with a single WEB page to http requests. * - * The WEB page displays task and system status. A semaphore is used to - * wake the task when there is processing to perform as determined by the + * The WEB page displays task and system status. A semaphore is used to + * wake the task when there is processing to perform as determined by the * interrupts generated by the Ethernet interface. */ @@ -131,7 +131,7 @@ static void prvHTTPInit( void ); static void prvNetifInit( void ); /* - * Generate the dynamic components of the served WEB page and transmit the + * Generate the dynamic components of the served WEB page and transmit the * entire page through the socket. */ static void prvTransmitHTTP( unsigned char socket ); @@ -181,17 +181,17 @@ unsigned char ucState; if( ( sLen = select( i, SEL_RECV ) ) > 0 ) { - if( sLen > httpSOCKET_BUFFER_SIZE ) + if( sLen > httpSOCKET_BUFFER_SIZE ) { sLen = httpSOCKET_BUFFER_SIZE; } disable(); - - sLen = recv( i, ucSocketBuffer, sLen ); + + sLen = recv( i, ucSocketBuffer, sLen ); if( ucConnection[ i ] == 1 ) - { + { /* This is our first time processing a HTTP request on this connection. */ prvTransmitHTTP( i ); @@ -245,7 +245,7 @@ static void prvNetifInit( void ) /* See definition of 'sysinit' in socket.c - 8 KB transmit buffer, and 8 KB receive buffer available. These buffers are shared by all 4 channels. - - (0x55, 0x55) configures the send and receive buffers at + - (0x55, 0x55) configures the send and receive buffers at httpSOCKET_BUFFER_SIZE bytes for each of the 4 channels. */ sysinit( 0x55, 0x55 ); } @@ -260,7 +260,7 @@ extern short usCheckStatus; send( socket, ( unsigned char * ) HTML_OUTPUT_BEGIN, strlen( HTML_OUTPUT_BEGIN ) ); /* Generate then send the table showing the status of each task. */ - vTaskList( ucSocketBuffer ); + vTaskList( ( char * ) ucSocketBuffer ); send( socket, ( unsigned char * ) ucSocketBuffer, strlen( ucSocketBuffer ) ); /* Send the number of times the idle task has looped. */ @@ -271,7 +271,7 @@ extern short usCheckStatus; sprintf( ucSocketBuffer, "The tick count is 0x%08lx
", xTaskGetTickCount() ); send( socket, ( unsigned char * ) ucSocketBuffer, strlen( ucSocketBuffer ) ); - /* Show a message indicating whether or not the check task has discovered + /* Show a message indicating whether or not the check task has discovered an error in any of the standard demo tasks. */ if( usCheckStatus == 0 ) { diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c index 79c40ef90..504a4e2aa 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -84,18 +84,18 @@ static void vLCDTask( void *pvParameters ); */ static void prvSetupLCD( void ); -/* - * Move to the first (0) or second (1) row of the LCD. +/* + * Move to the first (0) or second (1) row of the LCD. */ static void prvLCDGotoRow( unsigned portSHORT usRow ); -/* - * Write a string of text to the LCD. +/* + * Write a string of text to the LCD. */ static void prvLCDPutString( portCHAR *pcString ); -/* - * Clear the LCD. +/* + * Clear the LCD. */ static void prvLCDClear( void ); @@ -115,25 +115,25 @@ static void prvLCDClear( void ); #define PMAEN *( ( unsigned short * ) 0x60c ) /* LCD R/W signal. */ -#define lcdRW LATDbits.LATD5 +#define lcdRW LATDbits.LATD5 /* LCD lcdRS signal. */ -#define lcdRS LATBbits.LATB15 +#define lcdRS LATBbits.LATB15 /* LCD lcdE signal . */ -#define lcdE LATDbits.LATD4 +#define lcdE LATDbits.LATD4 /* Control signal pin direction. */ -#define RW_TRIS TRISDbits.TRISD5 +#define RW_TRIS TRISDbits.TRISD5 #define RS_TRIS TRISBbits.TRISB15 #define E_TRIS TRISDbits.TRISD4 /* Port for LCD data */ -#define lcdDATA LATE +#define lcdDATA LATE #define lcdDATAPORT PORTE /* I/O setup for data Port. */ -#define TRISDATA TRISE +#define TRISDATA TRISE /* The length of the queue used to send messages to the LCD gatekeeper task. */ #define lcdQUEUE_SIZE 3 @@ -155,7 +155,7 @@ xQueueHandle xStartLCDTask( void ) /* Start the task that will write to the LCD. The LCD hardware is initialised from within the task itself so delays can be used. */ - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); + xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); return xLCDQueue; } @@ -174,20 +174,20 @@ static void prvLCDGotoRow( unsigned portSHORT usRow ) } /*-----------------------------------------------------------*/ -static void prvLCDCommand( portCHAR cCommand ) +static void prvLCDCommand( portCHAR cCommand ) { /* Prepare RD0 - RD7. */ - lcdDATA &= 0xFF00; + lcdDATA &= 0xFF00; /* Command byte to lcd. */ - lcdDATA |= cCommand; + lcdDATA |= cCommand; /* Ensure lcdRW is 0. */ - lcdRW = 0; + lcdRW = 0; lcdRS = 0; /* Toggle lcdE line. */ - lcdE = 1; + lcdE = 1; vTaskDelay( lcdVERY_SHORT_DELAY ); lcdE = 0; @@ -198,26 +198,26 @@ static void prvLCDCommand( portCHAR cCommand ) static void prvLCDData( portCHAR cChar ) { /* ensure lcdRW is 0. */ - lcdRW = 0; + lcdRW = 0; /* Assert register select to 1. */ - lcdRS = 1; + lcdRS = 1; /* Prepare RD0 - RD7. */ - lcdDATA &= 0xFF00; + lcdDATA &= 0xFF00; /* Data byte to lcd. */ - lcdDATA |= cChar; - lcdE = 1; + lcdDATA |= cChar; + lcdE = 1; Nop(); Nop(); Nop(); /* Toggle lcdE signal. */ - lcdE = 0; + lcdE = 0; /* Negate register select to 0. */ - lcdRS = 0; + lcdRS = 0; vTaskDelay( lcdVERY_SHORT_DELAY ); } @@ -245,83 +245,83 @@ static void prvSetupLCD( void ) { /* Wait for proper power up. */ vTaskDelay( lcdLONG_DELAY ); - + /* Set initial states for the data and control pins */ - LATE &= 0xFF00; + LATE &= 0xFF00; /* R/W state set low. */ - lcdRW = 0; + lcdRW = 0; /* lcdRS state set low. */ - lcdRS = 0; + lcdRS = 0; /* lcdE state set low. */ - lcdE = 0; + lcdE = 0; /* Set data and control pins to outputs */ TRISE &= 0xFF00; /* lcdRW pin set as output. */ - RW_TRIS = 0; + RW_TRIS = 0; /* lcdRS pin set as output. */ - RS_TRIS = 0; + RS_TRIS = 0; /* lcdE pin set as output. */ - E_TRIS = 0; + E_TRIS = 0; /* 1st LCD initialization sequence */ lcdDATA &= 0xFF00; lcdDATA |= 0x0038; - lcdE = 1; + lcdE = 1; Nop(); Nop(); Nop(); /* Toggle lcdE signal. */ - lcdE = 0; + lcdE = 0; vTaskDelay( lcdSHORT_DELAY ); vTaskDelay( lcdSHORT_DELAY ); vTaskDelay( lcdSHORT_DELAY ); - + /* 2nd LCD initialization sequence */ lcdDATA &= 0xFF00; lcdDATA |= 0x0038; - lcdE = 1; + lcdE = 1; + Nop(); Nop(); Nop(); - Nop(); /* Toggle lcdE signal. */ - lcdE = 0; + lcdE = 0; vTaskDelay( lcdSHORT_DELAY ); /* 3rd LCD initialization sequence */ lcdDATA &= 0xFF00; lcdDATA |= 0x0038; - lcdE = 1; + lcdE = 1; + Nop(); Nop(); Nop(); - Nop(); /* Toggle lcdE signal. */ - lcdE = 0; + lcdE = 0; vTaskDelay( lcdSHORT_DELAY ); /* Function set. */ - prvLCDCommand( 0x38 ); + prvLCDCommand( 0x38 ); /* Display on/off control, cursor blink off (0x0C). */ - prvLCDCommand( 0x0C ); + prvLCDCommand( 0x0C ); /* Entry mode set (0x06). */ - prvLCDCommand( 0x06 ); + prvLCDCommand( 0x06 ); - prvLCDCommand( lcdCLEAR ); + prvLCDCommand( lcdCLEAR ); } /*-----------------------------------------------------------*/ @@ -351,9 +351,9 @@ unsigned portSHORT usRow = 0; usRow++; prvLCDPutString( xMessage.pcMessage ); - /* Delay the requested amount of time to ensure the text just written + /* Delay the requested amount of time to ensure the text just written to the LCD is not overwritten. */ - vTaskDelay( xMessage.xMinDisplayTime ); + vTaskDelay( xMessage.xMinDisplayTime ); } } diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/main.c b/FreeRTOS/Demo/dsPIC_MPLAB/main.c index e67d69f3a..3703ff89c 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/main.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -70,27 +70,27 @@ * defined and/or created within this file: * * "Fast Interrupt Test" - A high frequency periodic interrupt is generated - * using a free running timer to demonstrate the use of the - * configKERNEL_INTERRUPT_PRIORITY configuration constant. The interrupt + * using a free running timer to demonstrate the use of the + * configKERNEL_INTERRUPT_PRIORITY configuration constant. The interrupt * service routine measures the number of processor clocks that occur between - * each interrupt - and in so doing measures the jitter in the interrupt - * timing. The maximum measured jitter time is latched in the usMaxJitter - * variable, and displayed on the LCD by the 'Check' as described below. - * The fast interrupt is configured and handled in the timer_test.c source + * each interrupt - and in so doing measures the jitter in the interrupt + * timing. The maximum measured jitter time is latched in the usMaxJitter + * variable, and displayed on the LCD by the 'Check' as described below. + * The fast interrupt is configured and handled in the timer_test.c source * file. * * "LCD" task - the LCD task is a 'gatekeeper' task. It is the only task that * is permitted to access the LCD directly. Other tasks wishing to write a - * message to the LCD send the message on a queue to the LCD task instead of - * accessing the LCD themselves. The LCD task just blocks on the queue waiting + * message to the LCD send the message on a queue to the LCD task instead of + * accessing the LCD themselves. The LCD task just blocks on the queue waiting * for messages - waking and displaying the messages as they arrive. The LCD - * task is defined in lcd.c. - * - * "Check" task - This only executes every three seconds but has the highest - * priority so is guaranteed to get processor time. Its main function is to + * task is defined in lcd.c. + * + * "Check" task - This only executes every three seconds but has the highest + * priority so is guaranteed to get processor time. Its main function is to * check that all the standard demo tasks are still operational. Should any * unexpected behaviour within a demo task be discovered the 'check' task will - * write "FAIL #n" to the LCD (via the LCD task). If all the demo tasks are + * write "FAIL #n" to the LCD (via the LCD task). If all the demo tasks are * executing with their expected behaviour then the check task writes the max * jitter time to the LCD (again via the LCD task), as described above. */ @@ -177,14 +177,14 @@ int main( void ) prvSetupHardware(); /* Create the standard demo tasks. */ - vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); + vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vCreateBlockTimeTasks(); /* Create the test tasks defined within this file. */ - xTaskCreate( vCheckTask, ( signed char * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the task that will control the LCD. This returns the handle to the queue used to write text out to the task. */ @@ -211,7 +211,7 @@ static void prvSetupHardware( void ) static void vCheckTask( void *pvParameters ) { /* Used to wake the task at the correct frequency. */ -portTickType xLastExecutionTime; +portTickType xLastExecutionTime; /* The maximum jitter time measured by the fast interrupt test. */ extern unsigned short usMaxJitter ; @@ -244,7 +244,7 @@ unsigned short usErrorDetected = pdFALSE; usErrorDetected = pdTRUE; sprintf( cStringBuffer, "FAIL #1" ); } - + if( xAreComTestTasksStillRunning() != pdTRUE ) { usErrorDetected = pdTRUE; diff --git a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/BasicWEB/BasicWEB.c b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/BasicWEB/BasicWEB.c index 80a381ed7..d1e85ef49 100644 --- a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/BasicWEB/BasicWEB.c +++ b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/BasicWEB/BasicWEB.c @@ -186,7 +186,7 @@ static unsigned portLONG ulPageHits = 0; strcat( cDynamicPage, "

Task          State  Priority  Stack	#
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed portCHAR * ) cDynamicPage + strlen( cDynamicPage ) ); + vTaskList( cDynamicPage + strlen( cDynamicPage ) ); /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); diff --git a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/ethernetif.c b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/ethernetif.c index a262771f2..7e25cb3eb 100644 --- a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/ethernetif.c +++ b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/ethernetif.c @@ -101,7 +101,7 @@ low_level_init(struct netif *netif) vTaskPrioritySet( NULL, uxPriority ); /* Create the task that handles the MACB. */ - // xTaskCreate( ethernetif_input, ( signed portCHAR * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); + // xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); sys_thread_new( ethernetif_input, NULL, netifINTERFACE_TASK_PRIORITY ); } diff --git a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/sys_arch.c b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/sys_arch.c index 95fc2649a..ae1979caa 100644 --- a/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/sys_arch.c +++ b/FreeRTOS/Demo/lwIP_AVR32_UC3/NETWORK/lwip-port/AT32UC3A/sys_arch.c @@ -64,7 +64,7 @@ #define archMESG_QUEUE_LENGTH ( 6 ) #define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 ) -struct timeoutlist +struct timeoutlist { struct sys_timeouts timeouts; xTaskHandle pid; @@ -110,7 +110,7 @@ sys_mbox_free(sys_mbox_t mbox) // Posts the "msg" to the mailbox. void sys_mbox_post(sys_mbox_t mbox, void *data) -{ +{ xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) ); } @@ -129,7 +129,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data) timeout. Note that a function with a similar name, sys_mbox_fetch(), is - implemented by lwIP. + implemented by lwIP. */ u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout) { @@ -142,7 +142,7 @@ portTickType StartTime, EndTime, Elapsed; { msg = &dummyptr; } - + if( timeout != 0 ) { if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) ) @@ -254,7 +254,7 @@ portTickType StartTime, EndTime, Elapsed; } return ( Elapsed ); // return time blocked - + } } @@ -300,7 +300,7 @@ sys_init(void) each thread has a list of timeouts which is represented as a linked list of sys_timeout structures. The sys_timeouts structure holds a pointer to a linked list of timeouts. This function is called by - the lwIP timeout scheduler and must not return a NULL value. + the lwIP timeout scheduler and must not return a NULL value. In a single threaded sys_arch implementation, this function will simply return a pointer to a global sys_timeouts variable stored in @@ -311,7 +311,7 @@ sys_arch_timeouts(void) { int i; xTaskHandle pid; -struct timeoutlist *tl; +struct timeoutlist *tl; pid = xTaskGetCurrentTaskHandle( ); @@ -338,7 +338,7 @@ struct timeoutlist *tl; /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ -// TBD +// TBD /*-----------------------------------------------------------------------------------*/ /* Starts a new thread with priority "prio" that will begin its execution in the @@ -354,30 +354,30 @@ static int iCall = 0; if( thread == ethernetif_input ) { - result = xTaskCreate( thread, ( signed portCHAR * ) "ETHINT", netifINTERFACE_TASK_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "ETHINT", netifINTERFACE_TASK_STACK_SIZE, arg, prio, &CreatedTask ); } else if( iCall == 0 ) { /* The first time this is called we are creating the lwIP handler. */ - result = xTaskCreate( thread, ( signed portCHAR * ) "lwIP", lwipINTERFACE_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "lwIP", lwipINTERFACE_STACK_SIZE, arg, prio, &CreatedTask ); iCall++; } #if (HTTP_USED == 1) else if (thread == vBasicWEBServer) { - result = xTaskCreate( thread, ( signed portCHAR * ) "WEB", lwipBASIC_WEB_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "WEB", lwipBASIC_WEB_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); } #endif #if (TFTP_USED == 1) else if (thread == vBasicTFTPServer) { - result = xTaskCreate( thread, ( signed portCHAR * ) "TFTP", lwipBASIC_TFTP_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "TFTP", lwipBASIC_TFTP_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); } #endif #if (SMTP_USED == 1) else if (thread == vBasicSMTPClient) { - result = xTaskCreate( thread, ( signed portCHAR * ) "SMTP", lwipBASIC_SMTP_CLIENT_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "SMTP", lwipBASIC_SMTP_CLIENT_STACK_SIZE, arg, prio, &CreatedTask ); } #endif @@ -422,7 +422,7 @@ sys_prot_t sys_arch_protect(void) an operating system. */ void sys_arch_unprotect(sys_prot_t pval) -{ +{ ( void ) pval; vPortExitCritical(); } diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c index 7535797ea..8c9572096 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -75,7 +75,7 @@ /* Changes from V3.2.2 - + Changed the page returned by the lwIP WEB server demo to display the + + Changed the page returned by the lwIP WEB server demo to display the task status table rather than the TCP/IP statistics. */ @@ -94,9 +94,9 @@ #include "SAM7_EMAC.h" /* lwIP includes. */ -#include "lwip/api.h" +#include "lwip/api.h" #include "lwip/tcpip.h" -#include "lwip/memp.h" +#include "lwip/memp.h" #include "lwip/stats.h" #include "netif/loopif.h" @@ -127,13 +127,13 @@ /*------------------------------------------------------------*/ -/* +/* * Process an incoming connection on port 80. * * This simply checks to see if the incoming data contains a GET request, and * if so sends back a single dynamically created page. The connection is then - * closed. A more complete implementation could create a task for each - * connection. + * closed. A more complete implementation could create a task for each + * connection. */ static void vProcessConnection( struct netconn *pxNetCon ); @@ -153,8 +153,8 @@ static unsigned long ulPageHits = 0; if( pxRxBuffer != NULL ) { /* Where is the data? */ - netbuf_data( pxRxBuffer, ( void * ) &pcRxString, &usLength ); - + netbuf_data( pxRxBuffer, ( void * ) &pcRxString, &usLength ); + /* Is this a GET? We don't handle anything else. */ if( !strncmp( pcRxString, "GET", 3 ) ) { @@ -175,14 +175,14 @@ static unsigned long ulPageHits = 0; strcat( cDynamicPage, cPageHits ); strcat( cDynamicPage, "

Task          State  Priority  Stack	#
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed char * ) cDynamicPage + strlen( cDynamicPage ) ); + vTaskList( cDynamicPage + strlen( cDynamicPage ) ); /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); /* Write out the dynamically generated page. */ netconn_write(pxNetCon, cDynamicPage, (u16_t)strlen( cDynamicPage ), NETCONN_COPY ); } - + netbuf_delete( pxRxBuffer ); } @@ -194,9 +194,9 @@ void vlwIPInit( void ) { /* Initialize lwIP and its interface layer. */ sys_init(); - mem_init(); + mem_init(); memp_init(); - pbuf_init(); + pbuf_init(); netif_init(); ip_init(); tcpip_init( NULL, NULL ); @@ -225,7 +225,7 @@ static struct netif EMAC_if; /* bring it up */ netif_set_up(&EMAC_if); - + /* Create a new tcp connection handle */ pxHTTPListener = netconn_new( NETCONN_TCP ); diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c index 4d39c37cd..10f3a2d8d 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, @@ -11,21 +11,21 @@ * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. - * + * * Author: Adam Dunkels * */ @@ -40,7 +40,7 @@ #define archMESG_QUEUE_LENGTH ( 6 ) #define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 ) -struct timeoutlist +struct timeoutlist { struct sys_timeouts timeouts; xTaskHandle pid; @@ -84,14 +84,14 @@ sys_mbox_free(sys_mbox_t mbox) __asm volatile ( "NOP" ); } - vQueueDelete( mbox ); + vQueueDelete( mbox ); } /*-----------------------------------------------------------------------------------*/ // Posts the "msg" to the mailbox. void sys_mbox_post(sys_mbox_t mbox, void *data) -{ +{ xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) ); } @@ -110,7 +110,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data) timeout. Note that a function with a similar name, sys_mbox_fetch(), is - implemented by lwIP. + implemented by lwIP. */ u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout) { @@ -123,7 +123,7 @@ portTickType StartTime, EndTime, Elapsed; { msg = &dummyptr; } - + if( timeout != 0 ) { if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) ) @@ -154,7 +154,7 @@ portTickType StartTime, EndTime, Elapsed; { Elapsed = 1; } - return ( Elapsed ); // return time blocked TBD test + return ( Elapsed ); // return time blocked TBD test } } @@ -217,7 +217,7 @@ portTickType StartTime, EndTime, Elapsed; { Elapsed = 1; } - return (Elapsed); // return time blocked TBD test + return (Elapsed); // return time blocked TBD test } else { @@ -237,8 +237,8 @@ portTickType StartTime, EndTime, Elapsed; Elapsed = 1; } - return ( Elapsed ); // return time blocked - + return ( Elapsed ); // return time blocked + } } @@ -255,7 +255,7 @@ sys_sem_signal(sys_sem_t sem) void sys_sem_free(sys_sem_t sem) { - vQueueDelete( sem ); + vQueueDelete( sem ); } /*-----------------------------------------------------------------------------------*/ @@ -283,7 +283,7 @@ sys_init(void) each thread has a list of timeouts which is represented as a linked list of sys_timeout structures. The sys_timeouts structure holds a pointer to a linked list of timeouts. This function is called by - the lwIP timeout scheduler and must not return a NULL value. + the lwIP timeout scheduler and must not return a NULL value. In a single threaded sys_arch implementation, this function will simply return a pointer to a global sys_timeouts variable stored in @@ -294,14 +294,14 @@ sys_arch_timeouts(void) { int i; xTaskHandle pid; -struct timeoutlist *tl; +struct timeoutlist *tl; - pid = xTaskGetCurrentTaskHandle( ); + pid = xTaskGetCurrentTaskHandle( ); - for(i = 0; i < nextthread; i++) + for(i = 0; i < nextthread; i++) { tl = &timeoutlist[i]; - if(tl->pid == pid) + if(tl->pid == pid) { return &(tl->timeouts); } @@ -313,7 +313,7 @@ struct timeoutlist *tl; /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ -// TBD +// TBD /*-----------------------------------------------------------------------------------*/ /* Starts a new thread with priority "prio" that will begin its execution in the @@ -330,12 +330,12 @@ static int iCall = 0; if( iCall == 0 ) { /* The first time this is called we are creating the lwIP handler. */ - result = xTaskCreate( thread, ( signed char * ) "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask ); iCall++; } else { - result = xTaskCreate( thread, ( signed char * ) "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); } // For each task created, store the task handle (pid) in the timers array. @@ -378,7 +378,7 @@ sys_prot_t sys_arch_protect(void) an operating system. */ void sys_arch_unprotect(sys_prot_t pval) -{ +{ ( void ) pval; vPortExitCritical(); } diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c index 90478a6ef..85e6c564d 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c @@ -91,8 +91,8 @@ unsigned portBASE_TYPE uxPriority; xNetIf = netif; - /* Initialise the EMAC. This routine contains code that polls status bits. - If the Ethernet cable is not plugged in then this can take a considerable + /* Initialise the EMAC. This routine contains code that polls status bits. + If the Ethernet cable is not plugged in then this can take a considerable time. To prevent this starving lower priority tasks of processing time we lower our priority prior to the call, then raise it back again once the initialisation is complete. */ @@ -105,13 +105,13 @@ unsigned portBASE_TYPE uxPriority; vTaskPrioritySet( NULL, uxPriority ); /* Create the task that handles the EMAC. */ - xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); + xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ /* - * low_level_output(): Should do the actual transmission of the packet. The - * packet is contained in the pbuf that is passed to the function. This pbuf + * low_level_output(): Should do the actual transmission of the packet. The + * packet is contained in the pbuf that is passed to the function. This pbuf * might be chained. */ static err_t low_level_output( struct netif *netif, struct pbuf *p ) @@ -137,8 +137,8 @@ err_t xReturn = ERR_OK; { for( q = p; q != NULL; q = q->next ) { - /* Send the data from the pbuf to the interface, one pbuf at a - time. The size of the data in each pbuf is kept in the ->len + /* Send the data from the pbuf to the interface, one pbuf at a + time. The size of the data in each pbuf is kept in the ->len variable. if q->next == NULL then this is the last pbuf in the chain. */ if( !lEMACSend( q->payload, q->len, ( q->next == NULL ) ) ) @@ -149,7 +149,7 @@ err_t xReturn = ERR_OK; xSemaphoreGive( xTxSemaphore ); } - + #if ETH_PAD_SIZE pbuf_header( p, ETH_PAD_SIZE ); /* reclaim the padding word */ @@ -164,8 +164,8 @@ err_t xReturn = ERR_OK; /*-----------------------------------------------------------*/ /* - * low_level_input(): Should allocate a pbuf and transfer the bytes of the - * incoming packet from the interface into the pbuf. + * low_level_input(): Should allocate a pbuf and transfer the bytes of the + * incoming packet from the interface into the pbuf. */ static struct pbuf *low_level_input( struct netif *netif ) { @@ -186,34 +186,34 @@ static xSemaphoreHandle xRxSemaphore = NULL; { /* Obtain the size of the packet. */ len = ulEMACInputLength(); - + if( len ) { #if ETH_PAD_SIZE len += ETH_PAD_SIZE; /* allow room for Ethernet padding */ #endif - + /* We allocate a pbuf chain of pbufs from the pool. */ p = pbuf_alloc( PBUF_RAW, len, PBUF_POOL ); - + if( p != NULL ) { #if ETH_PAD_SIZE pbuf_header( p, -ETH_PAD_SIZE ); /* drop the padding word */ #endif - + /* Let the driver know we are going to read a new packet. */ vEMACRead( NULL, 0, len ); - + /* We iterate over the pbuf chain until we have read the entire - packet into the pbuf. */ + packet into the pbuf. */ for( q = p; q != NULL; q = q->next ) { - /* Read enough bytes to fill this pbuf in the chain. The + /* Read enough bytes to fill this pbuf in the chain. The available data in the pbuf is given by the q->len variable. */ vEMACRead( q->payload, q->len, len ); } - + #if ETH_PAD_SIZE pbuf_header( p, ETH_PAD_SIZE ); /* reclaim the padding word */ #endif @@ -238,8 +238,8 @@ static xSemaphoreHandle xRxSemaphore = NULL; /*-----------------------------------------------------------*/ /* - * ethernetif_output(): This function is called by the TCP/IP stack when an - * IP packet should be sent. It calls the function called low_level_output() + * ethernetif_output(): This function is called by the TCP/IP stack when an + * IP packet should be sent. It calls the function called low_level_output() * to do the actual transmission of the packet. */ static err_t ethernetif_output( struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr ) @@ -250,8 +250,8 @@ static err_t ethernetif_output( struct netif *netif, struct pbuf *p, struct ip_a /*-----------------------------------------------------------*/ /* - * ethernetif_input(): This function should be called when a packet is ready to - * be read from the interface. It uses the function low_level_input() that + * ethernetif_input(): This function should be called when a packet is ready to + * be read from the interface. It uses the function low_level_input() that * should handle the actual reception of bytes from the network interface. */ static void ethernetif_input( void * pvParameters ) @@ -273,41 +273,41 @@ struct pbuf *p; if( p == NULL ) { - /* No packet could be read. Wait a for an interrupt to tell us + /* No packet could be read. Wait a for an interrupt to tell us there is more data available. */ vEMACWaitForInput(); } } while( p == NULL ); - + /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - + #if LINK_STATS lwip_stats.link.recv++; #endif /* LINK_STATS */ - + ethhdr = p->payload; - + switch( htons( ethhdr->type ) ) { /* IP packet? */ case ETHTYPE_IP: /* update ARP table */ etharp_ip_input( xNetIf, p ); - + /* skip Ethernet header */ pbuf_header( p, (s16_t)-sizeof(struct eth_hdr) ); - + /* pass to network layer */ xNetIf->input( p, xNetIf ); break; - + case ETHTYPE_ARP: /* pass p to ARP module */ etharp_arp_input( xNetIf, ethernetif->ethaddr, p ); break; - + default: pbuf_free( p ); p = NULL; diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c index afc5372b5..9df054763 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -63,9 +63,9 @@ 1 tab == 4 spaces! */ -/* +/* NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used. @@ -75,10 +75,10 @@ /* * Creates all the application tasks, then starts the scheduler. * - * A task defined by the function vBasicWEBServer is created. This executes + * A task defined by the function vBasicWEBServer is created. This executes * the lwIP stack and basic WEB server sample. A task defined by the function - * vUSBCDCTask. This executes the USB to serial CDC example. All the other - * tasks are from the set of standard demo tasks. The WEB documentation + * vUSBCDCTask. This executes the USB to serial CDC example. All the other + * tasks are from the set of standard demo tasks. The WEB documentation * provides more details of the standard demo application tasks. * * Main.c also creates a task called "Check". This only executes every three @@ -96,7 +96,7 @@ /* Changes from V3.2.2 - + Modified the stack sizes used by some tasks to permit use of the + + Modified the stack sizes used by some tasks to permit use of the command line GCC tools. */ @@ -119,7 +119,7 @@ #include "USB-CDC.h" /* lwIP includes. */ -#include "lwip/api.h" +#include "lwip/api.h" /* Hardware specific headers. */ #include "Board.h" @@ -194,7 +194,7 @@ int main( void ) sys_thread_new( vBasicWEBServer, ( void * ) NULL, mainWEBSERVER_PRIORITY ); /* Create the demo USB CDC task. */ - xTaskCreate( vUSBCDCTask, ( signed char * ) "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL ); + xTaskCreate( vUSBCDCTask, "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL ); /* Create the standard demo application tasks. */ vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); @@ -203,13 +203,13 @@ int main( void ) vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); - /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + /* Start the check task - which is defined in this file. */ + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - /* Finally, start the scheduler. + /* Finally, start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. - The processor MUST be in supervisor mode when vTaskStartScheduler is + The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used here. */ @@ -227,7 +227,7 @@ static void prvSetupHardware( void ) the correct default state. This line just ensures that this does not cause all interrupts to be masked at the start. */ AT91C_BASE_AIC->AIC_EOICR = 0; - + /* Most setup is performed by the low level init function called from the startup asm file. @@ -265,7 +265,7 @@ portTickType xLastWakeTime; /* Delay until it is time to execute again. The delay period is shorter following an error. */ vTaskDelayUntil( &xLastWakeTime, xDelayPeriod ); - + /* Check all the standard demo application tasks are executing without error. */ if( prvCheckOtherTasksAreStillRunning() != pdPASS ) @@ -324,7 +324,7 @@ char cTxByte; for( cTxByte = mainFIRST_TX_CHAR; cTxByte <= mainLAST_TX_CHAR; cTxByte++ ) { vUSBSendByte( cTxByte ); - } + } } } diff --git a/FreeRTOS/Demo/lwIP_MCF5235_GCC/demo.c b/FreeRTOS/Demo/lwIP_MCF5235_GCC/demo.c index f8371c309..dcb6d06d9 100644 --- a/FreeRTOS/Demo/lwIP_MCF5235_GCC/demo.c +++ b/FreeRTOS/Demo/lwIP_MCF5235_GCC/demo.c @@ -41,13 +41,13 @@ Please ensure to read the configuration and relevant port sections of the online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and + http://www.FreeRTOS.org - Documentation, latest information, license and contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety + http://www.SafeRTOS.com - A version that is certified for use in safety critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, + http://www.OpenRTOS.com - Commercial support, development, porting, licensing and training services. */ @@ -134,7 +134,7 @@ main( int argc, char *argv[] ) ( void )sys_thread_new( vBasicWEBServer, NULL, mainWEB_TASK_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed char * )"Check", 512, NULL, + xTaskCreate( vErrorChecks, "Check", 512, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. */ vTaskStartScheduler( ); @@ -156,7 +156,7 @@ portTASK_FUNCTION( vErrorChecks, pvParameters ) { ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; xCreatedTask = mainNO_TASK; - if( xTaskCreate( vMemCheckTask, ( signed char * )"MEM", + if( xTaskCreate( vMemCheckTask, "MEM", configMINIMAL_STACK_SIZE, ( void * )&ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { diff --git a/FreeRTOS/Demo/lwIP_MCF5235_GCC/web.c b/FreeRTOS/Demo/lwIP_MCF5235_GCC/web.c index 87e88d03d..209d011f9 100644 --- a/FreeRTOS/Demo/lwIP_MCF5235_GCC/web.c +++ b/FreeRTOS/Demo/lwIP_MCF5235_GCC/web.c @@ -40,13 +40,13 @@ Please ensure to read the configuration and relevant port sections of the online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and + http://www.FreeRTOS.org - Documentation, latest information, license and contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety + http://www.SafeRTOS.com - A version that is certified for use in safety critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, + http://www.OpenRTOS.com - Commercial support, development, porting, licensing and training services. */ @@ -161,7 +161,7 @@ vProcessConnection( struct netconn *pxNetCon ) strcat( cDynamicPage, "

Task          State  Priority  Stack #
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed char * )cDynamicPage + strlen( cDynamicPage ) ); + vTaskList( cDynamicPage + strlen( cDynamicPage ) ); /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); diff --git a/FreeRTOS/Demo/msp430_CrossWorks/main.c b/FreeRTOS/Demo/msp430_CrossWorks/main.c index eb341c79d..44e49044f 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/main.c +++ b/FreeRTOS/Demo/msp430_CrossWorks/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -66,23 +66,23 @@ /* * Creates all the demo application tasks, then starts the scheduler. The WEB * documentation provides more details of the demo application tasks. - * + * * This demo is configured to execute on the ES449 prototyping board from * SoftBaugh. The ES449 has a built in LCD display and a single built in user * LED. Therefore, in place of flashing an LED, the 'flash' and 'check' tasks * toggle '*' characters on the LCD. The left most '*' represents LED 0, the * next LED 1, etc. * - * Main. c also creates a task called 'Check'. This only executes every three - * seconds but has the highest priority so is guaranteed to get processor time. - * Its main function is to check that all the other tasks are still operational. - * Each task that does not flash an LED maintains a unique count that is - * incremented each time the task successfully completes its function. Should - * any error occur within such a task the count is permanently halted. The + * Main. c also creates a task called 'Check'. This only executes every three + * seconds but has the highest priority so is guaranteed to get processor time. + * Its main function is to check that all the other tasks are still operational. + * Each task that does not flash an LED maintains a unique count that is + * incremented each time the task successfully completes its function. Should + * any error occur within such a task the count is permanently halted. The * 'check' task inspects the count of each task to ensure it has changed since - * the last time the check task executed. If all the count variables have + * the last time the check task executed. If all the count variables have * changed all the tasks are still executing error free, and the check task - * toggles an LED with a three second period. Should any task contain an error + * toggles an LED with a three second period. Should any task contain an error * at any time the LED toggle rate will increase to 500ms. * * Please read the documentation for the MSP430 port available on @@ -121,10 +121,10 @@ the '*' characters on the LCD represent LED's] */ /* Baud rate used by the COM test tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 ) -/* The frequency at which the 'Check' tasks executes. See the comments at the +/* The frequency at which the 'Check' tasks executes. See the comments at the top of the page. When the system is operating error free the 'Check' task toggles an LED every three seconds. If an error is discovered in any task the -rate is increased to 500 milliseconds. [in this case the '*' characters on the +rate is increased to 500 milliseconds. [in this case the '*' characters on the LCD represent LED's]*/ #define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) #define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) @@ -136,10 +136,10 @@ LCD represent LED's]*/ #define intgCONST4 ( ( long ) 7 ) #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 ) -/* +/* * The function that implements the Check task. See the comments at the head * of the page for implementation details. - */ + */ static void vErrorChecks( void *pvParameters ); /* @@ -148,7 +148,7 @@ static void vErrorChecks( void *pvParameters ); */ static short prvCheckOtherTasksAreStillRunning( void ); -/* +/* * Perform the hardware setup required by the ES449 in order to run the demo * application. */ @@ -176,7 +176,7 @@ int main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); /* Start the 'Check' task which is defined in this file. */ - xTaskCreate( vErrorChecks, ( const signed char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -196,14 +196,14 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY; for( ;; ) { /* Wait until it is time to check again. The time we wait here depends - on whether an error has been detected or not. When an error is + on whether an error has been detected or not. When an error is detected the time is shortened resulting in a faster LED flash rate. */ vTaskDelay( xDelayPeriod ); /* See if the other tasks are all ok. */ if( prvCheckOtherTasksAreStillRunning() != pdPASS ) { - /* An error occurred in one of the tasks so shorten the delay + /* An error occurred in one of the tasks so shorten the delay period - which has the effect of increasing the frequency of the LED toggle. */ xDelayPeriod = mainERROR_CHECK_DELAY; @@ -221,7 +221,7 @@ static short sNoErrorFound = pdTRUE; static unsigned long ulLastIdleLoopCount = 0UL; /* The demo tasks maintain a count that increments every cycle of the task - provided that the task has never encountered an error. This function + provided that the task has never encountered an error. This function checks the counts maintained by the tasks to ensure they are still being incremented. A count remaining at the same value between calls therefore indicates that an error has been detected. Only tasks that do not flash @@ -255,7 +255,7 @@ static unsigned long ulLastIdleLoopCount = 0UL; { ulLastIdleLoopCount = ulIdleLoops; } - + return sNoErrorFound; } /*-----------------------------------------------------------*/ @@ -266,10 +266,10 @@ static void prvSetupHardware( void ) WDTCTL = WDTPW + WDTHOLD; /* Setup DCO+ for ( xtal * D * (N + 1) ) operation. */ - FLL_CTL0 |= DCOPLUS + XCAP18PF; + FLL_CTL0 |= DCOPLUS + XCAP18PF; /* X2 DCO frequency, 8MHz nominal DCO */ - SCFI0 |= FN_4; + SCFI0 |= FN_4; /* (121+1) x 32768 x 2 = 7.99 Mhz */ SCFQCTL = mainMAX_FREQUENCY; @@ -313,8 +313,8 @@ volatile signed portBASE_TYPE *pxTaskHasExecuted; lValue *= intgCONST3; lValue /= intgCONST4; - /* If the calculation is found to be incorrect we stop setting the - TaskHasExecuted variable so the check task can see an error has + /* If the calculation is found to be incorrect we stop setting the + TaskHasExecuted variable so the check task can see an error has occurred. */ if( lValue != intgEXPECTED_ANSWER ) /*lint !e774 volatile used to prevent this being optimised out. */ { diff --git a/FreeRTOS/Demo/msp430_IAR/main.c b/FreeRTOS/Demo/msp430_IAR/main.c index df4165a40..6998a06d5 100644 --- a/FreeRTOS/Demo/msp430_IAR/main.c +++ b/FreeRTOS/Demo/msp430_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -176,7 +176,7 @@ int main( void ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); /* Start the 'Check' task which is defined in this file. */ - xTaskCreate( vErrorChecks, ( const signed portCHAR * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); @@ -255,7 +255,7 @@ static unsigned portLONG ulLastIdleLoopCount = 0UL; { ulLastIdleLoopCount = ulIdleLoops; } - + return sNoErrorFound; } /*-----------------------------------------------------------*/ -- 2.39.5