Update a few util functions in the common demo area.

This commit is contained in:
Richard Barry 2011-08-01 08:34:05 +00:00
parent a548ef34f8
commit 1aa52c2a7a
5 changed files with 616 additions and 422 deletions

View file

@ -37,8 +37,8 @@
#include "queue.h"
#include "semphr.h"
#define SYS_MBOX_NULL (xQueueHandle)0
#define SYS_SEM_NULL (xSemaphoreHandle)0
#define SYS_MBOX_NULL ( ( xQueueHandle ) NULL )
#define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL )
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE
typedef xSemaphoreHandle sys_sem_t;
@ -46,18 +46,10 @@ typedef xSemaphoreHandle sys_mutex_t;
typedef xQueueHandle sys_mbox_t;
typedef xTaskHandle sys_thread_t;
typedef struct _sys_arch_state_t
{
// Task creation data.
char cTaskName[configMAX_TASK_NAME_LEN];
unsigned short nStackDepth;
unsigned short nTaskCount;
} sys_arch_state_t;
#define sys_mbox_valid( x ) ( (*x == NULL) ? 0 : 1 )
#define sys_mbox_set_invalid( x ) ( *x = NULL )
#define sys_sem_valid( x ) ( (*x == NULL) ? 0 : 1 )
#define sys_sem_set_invalid( x ) ( *x = NULL )
#define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE )
#define sys_mbox_set_invalid( x ) ( ( *x ) = NULL )
#define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE )
#define sys_sem_set_invalid( x ) ( ( *x ) = NULL )
#endif /* __ARCH_SYS_ARCH_H__ */