mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Replace use of legacy portTYPE macros from old demos and standard demo files.
This commit is contained in:
parent
3e20aa7d60
commit
b54158d1dc
123 changed files with 736 additions and 736 deletions
|
@ -51,15 +51,15 @@
|
|||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
|
||||
#if( BOARD==EVK1100 )
|
||||
# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )
|
||||
# define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
|
||||
|
||||
#elif( BOARD==EVK1101 )
|
||||
# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 4 )
|
||||
# define partstMAX_OUTPUT_LED ( ( unsigned char ) 4 )
|
||||
#endif
|
||||
|
||||
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
static volatile unsigned char ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -71,14 +71,14 @@ void vParTestInitialise( void )
|
|||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
unsigned char ucBit;
|
||||
|
||||
if( uxLED >= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
ucBit = ( ( unsigned char ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
@ -99,14 +99,14 @@ unsigned portCHAR ucBit;
|
|||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
unsigned char ucBit;
|
||||
|
||||
if( uxLED >= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
ucBit = ( ( unsigned char ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
//! @}
|
||||
|
||||
//! Baud rate used by the serial port tasks.
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
//! LED used by the serial port tasks. This is toggled on each character Tx,
|
||||
//! and mainCOM_TEST_LED + 1 is toggled on each character Rx.
|
||||
|
@ -157,7 +157,7 @@
|
|||
/*! \name Constants used by the vMemCheckTask() task.
|
||||
*/
|
||||
//! @{
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
//! @}
|
||||
|
||||
|
@ -244,8 +244,8 @@ int main( void )
|
|||
*/
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
static volatile unsigned portLONG ulDummyVariable = 3UL;
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
static volatile unsigned long ulDummyVariable = 3UL;
|
||||
unsigned long ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
portBASE_TYPE bSuicidalTask = 0;
|
||||
|
||||
|
@ -394,9 +394,9 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
|||
*/
|
||||
static void vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
unsigned long *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG lErrorOccurred = pdFALSE;
|
||||
static long lErrorOccurred = pdFALSE;
|
||||
|
||||
/* This task is dynamically created then deleted during each cycle of the
|
||||
vErrorChecks task to check the operation of the memory allocator. Each time
|
||||
|
@ -409,7 +409,7 @@ static portLONG lErrorOccurred = pdFALSE;
|
|||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
|
||||
pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
|
|
@ -88,9 +88,9 @@ static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength,
|
|||
static portBASE_TYPE prvUSART_ISR_NonNakedBehaviour( void )
|
||||
{
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
volatile avr32_usart_t *usart = serialPORT_USART;
|
||||
portBASE_TYPE retstatus;
|
||||
|
||||
|
@ -166,7 +166,7 @@ static void vUSART_ISR( void )
|
|||
/*
|
||||
* Init the serial port for the Minimal implementation.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
static const gpio_map_t USART_GPIO_MAP =
|
||||
{
|
||||
|
@ -184,7 +184,7 @@ int cd; /* USART Clock Divider. */
|
|||
/* Configure USART. */
|
||||
if( ( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 ) )
|
||||
( ulWantedBaud != ( unsigned long ) 0 ) )
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ int cd; /* USART Clock Divider. */
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
@ -308,9 +308,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
@ -319,7 +319,7 @@ signed portCHAR *pxNext;
|
|||
( void ) pxPort;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
|
@ -328,7 +328,7 @@ signed portCHAR *pxNext;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
volatile avr32_usart_t *usart = serialPORT_USART;
|
||||
|
||||
|
@ -362,8 +362,8 @@ void vSerialClose( xComPortHandle xPort )
|
|||
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )
|
||||
{
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue