Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.

This commit is contained in:
Richard Barry 2013-12-27 14:43:48 +00:00
parent b4116a7c7d
commit da93f1fc4b
261 changed files with 2822 additions and 2815 deletions

View file

@ -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;
}

View file

@ -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 )

View file

@ -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();