mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-29 22:48:37 -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
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue