mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.
This commit is contained in:
parent
b4116a7c7d
commit
da93f1fc4b
261 changed files with 2822 additions and 2815 deletions
|
@ -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, "<p><br>Refresh count = %d<p><br>%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, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p><p>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, "<p><br>Refresh count = %d", ( int ) lRefreshCount );
|
||||
|
||||
vTaskGetRunTimeStats( uip_appdata );
|
||||
|
||||
vTaskGetRunTimeStats( ( char * ) uip_appdata );
|
||||
strcat( uip_appdata, cCountBuf );
|
||||
|
||||
return strlen( uip_appdata );
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue