Update the demo directory to use the version 8 type naming conventions.

This commit is contained in:
Richard Barry 2014-02-11 12:04:59 +00:00
parent c6d8892b0d
commit 5a2a8fc319
639 changed files with 3127 additions and 3470 deletions

View file

@ -70,7 +70,7 @@
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
#define configMAX_TASK_NAME_LEN ( 16 )

View file

@ -93,7 +93,7 @@
#define STACK_DEFAULT ( 1024 )
/* Interval in which tasks are checked. */
#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS )
#define mainCHECK_PERIOD ( ( TickType_t ) 2000 / portTICK_PERIOD_MS )
/* Constants used by the vMemCheckTask() task. */
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
@ -147,7 +147,7 @@ static
portTASK_FUNCTION( vErrorChecks, pvParameters )
{
unsigned long ulMemCheckTaskRunningCount;
xTaskHandle xCreatedTask;
TaskHandle_t xCreatedTask;
/* The parameters are not used in this function. */
( void )pvParameters;

View file

@ -39,16 +39,16 @@
#include "semphr.h"
/* ------------------------ Defines --------------------------------------- */
#define SYS_MBOX_NULL ( xQueueHandle )0
#define SYS_MBOX_NULL ( QueueHandle_t )0
#define SYS_THREAD_NULL NULL
#define SYS_SEM_NULL ( xSemaphoreHandle )0
#define SYS_SEM_NULL ( SemaphoreHandle_t )0
#define SIO_FD_NULL ( sio_fd_t )NULL
/* ------------------------ Type definitions ------------------------------ */
typedef xSemaphoreHandle sys_sem_t;
typedef xQueueHandle sys_mbox_t;
typedef SemaphoreHandle_t sys_sem_t;
typedef QueueHandle_t sys_mbox_t;
typedef void *sys_thread_t;
/* ------------------------ Prototypes ------------------------------------ */

View file

@ -58,16 +58,16 @@
/* This is the number of threads that can be started with sys_thead_new() */
#define SYS_MBOX_SIZE ( 16 )
#define MS_TO_TICKS( ms ) \
( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS )
( TickType_t )( ( TickType_t ) ( ms ) / portTICK_PERIOD_MS )
#define TICKS_TO_MS( ticks ) \
( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )
( unsigned long )( ( TickType_t ) ( ticks ) * portTICK_PERIOD_MS )
#define THREAD_STACK_SIZE ( 1024 )
#define THREAD_NAME "lwIP"
#define THREAD_INIT( tcb ) \
do { \
tcb->next = NULL; \
tcb->pid = ( xTaskHandle )0; \
tcb->pid = ( TaskHandle_t )0; \
tcb->timeouts.next = NULL; \
} while( 0 )
@ -76,7 +76,7 @@ typedef struct sys_tcb
{
struct sys_tcb *next;
struct sys_timeouts timeouts;
xTaskHandle pid;
TaskHandle_t pid;
} sys_tcb_t;
/* ------------------------ Prototypes ------------------------------------ */
@ -232,7 +232,7 @@ sys_arch_thread_remove( sys_thread_t hdl )
{
sys_tcb_t *current = tasks, *prev;
sys_tcb_t *toremove = hdl;
xTaskHandle pid = ( xTaskHandle ) 0;
TaskHandle_t pid = ( TaskHandle_t ) 0;
LWIP_ASSERT( "sys_arch_thread_remove: assertion hdl != NULL failed!", hdl != NULL );
@ -270,7 +270,7 @@ sys_arch_thread_remove( sys_thread_t hdl )
* resources.
*/
vPortExitCritical( );
if( pid != ( xTaskHandle ) 0 )
if( pid != ( TaskHandle_t ) 0 )
{
vTaskDelete( pid );
/* not reached. */
@ -285,7 +285,7 @@ sys_thread_t
sys_arch_thread_current( void )
{
sys_tcb_t *p = tasks;
xTaskHandle pid = xTaskGetCurrentTaskHandle( );
TaskHandle_t pid = xTaskGetCurrentTaskHandle( );
vPortEnterCritical( );
while( ( p != NULL ) && ( p->pid != pid ) )
@ -325,7 +325,7 @@ sys_arch_timeouts( void )
sys_sem_t
sys_sem_new( u8_t count )
{
xSemaphoreHandle xSemaphore;
SemaphoreHandle_t xSemaphore;
vSemaphoreCreateBinary( xSemaphore );
if( xSemaphore != SYS_SEM_NULL )
@ -395,7 +395,7 @@ u32_t
sys_arch_sem_wait( sys_sem_t sem, u32_t timeout )
{
portBASE_TYPE xStatus;
portTickType xTicksStart, xTicksEnd, xTicksElapsed;
TickType_t xTicksStart, xTicksEnd, xTicksElapsed;
u32_t timespent;
LWIP_ASSERT( "sys_arch_sem_wait: sem != SYS_SEM_NULL", sem != SYS_SEM_NULL );
@ -434,7 +434,7 @@ sys_arch_sem_wait( sys_sem_t sem, u32_t timeout )
sys_mbox_t
sys_mbox_new( void )
{
xQueueHandle mbox;
QueueHandle_t mbox;
mbox = xQueueCreate( SYS_MBOX_SIZE, sizeof( void * ) );
if( mbox != SYS_MBOX_NULL )
@ -513,7 +513,7 @@ sys_arch_mbox_fetch( sys_mbox_t mbox, void **msg, u32_t timeout )
{
void *ret_msg;
portBASE_TYPE xStatus;
portTickType xTicksStart, xTicksEnd, xTicksElapsed;
TickType_t xTicksStart, xTicksEnd, xTicksElapsed;
u32_t timespent;
LWIP_ASSERT( "sys_arch_mbox_fetch: mbox != SYS_MBOX_NULL", mbox != SYS_MBOX_NULL );
@ -555,7 +555,7 @@ sys_arch_mbox_fetch( sys_mbox_t mbox, void **msg, u32_t timeout )
u32_t
sys_jiffies( void )
{
portTickType xTicks = xTaskGetTickCount( );
TickType_t xTicks = xTaskGetTickCount( );
return ( u32_t )TICKS_TO_MS( xTicks );
}

View file

@ -74,8 +74,8 @@ static void prvSerialISR( void );
typedef struct
{
portBASE_TYPE xInitialized;
xQueueHandle xRXChars;
xQueueHandle xTXChars;
QueueHandle_t xRXChars;
QueueHandle_t xTXChars;
} xComPortIF_t;
static xComPortIF_t xComPortIF[ COM_NIFACE ];
@ -145,7 +145,7 @@ xSerialPortInitMinimal( unsigned long ulWantedBaud,
signed portBASE_TYPE
xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar,
portTickType xBlockTime )
TickType_t xBlockTime )
{
int i;
portBASE_TYPE xResult = pdFALSE;
@ -189,7 +189,7 @@ vSerialPutString( xComPortHandle pxPort, const signed char *
signed portBASE_TYPE
xSerialPutChar( xComPortHandle pxPort, signed char cOutChar,
portTickType xBlockTime )
TickType_t xBlockTime )
{
int i;
portBASE_TYPE xResult = pdFALSE;