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

@ -92,7 +92,7 @@
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned long ) 96000000 )
#define configCPU_PERIPH_HZ ( ( unsigned long ) 48000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 100 )
#define configTICK_RATE_HZ ( ( TickType_t ) 100 )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 52000 )

View file

@ -400,12 +400,12 @@ void ENET_Init ()
ENET_MIIWriteReg(0x0,MAC_MII_REG_XCR, 0x8000);
/* Delay to assure PHY reset */
vTaskDelay( 3000 / portTICK_RATE_MS );
vTaskDelay( 3000 / portTICK_PERIOD_MS );
/* initialize the opearting mode */
while( ENET_SetOperatingMode() == pdFAIL )
{
vTaskDelay( 3000 / portTICK_RATE_MS );
vTaskDelay( 3000 / portTICK_PERIOD_MS );
}
/*set MAC physical*/

View file

@ -45,7 +45,7 @@
struct timeoutlist
{
struct sys_timeouts timeouts;
xTaskHandle pid;
TaskHandle_t pid;
};
/* This is the number of threads that can be started with sys_thread_new() */
@ -62,7 +62,7 @@ static sys_arch_state_t s_sys_arch_state;
sys_mbox_t
sys_mbox_new(void)
{
xQueueHandle mbox;
QueueHandle_t mbox;
mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );
@ -92,7 +92,7 @@ sys_mbox_free(sys_mbox_t mbox)
void
sys_mbox_post(sys_mbox_t mbox, void *data)
{
xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );
xQueueSend( mbox, &data, ( TickType_t ) ( archPOST_BLOCK_TIME_MS / portTICK_PERIOD_MS ) );
}
@ -115,7 +115,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data)
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)
{
void *dummyptr;
portTickType StartTime, EndTime, Elapsed;
TickType_t StartTime, EndTime, Elapsed;
StartTime = xTaskGetTickCount();
@ -164,7 +164,7 @@ portTickType StartTime, EndTime, Elapsed;
sys_sem_t
sys_sem_new(u8_t count)
{
xSemaphoreHandle xSemaphore;
SemaphoreHandle_t xSemaphore;
portENTER_CRITICAL();
vSemaphoreCreateBinary( xSemaphore );
@ -203,7 +203,7 @@ sys_sem_new(u8_t count)
u32_t
sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)
{
portTickType StartTime, EndTime, Elapsed;
TickType_t StartTime, EndTime, Elapsed;
StartTime = xTaskGetTickCount();
@ -296,7 +296,7 @@ struct sys_timeouts *
sys_arch_timeouts(void)
{
int i;
xTaskHandle pid;
TaskHandle_t pid;
struct timeoutlist *tl;
pid = xTaskGetCurrentTaskHandle( );
@ -326,7 +326,7 @@ struct timeoutlist *tl;
*/
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio)
{
xTaskHandle CreatedTask;
TaskHandle_t CreatedTask;
int result;
result = xTaskCreate(thread, s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask );

View file

@ -37,13 +37,13 @@
#include "queue.h"
#include "semphr.h"
#define SYS_MBOX_NULL (xQueueHandle)0
#define SYS_SEM_NULL (xSemaphoreHandle)0
#define SYS_MBOX_NULL (QueueHandle_t)0
#define SYS_SEM_NULL (SemaphoreHandle_t)0
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE
typedef xSemaphoreHandle sys_sem_t;
typedef xQueueHandle sys_mbox_t;
typedef xTaskHandle sys_thread_t;
typedef SemaphoreHandle_t sys_sem_t;
typedef QueueHandle_t sys_mbox_t;
typedef TaskHandle_t sys_thread_t;
typedef struct _sys_arch_state_t
{

View file

@ -77,7 +77,7 @@
#define webHTTP_PORT ( 80 )
/* Delay on close error. */
#define webSHORT_DELAY ( 10 / portTICK_RATE_MS )
#define webSHORT_DELAY ( 10 / portTICK_PERIOD_MS )
/* The IP address being used. */
#define emacIPADDR0 172

View file

@ -58,7 +58,7 @@
#define IFNAME1 'm'
/* The time to block waiting for input. */
#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 )
#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 )
/* Interrupt status bit definition. */
#define DMI_RX_CURRENT_DONE 0x8000
@ -68,7 +68,7 @@ extern u8 TxBuff[1520];
static u8_t s_rxBuff[1520];
/* The semaphore used by the ISR to wake the lwIP task. */
static xSemaphoreHandle s_xSemaphore = NULL;
static SemaphoreHandle_t s_xSemaphore = NULL;
struct ethernetif {
struct eth_addr *ethaddr;
@ -146,7 +146,7 @@ static void low_level_init(struct netif *netif)
static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
static xSemaphoreHandle xTxSemaphore = NULL;
static SemaphoreHandle_t xTxSemaphore = NULL;
struct pbuf *q;
u32_t l = 0;
@ -199,7 +199,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
static struct pbuf *
low_level_input(struct netif *netif)
{
static xSemaphoreHandle xRxSemaphore = NULL;
static SemaphoreHandle_t xRxSemaphore = NULL;
struct pbuf *p, *q;
u16_t len, l;

View file

@ -143,9 +143,9 @@
#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
/* Delays used by the various tasks defined in this file. */
#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
#define mainSTRING_WRITE_DELAY ( 500 / portTICK_RATE_MS )
#define mainLCD_DELAY ( 20 / portTICK_RATE_MS )
#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
#define mainSTRING_WRITE_DELAY ( 500 / portTICK_PERIOD_MS )
#define mainLCD_DELAY ( 20 / portTICK_PERIOD_MS )
/* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
@ -205,7 +205,7 @@ static void prvLCDMessageTask( void * pvParameters );
/*-----------------------------------------------------------*/
/* The queue used to pass messages to the LCD task. */
static xQueueHandle xLCDQueue;
static QueueHandle_t xLCDQueue;
/* Error status flag. */
static unsigned long ulErrorFlags = 0;
@ -314,7 +314,7 @@ static void vErrorChecks( void *pvParameters )
static char cCheckVal[ mainMAX_FLAG_STRING_LEN ];
char *pcFlagString;
xLCDMessage xMessageToSend;
portTickType xLastWakeTime;
TickType_t xLastWakeTime;
char *pcStringsToDisplay[] = {
"Check status flag"
};
@ -406,7 +406,7 @@ static void prvCheckOtherTasksAreStillRunning( void )
static void prvLCDMessageTask( void * pvParameters )
{
xQueueHandle *pxLCDQueue;
QueueHandle_t *pxLCDQueue;
xLCDMessage xMessageToSend;
portBASE_TYPE xIndex = 0;
@ -423,7 +423,7 @@ char *pcStringsToDisplay[] = {
/* To test the parameter passing mechanism, the queue on which messages are
posted is passed in as a parameter even though it is available as a file
scope variable anyway. */
pxLCDQueue = ( xQueueHandle * ) pvParameters;
pxLCDQueue = ( QueueHandle_t * ) pvParameters;
for( ;; )
{
@ -452,14 +452,14 @@ char *pcStringsToDisplay[] = {
void prvLCDTask( void * pvParameters )
{
xQueueHandle *pxLCDQueue;
QueueHandle_t *pxLCDQueue;
xLCDMessage xReceivedMessage;
char *pcString;
/* To test the parameter passing mechanism, the queue on which messages are
received is passed in as a parameter even though it is available as a file
scope variable anyway. */
pxLCDQueue = ( xQueueHandle * ) pvParameters;
pxLCDQueue = ( QueueHandle_t * ) pvParameters;
LCD_Init();

View file

@ -80,9 +80,9 @@
/*-----------------------------------------------------------*/
/* Misc defines. */
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serNO_BLOCK ( ( portTickType ) 0 )
#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )
#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )
#define serNO_BLOCK ( ( TickType_t ) 0 )
#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )
/* Interrupt and status bit definitions. */
#define mainTXRIS 0x20
@ -92,11 +92,11 @@
/*-----------------------------------------------------------*/
/* The queue used to hold received characters. */
static xQueueHandle xRxedChars;
static QueueHandle_t xRxedChars;
/* The semaphore used to wake a task waiting for space to become available
in the FIFO. */
static xSemaphoreHandle xTxFIFOSemaphore;
static SemaphoreHandle_t xTxFIFOSemaphore;
/*-----------------------------------------------------------*/
@ -198,7 +198,7 @@ GPIO_InitTypeDef GPIO_InitStructure;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
{
/* The port handle is not required as this driver only supports one port. */
( void ) pxPort;
@ -240,7 +240,7 @@ signed char *pxNext;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
{
portBASE_TYPE xReturn;

View file

@ -119,7 +119,7 @@
#define uipDMI_RX_CURRENT_DONE 0x8000
/* If no buffers are available, then wait this long before looking again. */
#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_RATE_MS )
#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_PERIOD_MS )
#define uipBUFFER_WAIT_ATTEMPTS ( 10 )
/* Standard constant. */
@ -151,7 +151,7 @@ clock_time_t clock_time( void );
/*-----------------------------------------------------------*/
/* The semaphore used by the ISR to wake the uIP task. */
xSemaphoreHandle xSemaphore = NULL;
SemaphoreHandle_t xSemaphore = NULL;
/*-----------------------------------------------------------*/