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

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