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

@ -136,7 +136,7 @@ one not be immediately available when trying to transmit a frame. */
#define emacMAX_WAIT_CYCLES ( ( portBASE_TYPE ) ( configTICK_RATE_HZ / 40 ) )
/* The time to block waiting for input. */
#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 )
#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 )
/* Peripheral setup for the EMAC. */
#define emacPERIPHERAL_A_SETUP ( ( unsigned long ) AT91C_PB2_ETX0 ) | \
@ -162,7 +162,7 @@ one not be immediately available when trying to transmit a frame. */
#define emacINTERRUPT_LEVEL ( 5 )
#define emacNO_DELAY ( 0 )
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )
#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )
#define emacPHY_INIT_DELAY ( 5000 / portTICK_PERIOD_MS )
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )
@ -224,7 +224,7 @@ static portBASE_TYPE prvProbePHY( void );
/* The semaphore used by the EMAC ISR to wake the EMAC task. */
static xSemaphoreHandle xSemaphore = NULL;
static SemaphoreHandle_t xSemaphore = NULL;
/* Holds the index to the next buffer from which data will be read. */
static volatile unsigned long ulNextRxBuffer = 0;
@ -485,7 +485,7 @@ register unsigned long ulBytesRemainingInBuffer, ulRemainingSectionBytes;
/*-----------------------------------------------------------*/
/* See the header file for descriptions of public functions. */
xSemaphoreHandle xEMACInit( void )
SemaphoreHandle_t xEMACInit( void )
{
/* Code supplied by Atmel -------------------------------*/

View file

@ -105,7 +105,7 @@ Changes from V3.2.4
* is used by the EMAC ISR to indicate that Rx packets have been received.
* If the initialisation fails then NULL is returned.
*/
xSemaphoreHandle xEMACInit( void );
SemaphoreHandle_t xEMACInit( void );
/*
* Send ulLength bytes from pcFrom. This copies the buffer to one of the
@ -129,7 +129,7 @@ void vEMACRead( char *pcTo, unsigned long ulSectionLength, unsigned long ulTotal
* files as the driver is compiled to THUMB, and the ISR to ARM. This function
* simply passes the semaphore used to communicate between the two.
*/
void vPassEMACSemaphore( xSemaphoreHandle xCreatedSemaphore );
void vPassEMACSemaphore( SemaphoreHandle_t xCreatedSemaphore );
/*
* Called by the Tx interrupt, this function traverses the buffers used to

View file

@ -74,7 +74,7 @@
/* The semaphore used to signal the arrival of new data to the interface
task. */
static xSemaphoreHandle xSemaphore = NULL;
static SemaphoreHandle_t xSemaphore = NULL;
/* The interrupt entry point is naked so we can control the context saving. */
void vEMACISR_Wrapper( void ) __attribute__((naked));
@ -141,7 +141,7 @@ void vEMACISR_Wrapper( void )
}
/*-----------------------------------------------------------*/
void vPassEMACSemaphore( xSemaphoreHandle xCreatedSemaphore )
void vPassEMACSemaphore( SemaphoreHandle_t xCreatedSemaphore )
{
/* Simply store the semaphore that should be used by the ISR. */
xSemaphore = xCreatedSemaphore;

View file

@ -86,7 +86,7 @@
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 110 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 22000 )

View file

@ -90,7 +90,7 @@
#include "USB-CDC.h"
#include "descriptors.h"
#define usbNO_BLOCK ( ( portTickType ) 0 )
#define usbNO_BLOCK ( ( TickType_t ) 0 )
/* Reset all endpoints */
static void prvResetEndPoints( void );
@ -143,12 +143,12 @@ static xCONTROL_MESSAGE pxControlTx;
static xCONTROL_MESSAGE pxControlRx;
/* Queue holding pointers to pending messages */
xQueueHandle xUSBInterruptQueue;
QueueHandle_t xUSBInterruptQueue;
/* Queues used to hold received characters, and characters waiting to be
transmitted. Rx queue must be larger than FIFO size. */
static xQueueHandle xRxCDC;
static xQueueHandle xTxCDC;
static QueueHandle_t xRxCDC;
static QueueHandle_t xTxCDC;
/* Line coding - 115,200 baud, N-8-1 */
static const unsigned char pxLineCoding[] = { 0x00, 0xC2, 0x01, 0x00, 0x00, 0x00, 0x08 };
@ -176,7 +176,7 @@ portBASE_TYPE xByte;
vDetachUSBInterface();
portEXIT_CRITICAL();
vTaskDelay( portTICK_RATE_MS * 60 );
vTaskDelay( portTICK_PERIOD_MS * 60 );
/* Init USB interface */
portENTER_CRITICAL();

View file

@ -88,7 +88,7 @@
/* Messages and queue used to communicate between the ISR and the USB task. */
static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];
extern xQueueHandle xUSBInterruptQueue;
extern QueueHandle_t xUSBInterruptQueue;
/*-----------------------------------------------------------*/
/* The ISR can cause a context switch so is declared naked. */

View file

@ -126,9 +126,9 @@
#define usbMAX_CONTROL_MESSAGE_SIZE ( 128 )
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )
#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )
#define usbSHORTEST_DELAY ( ( TickType_t ) 1 )
#define usbINIT_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )
#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS )
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )
#define usbDATA_INC ( ( char ) 5 )
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )

View file

@ -37,12 +37,12 @@
#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
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;
#endif /* __SYS_RTXC_H__ */

View file

@ -43,7 +43,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 @@ int intlevel = 0;
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();
@ -293,7 +293,7 @@ struct sys_timeouts *
sys_arch_timeouts(void)
{
int i;
xTaskHandle pid;
TaskHandle_t pid;
struct timeoutlist *tl;
pid = xTaskGetCurrentTaskHandle( );
@ -323,7 +323,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;
static int iCall = 0;

View file

@ -117,7 +117,7 @@ unsigned portBASE_TYPE uxPriority;
static err_t low_level_output( struct netif *netif, struct pbuf *p )
{
struct pbuf *q;
static xSemaphoreHandle xTxSemaphore = NULL;
static SemaphoreHandle_t xTxSemaphore = NULL;
err_t xReturn = ERR_OK;
/* Parameter not used. */
@ -171,7 +171,7 @@ static struct pbuf *low_level_input( struct netif *netif )
{
struct pbuf *p = NULL, *q;
u16_t len = 0;
static xSemaphoreHandle xRxSemaphore = NULL;
static SemaphoreHandle_t xRxSemaphore = NULL;
/* Parameter not used. */
( void ) netif;

View file

@ -137,11 +137,11 @@
/* The rate at which the on board LED will toggle when there is/is not an
error. */
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )
/* The rate at which the idle hook sends data to the USB port. */
#define mainUSB_TX_FREQUENCY ( 100 / portTICK_RATE_MS )
#define mainUSB_TX_FREQUENCY ( 100 / portTICK_PERIOD_MS )
/* The string that is transmitted down the USB port. */
#define mainFIRST_TX_CHAR 'a'
@ -246,8 +246,8 @@ static void prvSetupHardware( void )
static void vErrorChecks( void *pvParameters )
{
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
portTickType xLastWakeTime;
TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
TickType_t xLastWakeTime;
/* The parameters are not used. */
( void ) pvParameters;
@ -313,7 +313,7 @@ long lReturn = ( long ) pdPASS;
void vApplicationIdleHook( void )
{
static portTickType xLastTx = 0;
static TickType_t xLastTx = 0;
char cTxByte;
/* The idle hook simply sends a string of characters to the USB port.