#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 66000000 ) /* = 66.000MHz clk gen */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25 * 1024 ) )\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
unsigned long ulMemCheckTaskRunningCount;\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
/* Constants to setup and access the UART. */\r
#define portUSART0_AIC_CHANNEL ( ( unsigned long ) 2 )\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/*-----------------------------------------------------------*/\r
\r
* The queues are created in serialISR.c as they are used from the ISR.\r
* Obtain references to the queues and THRE Empty flag. \r
*/\r
-extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx );\r
+extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
( void ) pxPort;\r
\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/*-----------------------------------------------------------*/\r
\r
void vUART_ISR_Handler( void ) __attribute__ ((noinline));\r
\r
/*-----------------------------------------------------------*/\r
-void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )\r
+void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )\r
#define usbMAX_TX_MESSAGE_SIZE ( 128 )\r
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )\r
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR\r
-#define usbSHORTEST_DELAY ( ( portTickType ) 1 )\r
-#define usbINIT_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
-#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )\r
+#define usbSHORTEST_DELAY ( ( TickType_t ) 1 )\r
+#define usbINIT_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
+#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS )\r
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )\r
#define usbDATA_INC ( ( char ) 5 )\r
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )\r
static xTX_MESSAGE pxCharsForTx;\r
\r
/* Queue used to pass messages between the ISR and the task. */\r
-static xQueueHandle xUSBInterruptQueue;\r
+static QueueHandle_t xUSBInterruptQueue;\r
\r
/* ISR entry has to be written in the asm file as we want a context switch\r
to occur from within the ISR. See the port documentation on the FreeRTOS.org\r
#define mainUSB_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* Constants required by the 'Check' task. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( 3 )\r
\r
/* Constants for the ComTest tasks. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
\r
/* The parameters are not used in this task. */\r
( void ) pvParameters;\r
#define vInterruptOff() AT91F_US_DisableIt( serCOM0, AT91C_US_TXRDY )\r
\r
/* Misc constants. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )\r
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )\r
\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Place the character in the queue of characters to be transmitted. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )\r
#define usbYDOWN ( 4 )\r
#define usbMAX_COORD ( 120 )\r
#define usbMAX_TX_MESSAGE_SIZE ( 128 )\r
-#define usbSHORTEST_DELAY ( ( portTickType ) 1 )\r
-#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
-#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )\r
+#define usbSHORTEST_DELAY ( ( TickType_t ) 1 )\r
+#define usbINIT_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
+#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS )\r
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )\r
#define usbDATA_INC ( ( char ) 5 )\r
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )\r
static xTX_MESSAGE pxCharsForTx;\r
\r
/* Queue used to pass messages between the ISR and the task. */\r
-xQueueHandle xUSBInterruptQueue; \r
+QueueHandle_t xUSBInterruptQueue; \r
\r
/*-----------------------------------------------------------*/\r
\r
static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];\r
\r
/* Queue used to pass messages between the ISR and the task. */\r
-extern xQueueHandle xUSBInterruptQueue; \r
+extern QueueHandle_t xUSBInterruptQueue; \r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* The rate at which LED D4 will toggle if an error has been found in one or \r
more of the standard demo tasks. */\r
-const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS;\r
+const unsigned long ulErrorFlashRate = 500 / portTICK_PERIOD_MS;\r
\r
/* The rate at which LED D4 will toggle if no errors have been found in any\r
of the standard demo tasks. */\r
-const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;\r
+const unsigned long ulNoErrorCheckRate = 5000 / portTICK_PERIOD_MS;\r
\r
ulCallCount++;\r
\r
function to ensure the stack frame is correctly set up. */\r
void vEMACISR_Handler( void ) __attribute__((noinline));\r
\r
-static xSemaphoreHandle xEMACSemaphore;\r
+static SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )\r
+void vPassEMACSemaphore( SemaphoreHandle_t xSemaphore )\r
{\r
xEMACSemaphore = xSemaphore;\r
}\r
#define emacINTERRUPT_LEVEL ( 5 )\r
#define emacNO_DELAY ( 0 )\r
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )\r
-#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )\r
+#define emacPHY_INIT_DELAY ( 5000 / portTICK_PERIOD_MS )\r
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )\r
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )\r
\r
const unsigned char ucIPAddress[ 4 ] = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 };\r
\r
/* The semaphore used by the EMAC ISR to wake the EMAC task. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xSemaphoreHandle xEMACInit( void )\r
+SemaphoreHandle_t xEMACInit( void )\r
{\r
/* Code supplied by Atmel -------------------------------*/\r
\r
* is used by the EMAC ISR to indicate that Rx packets have been received.\r
* If the initialisation fails then NULL is returned.\r
*/\r
-xSemaphoreHandle xEMACInit( void );\r
+SemaphoreHandle_t xEMACInit( void );\r
\r
/*\r
* Send the current uIP buffer. This copies the uIP buffer to one of the\r
#include "partest.h"\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-static xSemaphoreHandle xEMACSemaphore;\r
+static SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
unsigned long ulMemCheckTaskRunningCount;\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
\r
/* The parameters are not used in this function. */\r
( void ) pvParameters;\r
#define serUART0_VIC_ENABLE ( ( unsigned long ) 0x0020 )\r
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/*-----------------------------------------------------------*/\r
\r
* The queues are created in serialISR.c as they are used from the ISR.\r
* Obtain references to the queues and THRE Empty flag. \r
*/\r
-extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );\r
+extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
static volatile long lTHREEmpty;\r
\r
/*-----------------------------------------------------------*/\r
* The queues are created in serialISR.c as they are used from the ISR.\r
* Obtain references to the queues and THRE Empty flag. \r
*/\r
-void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );\r
+void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );\r
\r
/* UART0 interrupt service routine entry point. */\r
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));\r
void vUART_ISR_Handler( void ) __attribute__ ((noinline));\r
\r
/*-----------------------------------------------------------*/\r
-void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, \r
- xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag )\r
+void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, \r
+ QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )\r
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* Constants required by the 'Check' task. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( 7 )\r
\r
/* Constants for the ComTest tasks. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
\r
/* The parameters are not used in this task. */\r
( void ) pvParameters;\r
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )\r
\r
/* Misc. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
static volatile long lTHREEmpty = pdFALSE;\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 13 * 1024 )\r
3 seconds then no errors have been detected. If the rate increases to 500ms\r
then an error has been detected in at least one of the demo application tasks. */\r
#define mainCHECK_LED ( 7 )\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
\r
/* Parameters are not used. */\r
( void ) pvParameters;\r
#define serU1VIC_ENABLE ( ( unsigned long ) 0x0020 )\r
\r
/* Misc. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Constant to access the VIC. */\r
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Communication flag between the interrupt service routine and serial API. */\r
static volatile long lTHREEmpty;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
/* In this case configCPU_CLOCK_HZ is actually set to the pclk frequency, not\r
the CPU frequency. */\r
#define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )\r
\r
/* Demo application definitions. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainLED_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
-#define mainERROR_LED_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainLED_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
+#define mainERROR_LED_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainLIST_BUFFER_SIZE 2048\r
#define mainNO_DELAY ( 0 )\r
-#define mainSHORT_DELAY ( 150 / portTICK_RATE_MS )\r
+#define mainSHORT_DELAY ( 150 / portTICK_PERIOD_MS )\r
\r
/* Task priorities. */\r
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The semaphore used to wake the button task from within the external interrupt\r
handler. */\r
-xSemaphoreHandle xButtonSemaphore;\r
+SemaphoreHandle_t xButtonSemaphore;\r
\r
/* The queue that is used to send message to vPrintTask for display in the\r
terminal output window. */\r
-xQueueHandle xPrintQueue;\r
+QueueHandle_t xPrintQueue;\r
\r
/* The rate at which the LED will toggle. The toggle rate increases if an\r
error is detected in any task. */\r
-static portTickType xLED_Delay = mainLED_DELAY;\r
+static TickType_t xLED_Delay = mainLED_DELAY;\r
/*-----------------------------------------------------------*/\r
\r
/*\r
static void vCheckTask( void *pvParameters )\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
const char * const pcPassMessage = "PASS\n";\r
const char * const pcFailMessage = "FAIL\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* Check pcTaskName for the name of the offending task, or pxCurrentTCB\r
if pcTaskName has itself been corrupted. */\r
\r
void vButtonHandler( void )\r
{\r
-extern xSemaphoreHandle xButtonSemaphore;\r
+extern SemaphoreHandle_t xButtonSemaphore;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
xSemaphoreGiveFromISR( xButtonSemaphore, &xHigherPriorityTaskWoken );\r
\r
for (i = 0; i < list.uxNumberOfItems; i++)\r
{\r
- item = Debug.evaluate("*(xListItem *)" + index);\r
+ item = Debug.evaluate("*(ListItem_t *)" + index);\r
\r
task = item ? item.pvOwner : 0;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 104 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )\r
\r
/* Demo application definitions. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 6 )\r
\r
/* Task priorities. */\r
static void prvSetupHardware( void );\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The handler that does the actual work. */\r
void vEMAC_ISR_Handler( void ) __attribute__((noinline));\r
\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
\r
void vEMAC_ISR_Handler( void )\r
#include "emac.h"\r
\r
/* The semaphore used to wake the uIP task when data arives. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
static unsigned short *rptr;\r
static unsigned short *tptr;\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xLCDQueue;\r
+extern QueueHandle_t xLCDQueue;\r
xLCDMessage xLCDMessage;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 57600000 ) \r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )\r
\r
/* Demo application definitions. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )\r
\r
/* Task priorities. */\r
static void vLCDTask( void *pvParameters );\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
unsigned portBASE_TYPE uxColumn = 0;\r
xLCDMessage xMessage;\r
\r
separate to the wrapper to ensure the correct stack frame is set up. */\r
void vEMAC_ISR_Handler( void ) __attribute__((noinline));\r
\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
void vEMAC_ISR_Handler( void )\r
{\r
#include "emac.h"\r
\r
/* The semaphore used to wake the uIP task when data arives. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
static unsigned short *rptr;\r
static unsigned short *tptr;\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xLCDQueue;\r
+extern QueueHandle_t xLCDQueue;\r
xLCDMessage xLCDMessage;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 20480 )\r
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* Constants required by the 'Check' task. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( 4 )\r
\r
/* Constants for the ComTest tasks. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* The parameters are not used in this task. */\r
( void ) pvParameters;\r
#define UART0_Rx_Pin ( 0x0001<< 8 )\r
#define UART0_Tx_Pin ( 0x0001<< 9 )\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Macros to turn on and off the Tx empty interrupt. */\r
#define serINTERRUPT_ON() UART0->IER |= UART_TxHalfEmpty\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Place the character in the queue of characters to be transmitted. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* Timer clock. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 12800 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to communicate with the LCD print task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
static unsigned long ulErrorDetected = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
unsigned char *ucErrorMessage = ( unsigned char * )" FAIL";\r
unsigned char *ucSuccessMessage = ( unsigned char * )" PASS";\r
unsigned portBASE_TYPE uxColumn = mainMAX_WRITE_COLUMN;\r
/* Demo application includes. */\r
#include "serial.h"\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
static volatile portBASE_TYPE xQueueEmpty = pdTRUE;\r
\r
\r
/* The interrupt service routine - called from the assembly entry point. */\r
void vSerialISR( void );\r
-void vConfigureQueues( xQueueHandle xQForRx, xQueueHandle xQForTx, volatile portBASE_TYPE *pxEmptyFlag );\r
+void vConfigureQueues( QueueHandle_t xQForRx, QueueHandle_t xQForTx, volatile portBASE_TYPE *pxEmptyFlag );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn;\r
\r
#include "FreeRTOS.h"\r
#include "queue.h"\r
\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
static portBASE_TYPE volatile *pxQueueEmpty;\r
\r
-void vConfigureQueues( xQueueHandle xQForRx, xQueueHandle xQForTx, portBASE_TYPE volatile *pxEmptyFlag )\r
+void vConfigureQueues( QueueHandle_t xQForRx, QueueHandle_t xQForTx, portBASE_TYPE volatile *pxEmptyFlag )\r
{\r
xRxedChars = xQForRx;\r
xCharsForTx = xQForTx;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* Timer clock. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 12800 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to communicate with the LCD print task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
static unsigned long ulErrorDetected = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
unsigned char *cErrorMessage = " FAIL";\r
unsigned char *cSuccessMessage = " PASS";\r
unsigned portBASE_TYPE uxColumn = mainMAX_WRITE_COLUMN;\r
/* Demo application includes. */\r
#include "serial.h"\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
static volatile portBASE_TYPE xQueueEmpty = pdTRUE;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) BOARD_MCK )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 190 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
\r
/* The period of the check task both in and out of the presense of an error. */\r
-#define mainNO_ERROR_PERIOD ( 5000 / portTICK_RATE_MS )\r
-#define mainERROR_PERIOD ( 500 / portTICK_RATE_MS );\r
+#define mainNO_ERROR_PERIOD ( 5000 / portTICK_PERIOD_MS )\r
+#define mainERROR_PERIOD ( 500 / portTICK_PERIOD_MS );\r
\r
/* Constants used by the ComTest task. */\r
#define mainCOM_TEST_BAUD_RATE ( 38400 )\r
\r
static void prvCheckTask( void * pvParameters )\r
{\r
-portTickType xNextWakeTime, xPeriod = mainNO_ERROR_PERIOD;\r
+TickType_t xNextWakeTime, xPeriod = mainNO_ERROR_PERIOD;\r
static volatile unsigned long ulErrorCode = 0UL;\r
\r
/* Just to remove the compiler warning. */\r
#define vInterruptOff() serCOM0->US_IDR = AT91C_US_TXRDY\r
\r
/* Misc constants. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )\r
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )\r
\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Just to remove compiler warning. */\r
( void ) pxPort;\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 96000000 )\r
#define configCPU_PERIPH_HZ ( ( unsigned long ) 48000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 52000 )\r
ENET_MIIWriteReg(0x0,MAC_MII_REG_XCR, 0x8000);\r
\r
/* Delay to assure PHY reset */\r
- vTaskDelay( 3000 / portTICK_RATE_MS );\r
+ vTaskDelay( 3000 / portTICK_PERIOD_MS );\r
\r
/* initialize the opearting mode */\r
while( ENET_SetOperatingMode() == pdFAIL )\r
{\r
- vTaskDelay( 3000 / portTICK_RATE_MS );\r
+ vTaskDelay( 3000 / portTICK_PERIOD_MS );\r
}\r
\r
/*set MAC physical*/\r
struct timeoutlist\r
{\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
};\r
\r
/* This is the number of threads that can be started with sys_thread_new() */\r
sys_mbox_t\r
sys_mbox_new(void)\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );\r
\r
void\r
sys_mbox_post(sys_mbox_t mbox, void *data)\r
{\r
- xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );\r
+ xQueueSend( mbox, &data, ( TickType_t ) ( archPOST_BLOCK_TIME_MS / portTICK_PERIOD_MS ) );\r
}\r
\r
\r
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)\r
{\r
void *dummyptr;\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_sem_t\r
sys_sem_new(u8_t count)\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
portENTER_CRITICAL();\r
vSemaphoreCreateBinary( xSemaphore );\r
u32_t\r
sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)\r
{\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_arch_timeouts(void)\r
{\r
int i;\r
-xTaskHandle pid;\r
+TaskHandle_t pid;\r
struct timeoutlist *tl;\r
\r
pid = xTaskGetCurrentTaskHandle( );\r
*/\r
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio)\r
{\r
-xTaskHandle CreatedTask;\r
+TaskHandle_t CreatedTask;\r
int result;\r
\r
result = xTaskCreate(thread, s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask );\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL (xQueueHandle)0\r
-#define SYS_SEM_NULL (xSemaphoreHandle)0\r
+#define SYS_MBOX_NULL (QueueHandle_t)0\r
+#define SYS_SEM_NULL (SemaphoreHandle_t)0\r
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
typedef struct _sys_arch_state_t\r
{\r
#define webHTTP_PORT ( 80 )\r
\r
/* Delay on close error. */\r
-#define webSHORT_DELAY ( 10 / portTICK_RATE_MS )\r
+#define webSHORT_DELAY ( 10 / portTICK_PERIOD_MS )\r
\r
/* The IP address being used. */\r
#define emacIPADDR0 172\r
#define IFNAME1 'm'\r
\r
/* The time to block waiting for input. */\r
-#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 )\r
+#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 )\r
\r
/* Interrupt status bit definition. */\r
#define DMI_RX_CURRENT_DONE 0x8000\r
static u8_t s_rxBuff[1520];\r
\r
/* The semaphore used by the ISR to wake the lwIP task. */\r
-static xSemaphoreHandle s_xSemaphore = NULL;\r
+static SemaphoreHandle_t s_xSemaphore = NULL;\r
\r
struct ethernetif {\r
struct eth_addr *ethaddr;\r
\r
static err_t low_level_output(struct netif *netif, struct pbuf *p)\r
{\r
- static xSemaphoreHandle xTxSemaphore = NULL;\r
+ static SemaphoreHandle_t xTxSemaphore = NULL;\r
struct pbuf *q;\r
u32_t l = 0;\r
\r
static struct pbuf *\r
low_level_input(struct netif *netif)\r
{\r
- static xSemaphoreHandle xRxSemaphore = NULL;\r
+ static SemaphoreHandle_t xRxSemaphore = NULL;\r
struct pbuf *p, *q;\r
u16_t len, l;\r
\r
#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
\r
/* Delays used by the various tasks defined in this file. */\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainSTRING_WRITE_DELAY ( 500 / portTICK_RATE_MS )\r
-#define mainLCD_DELAY ( 20 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainSTRING_WRITE_DELAY ( 500 / portTICK_PERIOD_MS )\r
+#define mainLCD_DELAY ( 20 / portTICK_PERIOD_MS )\r
\r
/* Constants for the ComTest tasks. */\r
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to pass messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/* Error status flag. */\r
static unsigned long ulErrorFlags = 0;\r
static char cCheckVal[ mainMAX_FLAG_STRING_LEN ];\r
char *pcFlagString;\r
xLCDMessage xMessageToSend;\r
-portTickType xLastWakeTime;\r
+TickType_t xLastWakeTime;\r
char *pcStringsToDisplay[] = { \r
"Check status flag"\r
};\r
\r
static void prvLCDMessageTask( void * pvParameters )\r
{\r
-xQueueHandle *pxLCDQueue; \r
+QueueHandle_t *pxLCDQueue; \r
xLCDMessage xMessageToSend;\r
portBASE_TYPE xIndex = 0;\r
\r
/* To test the parameter passing mechanism, the queue on which messages are\r
posted is passed in as a parameter even though it is available as a file\r
scope variable anyway. */\r
- pxLCDQueue = ( xQueueHandle * ) pvParameters;\r
+ pxLCDQueue = ( QueueHandle_t * ) pvParameters;\r
\r
for( ;; )\r
{\r
\r
void prvLCDTask( void * pvParameters )\r
{\r
-xQueueHandle *pxLCDQueue;\r
+QueueHandle_t *pxLCDQueue;\r
xLCDMessage xReceivedMessage;\r
char *pcString;\r
\r
/* To test the parameter passing mechanism, the queue on which messages are\r
received is passed in as a parameter even though it is available as a file\r
scope variable anyway. */\r
- pxLCDQueue = ( xQueueHandle * ) pvParameters;\r
+ pxLCDQueue = ( QueueHandle_t * ) pvParameters;\r
\r
LCD_Init();\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
-#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
+#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )\r
\r
/* Interrupt and status bit definitions. */\r
#define mainTXRIS 0x20 \r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/* The semaphore used to wake a task waiting for space to become available\r
in the FIFO. */\r
-static xSemaphoreHandle xTxFIFOSemaphore;\r
+static SemaphoreHandle_t xTxFIFOSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn;\r
\r
#define uipDMI_RX_CURRENT_DONE 0x8000\r
\r
/* If no buffers are available, then wait this long before looking again. */\r
-#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_RATE_MS )\r
+#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_PERIOD_MS )\r
#define uipBUFFER_WAIT_ATTEMPTS ( 10 )\r
\r
/* Standard constant. */\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xSemaphore = NULL;\r
+SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( FOSC0 ) /* Hz clk gen */\r
#define configPBA_CLOCK_HZ ( FOSC0 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 8 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
/* configTOTAL_HEAP_SIZE is not used when heap_3.c is used. */\r
#define mainERROR_LED ( 7 )\r
\r
//! The period between executions of the check task.\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
\r
//! If an error is detected in a task, the vErrorChecks task will enter in an\r
//! infinite loop flashing the LED at this rate.\r
-#define mainERROR_FLASH_RATE ( (portTickType) 500 / portTICK_RATE_MS )\r
+#define mainERROR_FLASH_RATE ( (TickType_t) 500 / portTICK_PERIOD_MS )\r
\r
/*! \name Constants used by the vMemCheckTask() task.\r
*/\r
{\r
static volatile unsigned long ulDummyVariable = 3UL;\r
unsigned long ulMemCheckTaskRunningCount;\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
portBASE_TYPE bSuicidalTask = 0;\r
\r
/* The parameters are not used. Prevent compiler warnings. */\r
\r
/* Constants to setup and access the USART. */\r
#define serINVALID_COMPORT_HANDLER ( ( xComPortHandle ) 0 )\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Forward declaration. */\r
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength,\r
- xQueueHandle *pxRxedChars,\r
- xQueueHandle *pxCharsForTx );\r
+ QueueHandle_t *pxRxedChars,\r
+ QueueHandle_t *pxCharsForTx );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
volatile avr32_usart_t *usart = serialPORT_USART;\r
\r
/*\r
* Create the rx and tx queues.\r
*/\r
-static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )\r
+static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 )\r
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) )\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
\r
Changes from V2.2.0\r
\r
#define mainCHECK_TASK_LED ( 7 )\r
\r
/* The period between executions of the check task. */\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
\r
/* An address in the EEPROM used to count resets. This is used to check that\r
the demo application is not unexpectedly resetting. */\r
#define serUCSRC_SELECT ( ( unsigned char ) 0x80 )\r
#define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 )\r
\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
#define vInterruptOn() \\r
{ \\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Return false if after the block time there is no room on the Tx queue. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 )\r
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) )\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
\r
Changes from V2.6.1\r
\r
#define mainCHECK_TASK_LED ( 7 )\r
\r
/* The period between executions of the check task. */\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
\r
/* An address in the EEPROM used to count resets. This is used to check that\r
the demo application is not unexpectedly resetting. */\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
+ xQueueReceiveFromISR() used in place of xQueueReceive() within the ISR.\r
\r
Changes from V2.6.0\r
#define serUCSRC_SELECT ( ( unsigned char ) 0x80 )\r
#define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 )\r
\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
#define vInterruptOn() \\r
{ \\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemFrequency )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
mss_i2c_slave_wr_handler_t slave_write_handler;\r
\r
/* Used to get access to and wait for completion of an I2C transaction. */\r
- xSemaphoreHandle xI2CCompleteSemaphore;\r
+ SemaphoreHandle_t xI2CCompleteSemaphore;\r
\r
} mss_i2c_instance_t;\r
\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* Maintains the current LED output state. */\r
static volatile unsigned long ulGPIOState = 0UL;\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the OLED timer will expire. Each time it expires, it's\r
callback function updates the OLED text. */\r
-#define mainOLED_PERIOD_MS ( 75UL / portTICK_RATE_MS )\r
+#define mainOLED_PERIOD_MS ( 75UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS )\r
\r
/* The LED will remain on until the button has not been pushed for a full\r
5000ms. */\r
-#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* A zero block time. */\r
#define mainDONT_BLOCK ( 0UL )\r
* The LED timer callback function. This does nothing but switch the red LED\r
* off.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* This is not a 'standard' partest function, so the prototype is not in\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both application specific demo tasks defined in this file. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses prvLEDTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* The check timer. This uses prvCheckTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The status message that is displayed at the bottom of the "task stats" web\r
page, which is served by the uIP task. This will report any errors picked up\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Check the standard demo tasks are running without error. Latch the\r
latest reported error in the pcStatusMessage character pointer. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* The timer command queue will have been filled when the timer test tasks\r
{\r
static struct oled_data xOLEDData;\r
static unsigned char ucOffset1 = 0, ucOffset2 = 5;\r
-static portTickType xLastScrollTime = 0UL;\r
+static TickType_t xLastScrollTime = 0UL;\r
\r
/* Initialise the display. */\r
OLED_init();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define uipDONT_BLOCK 0UL\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Initialise the MAC hardware.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void prvInitialise_uIP( void )\r
{\r
uip_ipaddr_t xIPAddr;\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
\r
uip_init();\r
uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 500UL / portTICK_RATE_MS ),\r
+ ( 500UL / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
{\r
const long lMaxAttempts = 10;\r
long lAttempt;\r
-const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );\r
+const TickType_t xShortDelay = ( 5 / portTICK_PERIOD_MS );\r
\r
/* Try to send data to the Ethernet. Keep trying for a while if data cannot\r
be sent immediately. Note that this will actually cause the data to be sent\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemFrequency )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
mss_i2c_slave_wr_handler_t slave_write_handler;\r
\r
/* Used to get access to and wait for completion of an I2C transaction. */\r
- xSemaphoreHandle xI2CCompleteSemaphore;\r
+ SemaphoreHandle_t xI2CCompleteSemaphore;\r
\r
} mss_i2c_instance_t;\r
\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* Maintains the current LED output state. */\r
static volatile unsigned long ulGPIOState = 0UL;\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the OLED timer will expire. Each time it expires, it's\r
callback function updates the OLED text. */\r
-#define mainOLED_PERIOD_MS ( 75UL / portTICK_RATE_MS )\r
+#define mainOLED_PERIOD_MS ( 75UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS )\r
\r
/* The LED will remain on until the button has not been pushed for a full\r
5000ms. */\r
-#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* A zero block time. */\r
#define mainDONT_BLOCK ( 0UL )\r
* The LED timer callback function. This does nothing but switch the red LED\r
* off.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* This is not a 'standard' partest function, so the prototype is not in\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both application specific demo tasks defined in this file. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses prvLEDTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* The check timer. This uses prvCheckTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The status message that is displayed at the bottom of the "task stats" web\r
page, which is served by the uIP task. This will report any errors picked up\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Check the standard demo tasks are running without error. Latch the\r
latest reported error in the pcStatusMessage character pointer. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* The timer command queue will have been filled when the timer test tasks\r
{\r
static struct oled_data xOLEDData;\r
static unsigned char ucOffset1 = 0, ucOffset2 = 5;\r
-static portTickType xLastScrollTime = 0UL;\r
+static TickType_t xLastScrollTime = 0UL;\r
\r
/* Initialise the display. */\r
OLED_init();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define uipDONT_BLOCK 0UL\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Initialise the MAC hardware.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void prvInitialise_uIP( void )\r
{\r
uip_ipaddr_t xIPAddr;\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
\r
uip_init();\r
uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 500UL / portTICK_RATE_MS ),\r
+ ( 500UL / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
{\r
const long lMaxAttempts = 10;\r
long lAttempt;\r
-const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );\r
+const TickType_t xShortDelay = ( 5 / portTICK_PERIOD_MS );\r
\r
/* Try to send data to the Ethernet. Keep trying for a while if data cannot\r
be sent immediately. Note that this will actually cause the data to be sent\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove compiler warning about unused parameter. */\r
#define configCPU_CLOCK_HZ 100000000UL\r
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
#define configUSE_TICKLESS_IDLE 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configPERIPHERAL_CLOCK_HZ ( 33333000UL )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define cmdMAX_INPUT_SIZE 50\r
\r
/* The maximum time in ticks to wait for the UART access mutex. */\r
-#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS )\r
+#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS )\r
\r
/* Parameters that are passed into the register check tasks solely for the\r
purpose of ensuring parameters are passed into tasks correctly. */\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
-portTickType xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
+TickType_t xLastExecutionTime;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
unsigned long ulErrorFound = pdFALSE;\r
\r
ulErrorFound = pdTRUE;\r
}\r
\r
- if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
+ if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
{\r
ulErrorFound = pdTRUE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove compiler warning about unused parameter. */\r
#define configCPU_CLOCK_HZ 100000000UL\r
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
#define configUSE_TICKLESS_IDLE 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configPERIPHERAL_CLOCK_HZ ( 33333000UL )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
-portTickType xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
+TickType_t xLastExecutionTime;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
unsigned long ulErrorFound = pdFALSE;\r
\r
ulErrorFound = pdTRUE;\r
}\r
\r
- if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
+ if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
{\r
ulErrorFound = pdTRUE;\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-BaseType_t xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+BaseType_t xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
BaseType_t xReturn;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only a single port is supported. */\r
( void ) pxPort;\r
-/*
- FreeRTOS V8.0.0:rc2 - Copyright (C) 2014 Real Time Engineers Ltd.
- All rights reserved
-
- VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- ***************************************************************************
- * *
- * FreeRTOS provides completely free yet professionally developed, *
- * robust, strictly quality controlled, supported, and cross *
- * platform software that has become a de facto standard. *
- * *
- * Help yourself get started quickly and support the FreeRTOS *
- * project by purchasing a FreeRTOS tutorial book, reference *
- * manual, or both from: http://www.FreeRTOS.org/Documentation *
- * *
- * Thank you! *
- * *
- ***************************************************************************
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
-
- >>! NOTE: The modification to the GPL is included to allow you to distribute
- >>! a combined work that includes FreeRTOS without being obliged to provide
- >>! the source code for proprietary components outside of the FreeRTOS
- >>! kernel.
-
- FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. Full license text is available from the following
- link: http://www.freertos.org/a00114.html
-
- 1 tab == 4 spaces!
-
- ***************************************************************************
- * *
- * Having a problem? Start by reading the FAQ "My application does *
- * not run, what could be wrong?" *
- * *
- * http://www.FreeRTOS.org/FAQHelp.html *
- * *
- ***************************************************************************
-
- http://www.FreeRTOS.org - Documentation, books, training, latest versions,
- license and Real Time Engineers Ltd. contact details.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool, a DOS
- compatible FAT file system, and our tiny thread aware UDP/IP stack.
-
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
- Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
- licenses offer ticketed support, indemnification and middleware.
-
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
- mission critical applications that require provable dependability.
-
- 1 tab == 4 spaces!
-*/
-
-/******************************************************************************
- * This project provides two demo applications. A simple blinky style project,
- * and a more comprehensive test and demo application. The
- * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to
- * select between the two. The simply blinky demo is implemented and described
- * in main_blinky.c. The more comprehensive test and demo application is
- * implemented and described in main_full.c.
- *
- * This file implements the code that is not demo specific, including the
- * hardware setup and FreeRTOS hook functions.
- *
- * !!! IMPORTANT NOTE !!!
- * The GCC libraries that ship with the Xilinx SDK make use of the floating
- * point registers. To avoid this causing corruption it is necessary to avoid
- * their use. For this reason main.c contains very basic C implementations of
- * the standard C library functions memset(), memcpy() and memcmp(), which are
- * are used by FreeRTOS itself. Defining these functions in the project
- * prevents the linker pulling them in from the library. Any other standard C
- * library functions that are used by the application must likewise be defined
- * in C.
- *
- * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON
- * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO
- * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!
- *
- */
-
-/* Standard includes. */
-#include <stdio.h>
-
-/* Scheduler include files. */
-#include "FreeRTOS.h"
-#include "task.h"
-#include "semphr.h"
-
-/* Standard demo includes. */
-#include "partest.h"
-#include "TimerDemo.h"
-#include "QueueOverwrite.h"
-#include "EventGroupsDemo.h"
-
-/* Xilinx includes. */
-#include "platform.h"
-#include "xparameters.h"
-#include "xscutimer.h"
-#include "xscugic.h"
-#include "xil_exception.h"
-
-/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
-or 0 to run the more comprehensive test and demo application. */
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
-
-/*-----------------------------------------------------------*/
-
-/*
- * Configure the hardware as necessary to run this demo.
- */
-static void prvSetupHardware( void );
-
-/*
- * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
- * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
- */
-#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
- extern void main_blinky( void );
-#else
- extern void main_full( void );
-#endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */
-
-/*
- * The Xilinx projects use a BSP that do not allow the start up code to be
- * altered easily. Therefore the vector table used by FreeRTOS is defined in
- * FreeRTOS_asm_vectors.S, which is part of this project. Switch to use the
- * FreeRTOS vector table.
- */
-extern void vPortInstallFreeRTOSVectorTable( void );
-
-/* Prototypes for the standard FreeRTOS callback/hook functions implemented
-within this file. */
-void vApplicationMallocFailedHook( void );
-void vApplicationIdleHook( void );
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );
-void vApplicationTickHook( void );
-
-/*-----------------------------------------------------------*/
-
-/* The interrupt controller is initialised in this file, and made available to
-other modules. */
-XScuGic xInterruptController;
-
-/*-----------------------------------------------------------*/
-
-int main( void )
-{
- /* Configure the hardware ready to run the demo. */
- prvSetupHardware();
-
- /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
- of this file. */
- #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
- {
- main_blinky();
- }
- #else
- {
- main_full();
- }
- #endif
-
- /* Don't expect to reach here. */
- return 0;
-}
-/*-----------------------------------------------------------*/
-
-static void prvSetupHardware( void )
-{
-BaseType_t xStatus;
-XScuGic_Config *pxGICConfig;
-
- /* Ensure no interrupts execute while the scheduler is in an inconsistent
- state. Interrupts are automatically enabled when the scheduler is
- started. */
- portDISABLE_INTERRUPTS();
-
- /* Obtain the configuration of the GIC. */
- pxGICConfig = XScuGic_LookupConfig( XPAR_SCUGIC_SINGLE_DEVICE_ID );
-
- /* Sanity check the FreeRTOSConfig.h settings are correct for the
- hardware. */
- configASSERT( pxGICConfig );
- configASSERT( pxGICConfig->CpuBaseAddress == ( configINTERRUPT_CONTROLLER_BASE_ADDRESS + configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ) );
- configASSERT( pxGICConfig->DistBaseAddress == configINTERRUPT_CONTROLLER_BASE_ADDRESS );
-
- /* Install a default handler for each GIC interrupt. */
- xStatus = XScuGic_CfgInitialize( &xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress );
- configASSERT( xStatus == XST_SUCCESS );
- ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
-
- /* Initialise the LED port. */
- vParTestInitialise();
-
- /* The Xilinx projects use a BSP that do not allow the start up code to be
- altered easily. Therefore the vector table used by FreeRTOS is defined in
- FreeRTOS_asm_vectors.S, which is part of this project. Switch to use the
- FreeRTOS vector table. */
- vPortInstallFreeRTOSVectorTable();
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationMallocFailedHook( void )
-{
- /* Called if a call to pvPortMalloc() fails because there is insufficient
- free memory available in the FreeRTOS heap. pvPortMalloc() is called
- internally by FreeRTOS API functions that create tasks, queues, software
- timers, and semaphores. The size of the FreeRTOS heap is set by the
- configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
- taskDISABLE_INTERRUPTS();
- for( ;; );
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
-{
- ( void ) pcTaskName;
- ( void ) pxTask;
-
- /* Run time stack overflow checking is performed if
- configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
- function is called if a stack overflow is detected. */
- taskDISABLE_INTERRUPTS();
- for( ;; );
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationIdleHook( void )
-{
-volatile size_t xFreeHeapSpace;
-
- /* This is just a trivial example of an idle hook. It is called on each
- cycle of the idle task. It must *NOT* attempt to block. In this case the
- idle task just queries the amount of FreeRTOS heap that remains. See the
- memory management section on the http://www.FreeRTOS.org web site for memory
- management options. If there is a lot of heap memory free then the
- configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up
- RAM. */
- xFreeHeapSpace = xPortGetFreeHeapSize();
-
- /* Remove compiler warning about xFreeHeapSpace being set but never used. */
- ( void ) xFreeHeapSpace;
-}
-/*-----------------------------------------------------------*/
-
-void vAssertCalled( const char * pcFile, unsigned long ulLine )
-{
-volatile unsigned long ul = 0;
-
- ( void ) pcFile;
- ( void ) ulLine;
-
- taskENTER_CRITICAL();
- {
- /* Set ul to a non-zero value using the debugger to step out of this
- function. */
- while( ul == 0 )
- {
- portNOP();
- }
- }
- taskEXIT_CRITICAL();
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationTickHook( void )
-{
- #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )
- {
- /* The full demo includes a software timer demo/test that requires
- prodding periodically from the tick interrupt. */
- vTimerPeriodicISRTests();
-
- /* Call the periodic queue overwrite from ISR demo. */
- vQueueOverwritePeriodicISRDemo();
-
- /* Call the periodic event group from ISR demo. */
- vPeriodicEventGroupsProcessing();
- }
- #endif
-}
-/*-----------------------------------------------------------*/
-
-void *memcpy( void *pvDest, const void *pvSource, size_t ulBytes )
-{
-unsigned char *pcDest = ( unsigned char * ) pvDest, *pcSource = ( unsigned char * ) pvSource;
-size_t x;
-
- for( x = 0; x < ulBytes; x++ )
- {
- *pcDest = *pcSource;
- pcDest++;
- pcSource++;
- }
-
- return pvDest;
-}
-/*-----------------------------------------------------------*/
-
-void *memset( void *pvDest, int iValue, size_t ulBytes )
-{
-unsigned char *pcDest = ( unsigned char * ) pvDest;
-size_t x;
-
- for( x = 0; x < ulBytes; x++ )
- {
- *pcDest = ( unsigned char ) iValue;
- pcDest++;
- }
-
- return pvDest;
-}
-/*-----------------------------------------------------------*/
-
-int memcmp( const void *pvMem1, const void *pvMem2, size_t ulBytes )
-{
-const unsigned char *pucMem1 = pvMem1, *pucMem2 = pvMem2;
-size_t x;
-
- for( x = 0; x < ulBytes; x++ )
- {
- if( pucMem1[ x ] != pucMem2[ x ] )
- {
- break;
- }
- }
-
- return ulBytes - x;
-}
-
-
+/*\r
+ FreeRTOS V8.0.0:rc2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * This project provides two demo applications. A simple blinky style project,\r
+ * and a more comprehensive test and demo application. The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to\r
+ * select between the two. The simply blinky demo is implemented and described\r
+ * in main_blinky.c. The more comprehensive test and demo application is\r
+ * implemented and described in main_full.c.\r
+ *\r
+ * This file implements the code that is not demo specific, including the\r
+ * hardware setup and FreeRTOS hook functions.\r
+ *\r
+ * !!! IMPORTANT NOTE !!!\r
+ * The GCC libraries that ship with the Xilinx SDK make use of the floating\r
+ * point registers. To avoid this causing corruption it is necessary to avoid\r
+ * their use. For this reason main.c contains very basic C implementations of\r
+ * the standard C library functions memset(), memcpy() and memcmp(), which are\r
+ * are used by FreeRTOS itself. Defining these functions in the project \r
+ * prevents the linker pulling them in from the library. Any other standard C\r
+ * library functions that are used by the application must likewise be defined\r
+ * in C.\r
+ *\r
+ * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON\r
+ * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO\r
+ * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!\r
+ *\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Scheduler include files. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "semphr.h"\r
+\r
+/* Standard demo includes. */\r
+#include "partest.h"\r
+#include "TimerDemo.h"\r
+#include "QueueOverwrite.h"\r
+#include "EventGroupsDemo.h"\r
+\r
+/* Xilinx includes. */\r
+#include "platform.h"\r
+#include "xparameters.h"\r
+#include "xscutimer.h"\r
+#include "xscugic.h"\r
+#include "xil_exception.h"\r
+\r
+/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
+or 0 to run the more comprehensive test and demo application. */\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Configure the hardware as necessary to run this demo.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*\r
+ * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ */\r
+#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
+ extern void main_blinky( void );\r
+#else\r
+ extern void main_full( void );\r
+#endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */\r
+\r
+/*\r
+ * The Xilinx projects use a BSP that do not allow the start up code to be\r
+ * altered easily. Therefore the vector table used by FreeRTOS is defined in\r
+ * FreeRTOS_asm_vectors.S, which is part of this project. Switch to use the\r
+ * FreeRTOS vector table.\r
+ */\r
+extern void vPortInstallFreeRTOSVectorTable( void );\r
+\r
+/* Prototypes for the standard FreeRTOS callback/hook functions implemented\r
+within this file. */\r
+void vApplicationMallocFailedHook( void );\r
+void vApplicationIdleHook( void );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
+void vApplicationTickHook( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The interrupt controller is initialised in this file, and made available to\r
+other modules. */\r
+XScuGic xInterruptController;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+int main( void )\r
+{\r
+ /* Configure the hardware ready to run the demo. */\r
+ prvSetupHardware();\r
+\r
+ /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
+ of this file. */\r
+ #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )\r
+ {\r
+ main_blinky();\r
+ }\r
+ #else\r
+ {\r
+ main_full();\r
+ }\r
+ #endif\r
+\r
+ /* Don't expect to reach here. */\r
+ return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+BaseType_t xStatus;\r
+XScuGic_Config *pxGICConfig;\r
+\r
+ /* Ensure no interrupts execute while the scheduler is in an inconsistent\r
+ state. Interrupts are automatically enabled when the scheduler is\r
+ started. */\r
+ portDISABLE_INTERRUPTS();\r
+\r
+ /* Obtain the configuration of the GIC. */\r
+ pxGICConfig = XScuGic_LookupConfig( XPAR_SCUGIC_SINGLE_DEVICE_ID );\r
+\r
+ /* Sanity check the FreeRTOSConfig.h settings are correct for the\r
+ hardware. */\r
+ configASSERT( pxGICConfig );\r
+ configASSERT( pxGICConfig->CpuBaseAddress == ( configINTERRUPT_CONTROLLER_BASE_ADDRESS + configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ) );\r
+ configASSERT( pxGICConfig->DistBaseAddress == configINTERRUPT_CONTROLLER_BASE_ADDRESS );\r
+\r
+ /* Install a default handler for each GIC interrupt. */\r
+ xStatus = XScuGic_CfgInitialize( &xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress );\r
+ configASSERT( xStatus == XST_SUCCESS );\r
+ ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
+\r
+ /* Initialise the LED port. */\r
+ vParTestInitialise();\r
+\r
+ /* The Xilinx projects use a BSP that do not allow the start up code to be\r
+ altered easily. Therefore the vector table used by FreeRTOS is defined in\r
+ FreeRTOS_asm_vectors.S, which is part of this project. Switch to use the\r
+ FreeRTOS vector table. */\r
+ vPortInstallFreeRTOSVectorTable();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationMallocFailedHook( void )\r
+{\r
+ /* Called if a call to pvPortMalloc() fails because there is insufficient\r
+ free memory available in the FreeRTOS heap. pvPortMalloc() is called\r
+ internally by FreeRTOS API functions that create tasks, queues, software\r
+ timers, and semaphores. The size of the FreeRTOS heap is set by the\r
+ configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */\r
+ taskDISABLE_INTERRUPTS();\r
+ for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
+{\r
+ ( void ) pcTaskName;\r
+ ( void ) pxTask;\r
+\r
+ /* Run time stack overflow checking is performed if\r
+ configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook\r
+ function is called if a stack overflow is detected. */\r
+ taskDISABLE_INTERRUPTS();\r
+ for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationIdleHook( void )\r
+{\r
+volatile size_t xFreeHeapSpace;\r
+\r
+ /* This is just a trivial example of an idle hook. It is called on each\r
+ cycle of the idle task. It must *NOT* attempt to block. In this case the\r
+ idle task just queries the amount of FreeRTOS heap that remains. See the\r
+ memory management section on the http://www.FreeRTOS.org web site for memory\r
+ management options. If there is a lot of heap memory free then the\r
+ configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up\r
+ RAM. */\r
+ xFreeHeapSpace = xPortGetFreeHeapSize();\r
+\r
+ /* Remove compiler warning about xFreeHeapSpace being set but never used. */\r
+ ( void ) xFreeHeapSpace;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vAssertCalled( const char * pcFile, unsigned long ulLine )\r
+{\r
+volatile unsigned long ul = 0;\r
+\r
+ ( void ) pcFile;\r
+ ( void ) ulLine;\r
+\r
+ taskENTER_CRITICAL();\r
+ {\r
+ /* Set ul to a non-zero value using the debugger to step out of this\r
+ function. */\r
+ while( ul == 0 )\r
+ {\r
+ portNOP();\r
+ }\r
+ }\r
+ taskEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationTickHook( void )\r
+{\r
+ #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )\r
+ {\r
+ /* The full demo includes a software timer demo/test that requires\r
+ prodding periodically from the tick interrupt. */\r
+ vTimerPeriodicISRTests();\r
+\r
+ /* Call the periodic queue overwrite from ISR demo. */\r
+ vQueueOverwritePeriodicISRDemo();\r
+\r
+ /* Call the periodic event group from ISR demo. */\r
+ vPeriodicEventGroupsProcessing();\r
+ }\r
+ #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void *memcpy( void *pvDest, const void *pvSource, size_t ulBytes )\r
+{\r
+unsigned char *pcDest = ( unsigned char * ) pvDest, *pcSource = ( unsigned char * ) pvSource;\r
+size_t x;\r
+\r
+ for( x = 0; x < ulBytes; x++ )\r
+ {\r
+ *pcDest = *pcSource;\r
+ pcDest++;\r
+ pcSource++;\r
+ }\r
+\r
+ return pvDest;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void *memset( void *pvDest, int iValue, size_t ulBytes )\r
+{\r
+unsigned char *pcDest = ( unsigned char * ) pvDest;\r
+size_t x;\r
+\r
+ for( x = 0; x < ulBytes; x++ )\r
+ {\r
+ *pcDest = ( unsigned char ) iValue;\r
+ pcDest++;\r
+ }\r
+\r
+ return pvDest;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+int memcmp( const void *pvMem1, const void *pvMem2, size_t ulBytes )\r
+{\r
+const unsigned char *pucMem1 = pvMem1, *pucMem2 = pvMem2;\r
+size_t x;\r
+\r
+ for( x = 0; x < ulBytes; x++ )\r
+ {\r
+ if( pucMem1[ x ] != pucMem2[ x ] )\r
+ {\r
+ break;\r
+ }\r
+ }\r
+\r
+ return ulBytes - x;\r
+}\r
+\r
+\r
// External delay 1 ms function\r
#include "FreeRTOS.h"\r
#include "task.h"\r
-#define Delay(ms) vTaskDelay(ms/portTICK_RATE_MS)\r
+#define Delay(ms) vTaskDelay(ms/portTICK_PERIOD_MS)\r
\r
//------------------------------------------------------------------------------\r
// Global functions\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook). */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The LCD task uses the sprintf function so requires a little more stack too. */\r
#define mainLCD_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )\r
* Hook functions that can get called by the kernel. The 'check' functionality\r
* is implemented within the tick hook.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The tick hook function as described in the comments at the top of this file.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r
#define vInterruptOff() BOARD_USART_BASE->US_IDR = AT91C_US_TXRDY\r
\r
/* Misc constants. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )\r
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )\r
\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Place the character in the queue of characters to be transmitted. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
\r
/* The Tx task will transmit the sequence of characters at a pseudo random\r
interval. This is the maximum and minimum block time between sends. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 )\r
-#define comOFFSET_TIME ( ( portTickType ) 3 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 )\r
+#define comOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* We should find that each character can be queued for Tx immediately and we\r
don't have to block to send. */\r
-#define comNO_BLOCK ( ( portTickType ) 0 )\r
+#define comNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The Rx task will block on the Rx queue for a long period. */\r
-#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff )\r
+#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff )\r
\r
/* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */\r
#define comFIRST_BYTE ( 'A' )\r
xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );\r
\r
/* The Tx task is spawned with a lower priority than the Rx task. */\r
- xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vComTxTask, pvParameters )\r
{\r
signed char cByteToSend;\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength );\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength );\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime );\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime );\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime );\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime );\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );\r
void vSerialClose( xComPortHandle xPort );\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The standard demo flash timers can be used to flash any number of LEDs. In\r
this case, because only three LEDs are available, and one is in use by the\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serPMC_USART_ID ( BOARD_ID_USART )\r
\r
/* The USART supported by this file. */\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
\r
/* The Tx task will transmit the sequence of characters at a pseudo random\r
interval. This is the maximum and minimum block time between sends. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 )\r
-#define comOFFSET_TIME ( ( portTickType ) 3 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 )\r
+#define comOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* We should find that each character can be queued for Tx immediately and we\r
don't have to block to send. */\r
-#define comNO_BLOCK ( ( portTickType ) 0 )\r
+#define comNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The Rx task will block on the Rx queue for a long period. */\r
-#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff )\r
+#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff )\r
\r
/* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */\r
#define comFIRST_BYTE ( 'A' )\r
xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );\r
\r
/* The Tx task is spawned with a lower priority than the Rx task. */\r
- xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vComTxTask, pvParameters )\r
{\r
signed char cByteToSend;\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength );\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength );\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime );\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime );\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime );\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime );\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );\r
void vSerialClose( xComPortHandle xPort );\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The standard demo flash timers can be used to flash any number of LEDs. In\r
this case, because only three LEDs are available, and one is in use by the\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serPMC_USART_ID ( BOARD_ID_USART )\r
\r
/* The USART supported by this file. */\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
CY_ISR_PROTO( vUartTxISR );\r
/*---------------------------------------------------------------------------*/\r
\r
-static xQueueHandle xSerialTxQueue = NULL;\r
-static xQueueHandle xSerialRxQueue = NULL;\r
+static QueueHandle_t xSerialTxQueue = NULL;\r
+static QueueHandle_t xSerialRxQueue = NULL;\r
/*---------------------------------------------------------------------------*/\r
\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
void vCheckTask( void *pvParameters )\r
{\r
unsigned long ulRow = 0;\r
-portTickType xDelay = 0;\r
+TickType_t xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
extern unsigned short usMaxJitter;\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* The stack space has been execeeded for a task, considering allocating more. */\r
taskDISABLE_INTERRUPTS();\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
CY_ISR_PROTO( vUartTxISR );\r
/*---------------------------------------------------------------------------*/\r
\r
-static xQueueHandle xSerialTxQueue = NULL;\r
-static xQueueHandle xSerialRxQueue = NULL;\r
+static QueueHandle_t xSerialTxQueue = NULL;\r
+static QueueHandle_t xSerialRxQueue = NULL;\r
/*---------------------------------------------------------------------------*/\r
\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
void vCheckTask( void *pvParameters )\r
{\r
unsigned long ulRow = 0;\r
-portTickType xDelay = 0;\r
+TickType_t xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
extern unsigned short usMaxJitter;\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* The stack space has been execeeded for a task, considering allocating more. */\r
taskDISABLE_INTERRUPTS();\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
CY_ISR_PROTO( vUartTxISR );\r
/*---------------------------------------------------------------------------*/\r
\r
-static xQueueHandle xSerialTxQueue = NULL;\r
-static xQueueHandle xSerialRxQueue = NULL;\r
+static QueueHandle_t xSerialTxQueue = NULL;\r
+static QueueHandle_t xSerialRxQueue = NULL;\r
/*---------------------------------------------------------------------------*/\r
\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdFALSE;\r
\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
void vCheckTask( void *pvParameters )\r
{\r
unsigned long ulRow = 0;\r
-portTickType xDelay = 0;\r
+TickType_t xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
extern unsigned short usMaxJitter;\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* The stack space has been execeeded for a task, considering allocating more. */\r
taskDISABLE_INTERRUPTS();\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( 14000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
{\r
memcpy(buffer, scrolltext + i, 7);\r
LCD_Write(lcd, buffer);\r
- vTaskDelay(100/portTICK_RATE_MS);\r
+ vTaskDelay(100/portTICK_PERIOD_MS);\r
}\r
}\r
\r
/* Demo includes. */\r
#include "lcdtest.h"\r
\r
-#define lcdSHORT_DELAY ( 60 / portTICK_RATE_MS )\r
-#define lcdQUARTER_SECOND ( 250 / portTICK_RATE_MS )\r
-#define lcdONE_SECOND ( 1000 / portTICK_RATE_MS )\r
+#define lcdSHORT_DELAY ( 60 / portTICK_PERIOD_MS )\r
+#define lcdQUARTER_SECOND ( 250 / portTICK_PERIOD_MS )\r
+#define lcdONE_SECOND ( 1000 / portTICK_PERIOD_MS )\r
\r
void vLCDTask( void *pvParameters )\r
{\r
/* Demo app includes. */\r
#include "ledtest.h"\r
\r
-#define lLEDOnE_SECOND ( 1000UL / portTICK_RATE_MS )\r
+#define lLEDOnE_SECOND ( 1000UL / portTICK_PERIOD_MS )\r
\r
void vLEDTask( void *pvParameters )\r
{\r
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
\r
/* A period of two seconds, adjusted to use the tick frequency. */\r
-#define mainTWO_SECONDS ( 2000 / portTICK_RATE_MS )\r
+#define mainTWO_SECONDS ( 2000 / portTICK_PERIOD_MS )\r
\r
/* The length of the delay between each cycle of the check task when an error\r
has / has not been detected. */\r
-#define mainNO_ERROR_CHECK_FREQUENCY ( 5000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_FREQUENCY ( 200 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_FREQUENCY ( 5000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_FREQUENCY ( 200 / portTICK_PERIOD_MS )\r
\r
/* The LED that is toggled by the check task. The rate of the toggle indicates\r
whether or not an error has been found, as defined by the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will be called if a task overflows its stack, if\r
configCHECK_FOR_STACK_OVERFLOW != 0. It might be that the function\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime, xFrequency = mainNO_ERROR_CHECK_FREQUENCY;\r
+TickType_t xLastExecutionTime, xFrequency = mainNO_ERROR_CHECK_FREQUENCY;\r
long lCount;\r
\r
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 96000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The LED that is turned on by pressing SW2 remains on until the button has not\r
been pushed for a full 5000ms. */\r
-#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the two simple LED flash timers will execute their\r
callback functions. */\r
-#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
-#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_RATE_MS )\r
+#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
+#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
* The LED/button timer callback function. This does nothing but switch an LED\r
* off.\r
*/\r
-static void prvButtonLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvButtonLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The callback function used by both simple LED flash timers. Both timers use\r
* the same callback, so the function parameter is used to determine which LED\r
* should be flashed (effectively to determine which timer has expired).\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Contains the implementation of the web server.\r
\r
/* The LED/Button software timer. This uses prvButtonLEDTimerCallback() as it's\r
callback function. */\r
-static xTimerHandle xLEDButtonTimer = NULL;\r
+static TimerHandle_t xLEDButtonTimer = NULL;\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* LED timers - these simply flash LEDs, each using a different frequency. Both\r
use the same prvLEDTimerCallback() callback function. */\r
-static xTimerHandle xLED1Timer = NULL, xLED2Timer = NULL;\r
+static TimerHandle_t xLED1Timer = NULL, xLED2Timer = NULL;\r
\r
/* If an error is detected in a standard demo task, then pcStatusMessage will\r
be set to point to a string that identifies the offending task. This is just\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvButtonLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvButtonLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
unsigned long ulLED;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The LED will remain on until the button has not been pushed for a full\r
5000ms. */\r
-#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void prvButtonLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvButtonLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses prvButtonLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xButtonLEDTimer = NULL;\r
+static TimerHandle_t xButtonLEDTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvButtonLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvButtonLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void prvInitialise_uIP( void )\r
{\r
uip_ipaddr_t xIPAddr;\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
\r
uip_init();\r
uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 500UL / portTICK_RATE_MS ),\r
+ ( 500UL / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
#define emacTX_INTERRUPT_NO ( 76 )\r
#define emacRX_INTERRUPT_NO ( 77 )\r
#define emacERROR_INTERRUPT_NO ( 78 )\r
-#define emacLINK_DELAY ( 500 / portTICK_RATE_MS )\r
+#define emacLINK_DELAY ( 500 / portTICK_PERIOD_MS )\r
#define emacPHY_STATUS ( 0x1F )\r
#define emacPHY_DUPLEX_STATUS ( 4 << 2 )\r
#define emacPHY_SPEED_STATUS ( 1 << 2 )\r
{\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
\r
/* Clear the interrupt. */\r
ENET_EIR = ENET_EIR_RXF_MASK;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define mainOFFSET_TIME ( ( portTickType ) 3 )\r
+#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define mainOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
\r
/* The queue used to transmit characters from the interrupt to the Comms Rx\r
task. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define mainOFFSET_TIME ( ( portTickType ) 3 )\r
+#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define mainOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
\r
/* The queue used to transmit characters from the interrupt to the Comms Rx\r
task. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define mainOFFSET_TIME ( ( portTickType ) 3 )\r
+#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define mainOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
\r
/* The queue used to transmit characters from the interrupt to the Comms Rx\r
task. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define mainOFFSET_TIME ( ( portTickType ) 3 )\r
+#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define mainOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
\r
/* The queue used to transmit characters from the interrupt to the Comms Rx\r
task. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define mainOFFSET_TIME ( ( portTickType ) 3 )\r
+#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define mainOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
\r
/* The queue used to transmit characters from the interrupt to the Comms Rx\r
task. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
\r
/* The queue used to communicate between the I2C interrupt and the I2C \r
co-routine. */\r
-static xQueueHandle xADCQueue;\r
+static QueueHandle_t xADCQueue;\r
\r
/* The queue used to synchronise the flash co-routines. */\r
-static xQueueHandle xDelayQueue;\r
+static QueueHandle_t xDelayQueue;\r
\r
/*\r
* Sets up the PLL, I2C and GPIO used by the demo.\r
\r
/* Create the queue used to communicate between the ISR and I2C co-routine.\r
This can only ever contain one value. */\r
- xADCQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( portTickType ) );\r
+ xADCQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( TickType_t ) );\r
\r
/* Create the queue used to synchronise the flash co-routines. The queue\r
is used to trigger three tasks, but is for synchronisation only and does\r
\r
static void vI2CCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xADCResult;\r
+TickType_t xADCResult;\r
static portBASE_TYPE xResult = 0, xMilliSecs, xLED;\r
\r
crSTART( xHandle );\r
/* Scale the result to give a useful range of values for a visual \r
demo. */\r
xADCResult >>= 2;\r
- xMilliSecs = xADCResult / portTICK_RATE_MS;\r
+ xMilliSecs = xADCResult / portTICK_PERIOD_MS;\r
\r
/* The delay is split between the four co-routines so they remain in\r
synch. */\r
\r
void vI2C_ISR(void)\r
{\r
-static portTickType xReading;\r
+static TickType_t xReading;\r
\r
/* Clear the interrupt. */\r
I2CMasterIntClear( I2C_MASTER_BASE );\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3000 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
\r
/* The time between transmissions of the string on UART 0. This is pseudo\r
random in order to generate a bit or randomness to when the interrupts occur.*/\r
-#define commsMIN_TX_DELAY ( 40 / portTICK_RATE_MS )\r
-#define commsMAX_TX_DELAY ( ( portTickType ) 0x7f )\r
-#define commsOFFSET_TIME ( ( portTickType ) 3 )\r
+#define commsMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS )\r
+#define commsMAX_TX_DELAY ( ( TickType_t ) 0x7f )\r
+#define commsOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* The time the Comms Rx task should wait to receive a character. This should\r
be slightly longer than the time between transmissions. If we do not receive\r
static unsigned portBASE_TYPE uxCommsErrorStatus = pdPASS;\r
\r
/* The queue used to pass characters out of the ISR. */\r
-static xQueueHandle xCommsQueue;\r
+static QueueHandle_t xCommsQueue;\r
\r
/* The next character to transmit. */\r
static char cNextChar;\r
\r
void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
-portTickType xDelayPeriod;\r
+TickType_t xDelayPeriod;\r
static unsigned long *pulRandomBytes = commsFIRST_PROGRAM_BYTES;\r
\r
/* Co-routine MUST start with a call to crSTART. */\r
#include "DriverLib.h"\r
\r
/* The time to delay between writing each character to the LCD. */\r
-#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )\r
+#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS )\r
\r
/* The time to delay between writing each string to the LCD. */\r
-#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )\r
+#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS )\r
\r
-#define mainADC_DELAY ( 200 / portTICK_RATE_MS )\r
+#define mainADC_DELAY ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_CO_ROUTINES ( 5 )\r
unsigned portBASE_TYPE uxErrorStatus = pdPASS;\r
\r
/* The queue used to transmit messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
""\r
};\r
\r
-xQueueHandle *pxLCDQueue; \r
+QueueHandle_t *pxLCDQueue; \r
xLCDMessage xMessageToSend;\r
portBASE_TYPE xIndex = 0;\r
\r
/* To test the parameter passing mechanism, the queue on which messages are\r
posted is passed in as a parameter even though it is available as a file\r
scope variable anyway. */\r
- pxLCDQueue = ( xQueueHandle * ) pvParameters;\r
+ pxLCDQueue = ( QueueHandle_t * ) pvParameters;\r
\r
for( ;; )\r
{\r
void prvLCDTask( void * pvParameters )\r
{\r
unsigned portBASE_TYPE uxIndex;\r
-xQueueHandle *pxLCDQueue;\r
+QueueHandle_t *pxLCDQueue;\r
xLCDMessage xReceivedMessage;\r
char *pcString;\r
const unsigned char ucCFGData[] = { \r
/* To test the parameter passing mechanism, the queue on which messages are\r
received is passed in as a parameter even though it is available as a file\r
scope variable anyway. */\r
- pxLCDQueue = ( xQueueHandle * ) pvParameters;\r
+ pxLCDQueue = ( QueueHandle_t * ) pvParameters;\r
\r
/* Configure the LCD. */\r
uxIndex = 0;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#include "BlockQ.h"\r
\r
/* Delay between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* UART configuration - note this does not use the FIFO so is not very\r
efficient. */\r
\r
/* Misc. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS )\r
-#define mainNO_DELAY ( ( portTickType ) 0 )\r
+#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS )\r
+#define mainNO_DELAY ( ( TickType_t ) 0 )\r
/*\r
* Configure the processor and peripherals for this demo.\r
*/\r
\r
/* The semaphore used to wake the button handler task from within the GPIO\r
interrupt handler. */\r
-xSemaphoreHandle xButtonSemaphore;\r
+SemaphoreHandle_t xButtonSemaphore;\r
\r
/* The queue used to send strings to the print task for display on the LCD. */\r
-xQueueHandle xPrintQueue;\r
+QueueHandle_t xPrintQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
const char *pcPassMessage = "PASS";\r
const char *pcFailMessage = "FAIL";\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#include "BlockQ.h"\r
\r
/* Delay between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* UART configuration - note this does not use the FIFO so is not very\r
efficient. */\r
\r
/* Misc. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS )\r
-#define mainNO_DELAY ( ( portTickType ) 0 )\r
+#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS )\r
+#define mainNO_DELAY ( ( TickType_t ) 0 )\r
/*\r
* Configure the processor and peripherals for this demo.\r
*/\r
\r
/* The semaphore used to wake the button handler task from within the GPIO\r
interrupt handler. */\r
-xSemaphoreHandle xButtonSemaphore;\r
+SemaphoreHandle_t xButtonSemaphore;\r
\r
/* The queue used to send strings to the print task for display on the LCD. */\r
-xQueueHandle xPrintQueue;\r
+QueueHandle_t xPrintQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
const char *pcPassMessage = "PASS";\r
const char *pcFailMessage = "FAIL";\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) )\r
#define configMAX_TASK_NAME_LEN ( 3 )\r
#include "BlockQ.h"\r
\r
/* Delay between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* UART configuration - note this does not use the FIFO so is not very \r
efficient. */\r
\r
/* Misc. */\r
#define mainQUEUE_SIZE ( 3 )\r
-#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS )\r
-#define mainNO_DELAY ( ( portTickType ) 0 )\r
+#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS )\r
+#define mainNO_DELAY ( ( TickType_t ) 0 )\r
/*\r
* Configure the processor and peripherals for this demo. \r
*/\r
\r
/* The semaphore used to wake the button handler task from within the GPIO\r
interrupt handler. */\r
-xSemaphoreHandle xButtonSemaphore;\r
+SemaphoreHandle_t xButtonSemaphore;\r
\r
/* The queue used to send strings to the print task for display on the LCD. */\r
-xQueueHandle xPrintQueue;\r
+QueueHandle_t xPrintQueue;\r
\r
/* Newer library version. */\r
extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, unsigned long ulBaud, unsigned long ulConfig);\r
static void vCheckTask( void *pvParameters )\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
const char *pcPassMessage = "PASS";\r
const char *pcFailMessage = "FAIL";\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Size of the stack allocated to the uIP task. */\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the OLED task. */\r
-xQueueHandle xOLEDQueue;\r
+QueueHandle_t xOLEDQueue;\r
\r
/* The welcome text. */\r
const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/* The semaphore used to wake the interrupt handler task. The peripheral\r
is processed at the task level to prevent the need to read the entire FIFO from\r
within the ISR itself. */\r
-xSemaphoreHandle xMACInterruptSemaphore = NULL;\r
+SemaphoreHandle_t xMACInterruptSemaphore = NULL;\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xOLEDQueue;\r
+extern QueueHandle_t xOLEDQueue;\r
xOLEDMessage xOLEDMessage;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Size of the stack allocated to the uIP task. */\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )\r
/*\r
* Hook functions that can get called by the kernel.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the OLED task. */\r
-xQueueHandle xOLEDQueue;\r
+QueueHandle_t xOLEDQueue;\r
\r
/* The welcome text. */\r
const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/* The semaphore used to wake the interrupt handler task. The peripheral\r
is processed at the task level to prevent the need to read the entire FIFO from\r
within the ISR itself. */\r
-xSemaphoreHandle xMACInterruptSemaphore = NULL;\r
+SemaphoreHandle_t xMACInterruptSemaphore = NULL;\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xOLEDQueue;\r
+extern QueueHandle_t xOLEDQueue;\r
xOLEDMessage xOLEDMessage;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 50000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Size of the stack allocated to the uIP task. */\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the OLED task. */\r
-xQueueHandle xOLEDQueue;\r
+QueueHandle_t xOLEDQueue;\r
\r
/* The welcome text. */\r
const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/* The semaphore used to wake the interrupt handler task. The peripheral\r
is processed at the task level to prevent the need to read the entire FIFO from\r
within the ISR itself. */\r
-xSemaphoreHandle xMACInterruptSemaphore = NULL;\r
+SemaphoreHandle_t xMACInterruptSemaphore = NULL;\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xOLEDQueue;\r
+extern QueueHandle_t xOLEDQueue;\r
xOLEDMessage xOLEDMessage;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
#include "LPC17xx.h"\r
\r
-#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS )\r
+#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS )\r
#define usbBUFFER_LEN ( 20 )\r
\r
#define INCREMENT_ECHO_BY 1\r
static unsigned char abBulkBuf[64];\r
static unsigned char abClassReqData[8];\r
\r
-static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL;\r
+static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL;\r
\r
// forward declaration of interrupt handler\r
void USBIntHandler(void);\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will get called if a task overflows its stack. */\r
\r
#include "EthDev_LPC17xx.h"\r
\r
/* Time to wait between each inspection of the link status. */\r
-#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS )\r
+#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS )\r
\r
/* Short delay used in several places during the initialisation process. */\r
#define emacSHORT_DELAY ( 2 )\r
#define emacPINSEL2_VALUE 0x50150105\r
\r
/* If no buffers are available, then wait this long before looking again.... */\r
-#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS )\r
\r
/* ...and don't look more than this many times. */\r
#define emacBUFFER_WAIT_ATTEMPTS ( 30 )\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/* Each ucBufferInUse index corresponds to a position in the pool of buffers.\r
If the index contains a 1 then the buffer within pool is in use, if it\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
#include "LPC17xx.h"\r
\r
-#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS )\r
+#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS )\r
#define usbBUFFER_LEN ( 20 )\r
\r
#define INCREMENT_ECHO_BY 1\r
static unsigned char abBulkBuf[64];\r
static unsigned char abClassReqData[8];\r
\r
-static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL;\r
+static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL;\r
\r
// forward declaration of interrupt handler\r
void USBIntHandler(void);\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook). */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will get called if a task overflows its stack. */\r
\r
#include "EthDev_LPC17xx.h"\r
\r
/* Time to wait between each inspection of the link status. */\r
-#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS )\r
+#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS )\r
\r
/* Short delay used in several places during the initialisation process. */\r
#define emacSHORT_DELAY ( 2 )\r
#define emacPINSEL2_VALUE ( 0x50150105 )\r
\r
/* If no buffers are available, then wait this long before looking again.... */\r
-#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS )\r
\r
/* ...and don't look more than this many times. */\r
#define emacBUFFER_WAIT_ATTEMPTS ( 30 )\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/* Each ucBufferInUse index corresponds to a position in the pool of buffers.\r
If the index contains a 1 then the buffer within pool is in use, if it\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
#include "LPC17xx.h"\r
\r
-#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS )\r
+#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS )\r
#define usbBUFFER_LEN ( 20 )\r
\r
#define INCREMENT_ECHO_BY 1\r
static unsigned char abBulkBuf[64];\r
static unsigned char abClassReqData[8];\r
\r
-static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL;\r
+static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL;\r
\r
// forward declaration of interrupt handler\r
void USBIntHandler(void);\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook). */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The toggle rate for the LED. */\r
-#define mainLED_TOGGLE_RATE ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainLED_TOGGLE_RATE ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
static void prvFlashTask( void *pvParameters )\r
{\r
-portTickType xLastFlashTime;\r
+TickType_t xLastFlashTime;\r
\r
/* We need to initialise xLastFlashTime prior to the first call to\r
vTaskDelayUntil(). */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will get called if a task overflows its stack. */\r
\r
#include "EthDev_LPC17xx.h"\r
\r
/* Time to wait between each inspection of the link status. */\r
-#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS )\r
+#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS )\r
\r
/* Short delay used in several places during the initialisation process. */\r
#define emacSHORT_DELAY ( 2 )\r
#define emacDIV_44 ( 0x28 )\r
\r
/* If no buffers are available, then wait this long before looking again.... */\r
-#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS )\r
\r
/* ...and don't look more than this many times. */\r
#define emacBUFFER_WAIT_ATTEMPTS ( 30 )\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
\r
/* Each ucBufferInUse index corresponds to a position in the pool of buffers.\r
If the index contains a 1 then the buffer within pool is in use, if it\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
#define cmdMAX_INPUT_SIZE 50\r
\r
/* The maximum time in ticks to wait for the UART access mutex. */\r
-#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS )\r
+#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS )\r
\r
/* Characters are only ever received slowly on the CLI so it is ok to pass\r
received characters from the UART interrupt to the task on a queue. This sets\r
\r
/* This semaphore is used to allow the task to wait for a Tx to complete\r
without wasting any CPU time. */\r
-static xSemaphoreHandle xTxCompleteSemaphore = NULL;\r
+static SemaphoreHandle_t xTxCompleteSemaphore = NULL;\r
\r
/* This semaphore is sued to allow the task to wait for an Rx to complete\r
without wasting any CPU time. */\r
-static xSemaphoreHandle xRxCompleteSemaphore = NULL;\r
+static SemaphoreHandle_t xRxCompleteSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffer, size_t xBufferLength )\r
{\r
-const portTickType xBlockMax100ms = 100UL / portTICK_RATE_MS;\r
+const TickType_t xBlockMax100ms = 100UL / portTICK_PERIOD_MS;\r
\r
if( xBufferLength > 0 )\r
{\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( system_clock_source_get_hz( SYSTEM_CLOCK_SOURCE_DFLL ) )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 500 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 500 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16000 ) )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire provided no errors have\r
been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the comprehensive test/demo application if\r
\r
void main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* The register test tasks are asm functions that don't use a stack. The\r
stack allocated just has to be large enough to hold the task context, and\r
/*-----------------------------------------------------------*/\r
\r
/* See the description at the top of this file. */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
*/\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 500 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 500 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 11000 ) )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire provided no errors have\r
been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
\r
/* The base toggle rate used by the flash timers. Each toggle rate is a\r
multiple of this. */\r
-#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_RATE_MS )\r
+#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The LED toggle by the check timer. */\r
#define mainCHECK_LED ( 4 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The flash timer callback function, as described at the top of this file.\r
* This callback function is assigned to three separate software timers.\r
*/\r
-static void prvFlashTimerCallback( xTimerHandle xTimer );\r
+static void prvFlashTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The task that toggles an LED each time the semaphore 'given' by the tick\r
/* The semaphore that is given by the tick hook function (defined in main.c)\r
and taken by the task implemented by the prvSemaphoreTakeTask() function. The\r
task toggles LED mainSEMAPHORE_LED each time the semaphore is taken. */\r
-xSemaphoreHandle xLEDSemaphore = NULL;\r
+SemaphoreHandle_t xLEDSemaphore = NULL;\r
/*-----------------------------------------------------------*/\r
\r
void main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
unsigned long ulTimer;\r
const unsigned long ulTimersToCreate = 3L;\r
/* The register test tasks are asm functions that don't use a stack. The\r
/*-----------------------------------------------------------*/\r
\r
/* See the description at the top of this file. */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFlashTimerCallback( xTimerHandle xTimer )\r
+static void prvFlashTimerCallback( TimerHandle_t xTimer )\r
{\r
unsigned long ulLED;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0\r
{\r
static unsigned long ulLastGiveTime = 0UL;\r
- const unsigned long ulRate = 50UL / portTICK_RATE_MS;\r
- extern xSemaphoreHandle xLEDSemaphore;\r
+ const unsigned long ulRate = 50UL / portTICK_PERIOD_MS;\r
+ extern SemaphoreHandle_t xLEDSemaphore;\r
\r
configASSERT( xLEDSemaphore );\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6500 ) )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire provided no errors have\r
been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the comprehensive test/demo application if\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
/* The register test tasks are asm functions that don't use a stack. The\r
stack allocated just has to be large enough to hold the task context, and\r
for the additional required for the stack overflow checking to work (if\r
/*-----------------------------------------------------------*/\r
\r
/* See the description at the top of this file. */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6500 ) )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire provided no errors have\r
been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
\r
/* The base toggle rate used by the flash timers. Each toggle rate is a\r
multiple of this. */\r
-#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_RATE_MS )\r
+#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The LED toggle by the check timer. */\r
#define mainCHECK_LED ( 3 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The flash timer callback function, as described at the top of this file.\r
* This callback function is assigned to three separate software timers.\r
*/\r
-static void prvFlashTimerCallback( xTimerHandle xTimer );\r
+static void prvFlashTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the comprehensive test/demo application if\r
\r
void main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
unsigned long ulTimer;\r
const unsigned long ulTimersToCreate = 3L;\r
/* The register test tasks are asm functions that don't use a stack. The\r
/*-----------------------------------------------------------*/\r
\r
/* See the description at the top of this file. */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFlashTimerCallback( xTimerHandle xTimer )\r
+static void prvFlashTimerCallback( TimerHandle_t xTimer )\r
{\r
unsigned long ulLED;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 204000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )\r
\r
/* The queue used to communicate toggle commands with the I2C gatekeeper\r
task. */\r
-static xQueueHandle xI2CCommandQueue = NULL;\r
+static QueueHandle_t xI2CCommandQueue = NULL;\r
/*-----------------------------------------------------------*/\r
\r
void vParTestInitialise( void )\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo.\r
Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register check tasks, and the tasks used to write over and check the contents\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
{\r
#if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 )\r
{\r
- xTimerHandle xCheckTimer = NULL;\r
+ TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. */\r
vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 75 * 1024 ) )\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo.\r
Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Configure the interrupts used to test the interrupt nesting depth as\r
\r
/* The semaphore used to demonstrate a task being synchronised with an\r
interrupt. */\r
-static xSemaphoreHandle xTestSemaphore = NULL;\r
+static SemaphoreHandle_t xTestSemaphore = NULL;\r
\r
/* The variable that is incremented by the task synchronised with the button\r
interrupt. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
{\r
#if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 )\r
{\r
- xTimerHandle xCheckTimer = NULL;\r
+ TimerHandle_t xCheckTimer = NULL;\r
\r
/* Configure the interrupts used to test FPU registers being used from\r
nested interrupts. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
free) the network buffers are themselves blocked waiting for a network buffer.\r
ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in\r
milliseconds can be converted to a time in ticks by dividing the time in\r
-milliseconds by portTICK_RATE_MS. */\r
-#define ipconfigMAX_SEND_BLOCK_TIME_TICKS ( 20 / portTICK_RATE_MS )\r
+milliseconds by portTICK_PERIOD_MS. */\r
+#define ipconfigMAX_SEND_BLOCK_TIME_TICKS ( 20 / portTICK_PERIOD_MS )\r
\r
/* If ipconfigUSE_DHCP is 1 then FreeRTOS+UDP will attempt to retrieve an IP\r
address, netmask, DNS server address and gateway address from a DHCP server. If\r
static IP address passed as a parameter to FreeRTOS_IPInit() if the\r
re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without\r
a DHCP reply being received. */\r
-#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 999 / portTICK_RATE_MS )\r
+#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 999 / portTICK_PERIOD_MS )\r
\r
/* The ARP cache is a table that maps IP addresses to MAC addresses. The IP\r
stack can only send a UDP message to a remove IP address if it knowns the MAC\r
/* The windows simulator cannot really simulate MAC interrupts, and needs to\r
block occasionally to allow other tasks to run. */\r
#ifdef _WINDOWS_\r
- #define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 3 / portTICK_RATE_MS )\r
+ #define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 3 / portTICK_PERIOD_MS )\r
#endif\r
\r
/* The example IP trace macros are included here so the definitions are\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
#define mainQUEUE_LENGTH ( 1 )\r
\r
/* The period of the blinky software timer. The period is specified in ms and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0 )\r
* The callback function for the blinky software timer, as described at the top\r
* of this file.\r
*/\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the simply blinky style application if\r
\r
void main_blinky( void )\r
{\r
-xTimerHandle xTimer;\r
-xQueueHandle xQueue;\r
+TimerHandle_t xTimer;\r
+QueueHandle_t xQueue;\r
\r
/* Create the queue. */\r
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
\r
/* The handle of the queue is passed in using the task's parameter. */\r
- xQueue = ( xQueueHandle ) pvParameters;\r
+ xQueue = ( QueueHandle_t ) pvParameters;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
xNextWakeTime = xTaskGetTickCount();\r
static void prvQueueReceiveTask( void *pvParameters )\r
{\r
unsigned long ulReceivedValue;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
\r
/* The queue is passed in as the task's parameter. */\r
- xQueue = ( xQueueHandle ) pvParameters;\r
+ xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Avoid compiler warnings. */\r
( void ) xTimer;\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The priorities of the various demo application tasks. */\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Creates a set of sample files on a RAM disk. http://www.FreeRTOS.org/fat_sl\r
\r
int main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* Usage instructions on http://www.FreeRTOS.org/Atmel_SAM4E_RTOS_Demo.html */\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorOccurred = pdFALSE;\r
/* Holds the maximum number of ticks that can be suppressed - which is\r
basically how far into the future an interrupt can be generated. Set\r
during initialisation. */\r
-static portTickType xMaximumPossibleSuppressedTicks = 0;\r
+static TickType_t xMaximumPossibleSuppressedTicks = 0;\r
\r
/* Flag set from the tick interrupt to allow the sleep processing to know if\r
sleep mode was exited because of an AST interrupt or a different interrupt. */\r
defined in the FreeRTOS Cortex-M3 port layer with a version that manages the\r
asynchronous timer (AST), as the tick is generated from the low power AST and\r
not the SysTick as would normally be the case on a Cortex-M. */\r
-void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime )\r
+void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )\r
{\r
uint32_t ulAlarmValue, ulCompleteTickPeriods, ulInterruptStatus;\r
eSleepModeStatus eSleepAction;\r
-portTickType xModifiableIdleTime;\r
+TickType_t xModifiableIdleTime;\r
enum sleepmgr_mode xSleepMode;\r
\r
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */\r
#define configCPU_CLOCK_HZ 16384\r
#define configSYSTICK_CLOCK_HZ 16384\r
#define configUSE_TICKLESS_IDLE 1\r
- #define configTICK_RATE_HZ ( ( portTickType ) 128 )\r
+ #define configTICK_RATE_HZ ( ( TickType_t ) 128 )\r
#else\r
#define configCPU_CLOCK_HZ sysclk_get_cpu_hz()\r
#define configUSE_TICKLESS_IDLE 0\r
- #define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+ #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#endif /* configCREATE_LOW_POWER_DEMO */\r
\r
#define configUSE_PREEMPTION 1\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
/* The period after which the check timer will expire providing no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The LED toggled by the check timer. */\r
#define mainCHECK_LED ( 0 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. They have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
#define mainQUEUE_LED ( 0 )\r
\r
/* The rate at which the Tx task sends to the queue. */\r
-#define mainTX_DELAY ( 500UL / portTICK_RATE_MS )\r
+#define mainTX_DELAY ( 500UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0 )\r
/* The length of time the LED will remain on for. It is on just long enough\r
to be able to see with the human eye so as not to distort the power readings too\r
much. */\r
-#define mainLED_TOGGLE_DELAY ( 20 / portTICK_RATE_MS )\r
+#define mainLED_TOGGLE_DELAY ( 20 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue to pass data from the Tx task to the Rx task. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* The Tx task will transmit the sequence of characters at a pseudo random\r
interval. This is the maximum and minimum block time between sends. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 )\r
-#define comOFFSET_TIME ( ( portTickType ) 3 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 )\r
+#define comOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* We should find that each character can be queued for Tx immediately and we\r
don't have to block to send. */\r
-#define comNO_BLOCK ( ( portTickType ) 0 )\r
+#define comNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The Rx task will block on the Rx queue for a long period. */\r
-#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff )\r
+#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff )\r
\r
/* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */\r
#define comFIRST_BYTE ( 'A' )\r
xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );\r
\r
/* The Tx task is spawned with a lower priority than the Rx task. */\r
- xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vComTxTask, pvParameters )\r
{\r
signed char cByteToSend;\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength );\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength );\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime );\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime );\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime );\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime );\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );\r
void vSerialClose( xComPortHandle xPort );\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The standard demo flash timers can be used to flash any number of LEDs. In\r
this case, because only three LEDs are available, and one is in use by the\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Start all the other standard demo/test tasks. The have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
#define serPMC_USART_ID ( BOARD_ID_USART )\r
\r
/* The USART supported by this file. */\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
#include "dynamic.h"\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the digit counter timer will expire, in ms, and converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_PERIOD_MS )\r
\r
/* The LED will remain on until the button has not been pushed for a full\r
5000ms. */\r
-#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* A zero block time. */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The LED timer callback function. This does nothing but switch an LED off.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The digit counter callback function, as described at the top of this file.\r
*/\r
-static void prvDigitCounterTimerCallback( xTimerHandle xTimer );\r
+static void prvDigitCounterTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* This is not a 'standard' partest function, so the prototype is not in\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both application specific demo tasks defined in this file. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses prvLEDTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* The digit counter software timer. This displays a counting digit on one half\r
of the seven segment displays. */\r
-static xTimerHandle xDigitCounterTimer = NULL;\r
+static TimerHandle_t xDigitCounterTimer = NULL;\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* If an error is detected in a standard demo task, then pcStatusMessage will\r
be set to point to a string that identifies the offending task. This is just\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Check the standard demo tasks are running without error. Latch the\r
latest reported error in the pcStatusMessage character pointer. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDigitCounterTimerCallback( xTimerHandle xTimer )\r
+static void prvDigitCounterTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Define the bit patterns that display numbers on the seven segment display. */\r
static const unsigned short usNumbersPatterns[] = { 0x8004, 0xF204, 0x4804, 0x6004, 0x3204, 0x2404, 0x0404, 0xF104, 0x0004, 0x2004 };\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* The timer command queue will have been filled when the timer test tasks\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define serTX_INT 0x02\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 60 * 1024 ) )\r
#include "dynamic.h"\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the digit counter timer will expire, in ms, and converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_PERIOD_MS )\r
\r
/* The LED will remain on until the button has not been pushed for a full\r
5000ms. */\r
-#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* A zero block time. */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The LED timer callback function. This does nothing but switch an LED off.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The digit counter callback function, as described at the top of this file.\r
*/\r
-static void prvDigitCounterTimerCallback( xTimerHandle xTimer );\r
+static void prvDigitCounterTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* This is not a 'standard' partest function, so the prototype is not in\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both application specific demo tasks defined in this file. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses prvLEDTimerCallback() as it's callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* The digit counter software timer. This displays a counting digit on one half\r
of the seven segment displays. */\r
-static xTimerHandle xDigitCounterTimer = NULL;\r
+static TimerHandle_t xDigitCounterTimer = NULL;\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* If an error is detected in a standard demo task, then pcStatusMessage will\r
be set to point to a string that identifies the offending task. This is just\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Check the standard demo tasks are running without error. Latch the\r
latest reported error in the pcStatusMessage character pointer. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDigitCounterTimerCallback( xTimerHandle xTimer )\r
+static void prvDigitCounterTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Define the bit patterns that display numbers on the seven segment display. */\r
static const unsigned short usNumbersPatterns[] = { 0xC000U, 0xF900U, 0xA400U, 0xB000U, 0x9900U, 0x9200U, 0x8200U, 0xF800U, 0x8000U, 0x9000U };\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* The timer command queue will have been filled when the timer test tasks\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define serTX_INT 0x02\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
* If a reg test task detects an error it will delete itself, and in so doing\r
* prevent itself from sending any more 'I'm Alive' messages to the check task.\r
*/\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber );\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber );\r
\r
/*\r
* The check task is created with access to three memory regions (plus its\r
any MPU region. As such other techniques have to be used to allow the tasks\r
to gain access to the queue. See the comments in the tasks themselves for\r
further information. */\r
-static xQueueHandle xFileScopeCheckQueue = NULL;\r
+static QueueHandle_t xFileScopeCheckQueue = NULL;\r
\r
\r
/*-----------------------------------------------------------*/\r
static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT );\r
\r
/* Declare three arrays - an MPU region will be created for each array\r
-using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE\r
+using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE\r
MPU FUNCTIONALITY, the data is not used by the check tasks primary function\r
of monitoring the reg test tasks and printing out status information.\r
\r
#define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128\r
char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE );\r
\r
-/* Fill in a xTaskParameters structure to define the check task - this is the\r
+/* Fill in a TaskParameters_t structure to define the check task - this is the\r
structure passed to the xTaskCreateRestricted() function. */\r
-static const xTaskParameters xCheckTaskParameters =\r
+static const TaskParameters_t xCheckTaskParameters =\r
{\r
prvCheckTask, /* pvTaskCode - the function that implements the task. */\r
"Check", /* pcName */\r
static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
\r
-/* Fill in a xTaskParameters structure per reg test task to define the tasks. */\r
-static const xTaskParameters xRegTest1Parameters =\r
+/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */\r
+static const TaskParameters_t xRegTest1Parameters =\r
{\r
prvRegTest1Task, /* pvTaskCode - the function that implements the task. */\r
"RegTest1", /* pcName */\r
};\r
/*-----------------------------------------------------------*/\r
\r
-static xTaskParameters xRegTest2Parameters =\r
+static TaskParameters_t xRegTest2Parameters =\r
{\r
prvRegTest2Task, /* pvTaskCode - the function that implements the task. */\r
"RegTest2", /* pcName */\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once that task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
long lMessage;\r
unsigned long ulStillAliveCounts[ 2 ] = { 0 };\r
const char *pcStatusMessage = "PASS\r\n";\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once this task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
\r
/* Now the queue handle has been obtained the task can switch to user\r
mode. This is just one method of passing a handle into a protected\r
/* The queue handle is passed in as the task parameter. This is one method of\r
passing data into a protected task, the other reg test task uses a different\r
method. */\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber )\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber )\r
{\r
if( xHandle != NULL )\r
{\r
void vApplicationTickHook( void )\r
{\r
static unsigned long ulCallCount;\r
-const unsigned long ulCallsBetweenSends = 5000 / portTICK_RATE_MS;\r
+const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS;\r
const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS;\r
portBASE_TYPE xDummy;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this\r
function will automatically get called if a task overflows its stack. */\r
#define configMAX_PRIORITIES ( 5 )\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
* If a reg test task detects an error it will delete itself, and in so doing\r
* prevent itself from sending any more 'I'm Alive' messages to the check task.\r
*/\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber );\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber );\r
\r
/*\r
* The check task is created with access to three memory regions (plus its\r
any MPU region. As such other techniques have to be used to allow the tasks\r
to gain access to the queue. See the comments in the tasks themselves for\r
further information. */\r
-static xQueueHandle xFileScopeCheckQueue = NULL;\r
+static QueueHandle_t xFileScopeCheckQueue = NULL;\r
\r
\r
\r
static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT );\r
\r
/* Declare three arrays - an MPU region will be created for each array\r
-using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE\r
+using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE\r
MPU FUNCTIONALITY, the data is not used by the check tasks primary function\r
of monitoring the reg test tasks and printing out status information.\r
\r
#define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128\r
char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE );\r
\r
-/* Fill in a xTaskParameters structure to define the check task - this is the\r
+/* Fill in a TaskParameters_t structure to define the check task - this is the\r
structure passed to the xTaskCreateRestricted() function. */\r
-static const xTaskParameters xCheckTaskParameters =\r
+static const TaskParameters_t xCheckTaskParameters =\r
{\r
prvCheckTask, /* pvTaskCode - the function that implements the task. */\r
"Check", /* pcName */\r
check task receiving any data on the queue or printing any messages to the\r
debug console. The MPU region defined below covers the GPIO peripherals used\r
to write to the LCD. */\r
-static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
+static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
{\r
/* Base address Length Parameters */\r
{ mainGPIO_START_ADDRESS, ( 64 * 1024 ), portMPU_REGION_READ_WRITE },\r
static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
\r
-/* Fill in a xTaskParameters structure per reg test task to define the tasks. */\r
-static const xTaskParameters xRegTest1Parameters =\r
+/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */\r
+static const TaskParameters_t xRegTest1Parameters =\r
{\r
prvRegTest1Task, /* pvTaskCode - the function that implements the task. */\r
"RegTest1", /* pcName */\r
};\r
/*-----------------------------------------------------------*/\r
\r
-static xTaskParameters xRegTest2Parameters =\r
+static TaskParameters_t xRegTest2Parameters =\r
{\r
prvRegTest2Task, /* pvTaskCode - the function that implements the task. */\r
"RegTest2", /* pcName */\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once that task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
long lMessage;\r
unsigned long ulStillAliveCounts[ 2 ] = { 0 };\r
char *pcStatusMessage = "PASS\r\n";\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once this task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
\r
/* Now the queue handle has been obtained the task can switch to user\r
mode. This is just one method of passing a handle into a protected\r
/* The queue handle is passed in as the task parameter. This is one method of\r
passing data into a protected task, the other reg test task uses a different\r
method. */\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber )\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber )\r
{\r
if( xHandle != NULL )\r
{\r
void vApplicationTickHook( void )\r
{\r
static unsigned long ulCallCount;\r
-const unsigned long ulCallsBetweenSends = 5000 / portTICK_RATE_MS;\r
+const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS;\r
const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS;\r
portBASE_TYPE xDummy;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this\r
function will automatically get called if a task overflows its stack. */\r
#define configUSE_TRACE_FACILITY 0\r
#define configUSE_16_BIT_TICKS 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) /* Timer clock. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 8 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 32768 )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
#define mainDONT_BLOCK ( 0UL )\r
\r
/* The period after which the check timer will expire, converted to ticks. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period after which the LED timer will expire, converted to ticks. */\r
-#define mainLED_TIMER_PERIOD_MS ( 75UL / portTICK_RATE_MS )\r
+#define mainLED_TIMER_PERIOD_MS ( 75UL / portTICK_PERIOD_MS )\r
\r
/* Constants for the ComTest tasks. */\r
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The LED timer callback function, as described at the top of this file.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The reg test tasks, as described at the top of this file.\r
\r
void main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* Start all the standard demo/test tasks. These have not particular\r
functionality, but do demonstrate how to use the FreeRTOS API, and test the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangeToRedLEDsAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Counter = 0, ulLastRegTest2Counter = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
const unsigned long ulNumWhiteLEDs = 6;\r
static unsigned long ulLit1 = 2, ulLit2 = 1;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
-#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
+#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars = NULL;\r
-static xQueueHandle xCharsForTx = NULL;\r
+static QueueHandle_t xRxedChars = NULL;\r
+static QueueHandle_t xCharsForTx = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( 24000000UL ) \r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7 * 1024 ) )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
* The LED timer callback function. This does nothing but switch the red LED\r
* off.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
* function.\r
*/\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
there to be space to post each character to the queue of characters waiting\r
transmission. NOTE! This is the time to wait per character - not the time to\r
wait for the entire string. */\r
-#define serPUT_STRING_CHAR_DELAY ( 5 / portTICK_RATE_MS )\r
+#define serPUT_STRING_CHAR_DELAY ( 5 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
static USART_TypeDef * const xUARTS[ serNUM_COM_PORTS ] = { ( ( USART_TypeDef * ) USART1_BASE ), ( ( USART_TypeDef * ) USART2_BASE ) };\r
\r
/* Queues used to hold characters waiting to be transmitted - one queue per port. */\r
-static xQueueHandle xCharsForTx[ serNUM_COM_PORTS ] = { 0 };\r
+static QueueHandle_t xCharsForTx[ serNUM_COM_PORTS ] = { 0 };\r
\r
/* Queues holding received characters - one queue per port. */\r
-static xQueueHandle xRxedChars[ serNUM_COM_PORTS ] = { 0 };\r
+static QueueHandle_t xRxedChars[ serNUM_COM_PORTS ] = { 0 };\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed long xSerialGetChar( long lPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed long xSerialGetChar( long lPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
long lReturn = pdFAIL;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed long xSerialPutChar( long lPort, signed char cOutChar, portTickType xBlockTime )\r
+signed long xSerialPutChar( long lPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
long lReturn;\r
\r
* waiting in the Blocked state for up to xBlockTime ticks), otherwise pdFAIL \r
* will be returned.\r
*/\r
-signed long xSerialPutChar( long lPort, signed char cOutChar, portTickType xBlockTime );\r
+signed long xSerialPutChar( long lPort, signed char cOutChar, TickType_t xBlockTime );\r
\r
/*\r
* Retrieve a character from the queue of received characters. As supplied 2 \r
* character is successfully returned (possible after waiting in the Blocked \r
* state for up to xBlockTime ticks), otherwise pdFAIL will be returned.\r
*/\r
-signed long xSerialGetChar( long lPort, signed char *pcRxedChar, portTickType xBlockTime );\r
+signed long xSerialGetChar( long lPort, signed char *pcRxedChar, TickType_t xBlockTime );\r
\r
/*\r
* Send a string of characters to a COM port. As supplied 2 COM ports are \r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )\r
\r
/* The time between cycles of the 'check' task - which depends on whether the\r
check task has detected an error or not. */\r
-#define mainCHECK_DELAY_NO_ERROR ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
-#define mainCHECK_DELAY_ERROR ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY_NO_ERROR ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
+#define mainCHECK_DELAY_ERROR ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED controlled by the 'check' task. */\r
#define mainCHECK_LED ( 3 )\r
/* Described at the top of this file. */\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
unsigned long ulTicksToWait = mainCHECK_DELAY_NO_ERROR;\r
\r
/* Just to remove the compiler warning about the unused parameter. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will get called if a task overflows its stack. If the\r
parameters are corrupt then inspect pxCurrentTCB to find which was the\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) \r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )\r
LCD_WriteReg(R1, 0x10);\r
LCD_WriteReg(R0, 0xA0);\r
LCD_WriteReg(R3, 0x01);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R3, 0x00);\r
LCD_WriteReg(R43, 0x04);\r
\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
\r
/* Chip Set ------------------------------------------------------------------*/\r
LCD_WriteReg(R157, 0x00);\r
\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
/* Increment the character counter */\r
i++;\r
}\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
i = 0;\r
//LCD_ClearLine(Line);\r
ptr -= length;\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
}\r
\r
/*******************************************************************************\r
/* Display On */\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
{\r
/* Display Off */\r
LCD_WriteReg(R0, 0xA0);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R59, 0x00);\r
}\r
\r
#define mainMAX_MSG_LEN 25\r
\r
/* The time between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
xLCDMessage xMessage;\r
static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
extern unsigned short usMaxJitter;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
-#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
+#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) \r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )\r
LCD_WriteReg(R1, 0x10);\r
LCD_WriteReg(R0, 0xA0);\r
LCD_WriteReg(R3, 0x01);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R3, 0x00);\r
LCD_WriteReg(R43, 0x04);\r
\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
\r
/* Chip Set ------------------------------------------------------------------*/\r
LCD_WriteReg(R157, 0x00);\r
\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
/* Increment the character counter */\r
i++;\r
}\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
i = 0;\r
//LCD_ClearLine(Line);\r
ptr -= length;\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
}\r
\r
/*******************************************************************************\r
/* Display On */\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
{\r
/* Display Off */\r
LCD_WriteReg(R0, 0xA0);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R59, 0x00);\r
}\r
\r
#define mainMAX_MSG_LEN 25\r
\r
/* The time between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
xLCDMessage xMessage;\r
static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
extern unsigned short usMaxJitter;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
-#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
+#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) \r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )\r
<func Header="printi" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\CORTEX_STM32F103_Primer_GCC\printf-stdarg.c" DeclLine="79"/>\r
<func Header="print" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\CORTEX_STM32F103_Primer_GCC\printf-stdarg.c" DeclLine="122"/>\r
<func Header="sprintf" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\CORTEX_STM32F103_Primer_GCC\printf-stdarg.c" DeclLine="194"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<type Header="xSemaphoreHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\semphr.h" DeclLine="61" Pointer="No"/>\r
<variable Header="ulLoopCounter" Icon="2" Type="variable" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" DeclLine="118" Pointer="No"/>\r
<variable Header="ulLoopCounter2" Icon="2" Type="variable" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" DeclLine="119" Pointer="No"/>\r
<variable Header="ulGuardedVariable" Icon="2" Type="variable" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" DeclLine="122" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xHighPriorityMutexTask" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" DeclLine="126" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xMediumPriorityMutexTask" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" DeclLine="126" Pointer="No"/>\r
<type Header="portTickType" Icon="1" Type="type" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\portable\GCC\ARM_CM3\portmacro.h" DeclLine="83" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<variable Header="sBlockingConsumerCount" Icon="2" Type="variable" Desc=": int[3]" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\BlockQ.c" DeclLine="116" Pointer="No"/>\r
<variable Header="sBlockingProducerCount" Icon="2" Type="variable" Desc=": int[3]" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\BlockQ.c" DeclLine="120" Pointer="No"/>\r
<type Header="portTickType" Icon="1" Type="type" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\portable\GCC\ARM_CM3\portmacro.h" DeclLine="83" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<func Header="xAreBlockTimeTestTasksStillRunning" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="466"/>\r
<func Header="vCreateBlockTimeTasks" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="106"/>\r
<func Header="vPrimaryBlockTimeTestTask" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="125"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<variable Header="xTestQueue" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="85" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xSecondary" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="89" Pointer="No"/>\r
<variable Header="xPrimaryCycles" Icon="2" Type="variable" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="92" Pointer="No"/>\r
<variable Header="xSecondaryCycles" Icon="2" Type="variable" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="92" Pointer="No"/>\r
<variable Header="xErrorOccurred" Icon="2" Type="variable" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="93" Pointer="No"/>\r
<variable Header="xRunIndicator" Icon="2" Type="variable" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" DeclLine="97" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<func Header="xAreQueuePeekTasksStillRunning" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="427"/>\r
<func Header="vStartQueuePeekTasks" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="106"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<variable Header="xErrorDetected" Icon="2" Type="variable" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="95" Pointer="No"/>\r
<variable Header="ulLoopCounter" Icon="2" Type="variable" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="99" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xMediumPriorityTask" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="102" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xHighPriorityTask" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="102" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<variable Header="xHighestPriorityTask" Icon="2" Type="variable" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" DeclLine="102" Pointer="No"/>\r
<type Header="xQueueHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\queue.h" DeclLine="65" Pointer="No"/>\r
<func Header="xArePollingQueuesStillRunning" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\PollQ.c" DeclLine="220"/>\r
<type Header="xListItem" Icon="1" Type="type" Desc=": struct xLIST_ITEM" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\list.h" DeclLine="104" Pointer="No"/>\r
<type Header="xMiniListItem" Icon="1" Type="type" Desc=": struct xMINI_LIST_ITEM" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\list.h" DeclLine="112" Pointer="No"/>\r
<type Header="xList" Icon="1" Type="type" Desc=": struct xLIST" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\list.h" DeclLine="122" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<type Header="xTimeOutType" Icon="1" Type="type" Desc=": struct xTIME_OUT" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="94" Pointer="No"/>\r
<type Header="tskTCB" Icon="1" Type="type" Desc=": struct tskTaskControlBlock" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="103" Pointer="No"/>\r
<func Header="xTaskIsTaskSuspended" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="872"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskSuspendAll" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1037"/>\r
<func Header="vTaskSwitchContext" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1516"/>\r
<func Header="vTaskSetTimeOutState" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1677"/>\r
<func Header="vTaskMissedYield" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1727"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="xTaskGetCurrentTaskHandle" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="2096"/>\r
<func Header="vTaskPriorityDisinherit" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="2170"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskPriorityInherit" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="2138"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="xTaskRemoveFromEventList" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1630"/>\r
<func Header="xTaskCheckForTimeOut" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1684"/>\r
<func Header="xTaskGetTickCount" Icon="3" Type="func" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1127"/>\r
<func Header="uxTaskPriorityGet" Icon="3" Type="func" Desc=": unsigned long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="702"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskPlaceOnEventList" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1560"/>\r
<func Header="vTaskIncrementTick" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1320"/>\r
<func Header="xTaskResumeAll" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1045"/>\r
<func Header="vTaskResume" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="903"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskSuspend" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="829"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskPrioritySet" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="724"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskDelay" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="641"/>\r
<func Header="vTaskDelayUntil" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="564"/>\r
<func Header="prvIdleTask" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="1743"/>\r
<func Header="xTaskCreate" Icon="3" Type="func" Desc=": long" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="373"/>\r
<type Header="pdTASK_CODE" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\projdefs.h" DeclLine="56" Pointer="No"/>\r
- <type Header="xTaskHandle" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
+ <type Header="TaskHandle_t" Icon="1" Type="type" Desc=": " DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\include\task.h" DeclLine="85" Pointer="No"/>\r
<func Header="vTaskStartScheduler" Icon="3" Type="func" Desc=": void" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="984"/>\r
<variable Header="pxReadyTasksLists" Icon="2" Type="variable" Desc=": struct xLIST[5]" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="119" Pointer="No"/>\r
<variable Header="xDelayedTaskList1" Icon="2" Type="variable" Desc=": struct xLIST" DeclFile="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" DeclLine="120" Pointer="No"/>\r
<type Family="Base" Name="long unsigned int" ID="19834"/>\r
<type Family="Base" Name="char" ID="19841"/>\r
<type Family="Pointer" TI="19832" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="19853" toTI="19832"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="19853" toTI="19832"/>\r
<type Family="Pointer" TI="19832" toTI="0"/>\r
<type Family="typedef" Name="xQueueHandle" Line="65" ID="19864" toTI="19832"/>\r
<type Family="Pointer" TI="19832" toTI="0"/>\r
<variable Name="ulLoopCounter2" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" Line="119" Addr="0x20000684" TI="19848"/>\r
<variable Name="ulGuardedVariable" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" Line="122" Addr="0x20000694" TI="19848"/>\r
<type Family="Pointer" TI="19832" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="19853" toTI="19832"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="19853" toTI="19832"/>\r
<variable Name="xHighPriorityMutexTask" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" Line="126" Addr="0x20000690" TI="19853"/>\r
<type Family="Pointer" TI="19832" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="19853" toTI="19832"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="19853" toTI="19832"/>\r
<variable Name="xMediumPriorityMutexTask" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\GenQTest.c" Line="126" Addr="0x2000068C" TI="19853"/>\r
</module>\r
<module Name="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\BlockQ.c" >\r
<type Family="Base" Name="unsigned char" ID="21168"/>\r
<type Family="typedef" Name="portTickType" Line="83" ID="21183" toTI="21154"/>\r
<type Family="Pointer" TI="21126" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21194" toTI="21126"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21194" toTI="21126"/>\r
<type Family="Pointer" TI="21126" toTI="0"/>\r
<type Family="typedef" Name="xQueueHandle" Line="65" ID="21205" toTI="21126"/>\r
<function Name="xAreBlockTimeTestTasksStillRunning" TI="21128" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" Line="466">\r
<type Family="typedef" Name="xQueueHandle" Line="65" ID="21205" toTI="21126"/>\r
<variable Name="xTestQueue" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" Line="85" Addr="0x200006C4" TI="21205"/>\r
<type Family="Pointer" TI="21126" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21194" toTI="21126"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21194" toTI="21126"/>\r
<variable Name="xSecondary" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" Line="89" Addr="0x200006C8" TI="21194"/>\r
<variable Name="xPrimaryCycles" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" Line="92" Addr="0x200006B0" TI="21149"/>\r
<variable Name="xSecondaryCycles" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\blocktim.c" Line="92" Addr="0x200006B8" TI="21149"/>\r
<type Family="Base" Name="long unsigned int" ID="21727"/>\r
<type Family="Base" Name="char" ID="21734"/>\r
<type Family="Pointer" TI="21725" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21751" toTI="21725"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21751" toTI="21725"/>\r
<type Family="Pointer" TI="21725" toTI="0"/>\r
<type Family="typedef" Name="xQueueHandle" Line="65" ID="21762" toTI="21725"/>\r
<function Name="xAreQueuePeekTasksStillRunning" TI="21715" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="427">\r
<variable Name="xErrorDetected" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="95" Addr="0x200006D8" TI="21741"/>\r
<variable Name="ulLoopCounter" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="99" Addr="0x200006D0" TI="21746"/>\r
<type Family="Pointer" TI="21725" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21751" toTI="21725"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21751" toTI="21725"/>\r
<variable Name="xMediumPriorityTask" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="102" Addr="0x20004D20" TI="21751"/>\r
<type Family="Pointer" TI="21725" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21751" toTI="21725"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21751" toTI="21725"/>\r
<variable Name="xHighPriorityTask" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="102" Addr="0x20004D1C" TI="21751"/>\r
<type Family="Pointer" TI="21725" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="21751" toTI="21725"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="21751" toTI="21725"/>\r
<variable Name="xHighestPriorityTask" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\QPeek.c" Line="102" Addr="0x20004D24" TI="21751"/>\r
</module>\r
<module Name="C:\E\temp\rc\5\FreeRTOSV5.3.1\Demo\Common\Minimal\PollQ.c" >\r
</type>\r
<type Family="typedef" Name="xList" Line="122" ID="26206" toTI="26135"/>\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="ComponentList" Name="xTIME_OUT" Line="91" ID="26228">\r
<Component Name="xOverflowCount" TI="26240" Line="92" Offs="0"/>\r
<Component Name="xTimeOnEntering" TI="26254" Line="93" Offs="4"/>\r
<type Family="typedef" Name="tskTCB" Line="103" ID="26419" toTI="26280"/>\r
<function Name="xTaskIsTaskSuspended" TI="25881" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="872">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<parameter Name="xTask" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="872" Addr="0x0" Param="Yes"/>\r
<variable Name="xReturn" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="873" Addr="0x0" TI="25881"/>\r
<type Family="Pointer" TI="26512" toTI="26518"/>\r
<function Name="vTaskMissedYield" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="1727">\r
</function >\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<function Name="xTaskGetCurrentTaskHandle" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2096">\r
</function >\r
<function Name="vTaskPriorityDisinherit" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2170">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="Pointer" TI="26785" toTI="26217"/>\r
<parameter Name="pxMutexHolder" TI="26780" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2170" Addr="0x0" Param="Yes"/>\r
<type Family="Pointer" TI="26796" toTI="26419"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2171" Addr="0x4" TI="26791"/>\r
</function >\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="Pointer" TI="26785" toTI="26217"/>\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="Pointer" TI="26785" toTI="26217"/>\r
<function Name="vTaskPriorityInherit" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2138">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="Pointer" TI="26785" toTI="26217"/>\r
<parameter Name="pxMutexHolder" TI="26780" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2138" Addr="0x0" Param="Yes"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="2139" Addr="0x4" TI="26791"/>\r
</function >\r
<function Name="uxTaskPriorityGet" TI="25891" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="702">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<parameter Name="pxTask" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="702" Addr="0x0" Param="Yes"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="703" Addr="0x0" TI="26796"/>\r
<variable Name="uxReturn" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="704" Addr="0x4" TI="25891"/>\r
</function >\r
<function Name="vTaskResume" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="903">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<parameter Name="pxTaskToResume" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="903" Addr="0x0" Param="Yes"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="904" Addr="0x5" TI="26796"/>\r
</function >\r
<function Name="vTaskSuspend" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="829">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<parameter Name="pxTaskToSuspend" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="829" Addr="0x0" Param="Yes"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="830" Addr="0x4" TI="26796"/>\r
</function >\r
<function Name="vTaskPrioritySet" TI="0" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="724">\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<parameter Name="pxTask" TI="26217" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="724" Addr="0x0" Param="Yes"/>\r
<parameter Name="uxNewPriority" TI="25891" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="724" Addr="0x1" Param="Yes"/>\r
<variable Name="pxTCB" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="725" Addr="0x4" TI="26796"/>\r
<parameter Name="pvParameters" TI="25830" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="373" Addr="0x3" Param="Yes"/>\r
<parameter Name="uxPriority" TI="25891" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="373" Addr="0x34000028" Param="Yes"/>\r
<type Family="Pointer" TI="25830" toTI="0"/>\r
- <type Family="typedef" Name="xTaskHandle" Line="85" ID="26217" toTI="25830"/>\r
+ <type Family="typedef" Name="TaskHandle_t" Line="85" ID="26217" toTI="25830"/>\r
<type Family="Pointer" TI="26785" toTI="26217"/>\r
<parameter Name="pxCreatedTask" TI="26785" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="373" Addr="0x3400002C" Param="Yes"/>\r
<variable Name="xReturn" FileName="C:\E\temp\rc\5\FreeRTOSV5.3.1\Source\tasks.c" Line="374" Addr="0x0" TI="25881"/>\r
#define mainBITMAP_X ( 18 )\r
#define mainURL_Y ( 8 )\r
#define mainURL_X ( 78 )\r
-#define mainSPLASH_SCREEN_DELAY ( 2000 / portTICK_RATE_MS )\r
+#define mainSPLASH_SCREEN_DELAY ( 2000 / portTICK_PERIOD_MS )\r
\r
/* Text drawing related constants. */\r
#define mainLCD_CHAR_HEIGHT ( 13 )\r
#define mainMAX_MSG_LEN 25\r
\r
/* The time between cycles of the 'check' task. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The period at which the MEMS input should be updated. */\r
-#define mainMEMS_DELAY ( ( portTickType ) 100 / portTICK_RATE_MS )\r
+#define mainMEMS_DELAY ( ( TickType_t ) 100 / portTICK_PERIOD_MS )\r
\r
/* The rate at which the flash task toggles the LED. */\r
-#define mainFLASH_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainFLASH_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
xLCDMessage xMessage;\r
static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
extern unsigned short usMaxJitter;\r
\r
static void prvFlashTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
\r
/* Initialise the xLastExecutionTime variable on task entry. */\r
xLastExecutionTime = xTaskGetTickCount();\r
\r
void starting_delay( unsigned long ul )\r
{\r
- vTaskDelay( ( portTickType ) ul );\r
+ vTaskDelay( ( TickType_t ) ul );\r
}\r
\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 62500000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
/* Private function prototypes -----------------------------------------------*/\r
/* Private functions ---------------------------------------------------------*/\r
\r
-#define timerDly( x ) vTaskDelay( ( x * 10 ) / portTICK_RATE_MS );\r
+#define timerDly( x ) vTaskDelay( ( x * 10 ) / portTICK_PERIOD_MS );\r
#define vBlockToWait( x )\r
\r
/*******************************************************************************\r
\r
/* The time between cycles of the 'check' functionality (defined within the\r
tick hook. */\r
-#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will get called if a task overflows its stack. If the\r
parameters are corrupt then inspect pxCurrentTCB to find which was the\r
#define SendCount Buffer2NextDescAddr\r
\r
/* If no buffers are available, then wait this long before looking again.... */\r
-#define uipBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS )\r
+#define uipBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS )\r
\r
/* ...and don't look more than this many times. */\r
#define uipBUFFER_WAIT_ATTEMPTS ( 30 )\r
void vMAC_ISR( void )\r
{\r
unsigned long ulStatus;\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
long xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* What caused the interrupt? */\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xEMACSemaphore;\r
+SemaphoreHandle_t xEMACSemaphore;\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
char *c, *pcText;\r
static char cMessageForDisplay[ 32 ];\r
static const char *pcMessage = cMessageForDisplay;\r
-extern xQueueHandle xLCDQueue;\r
+extern QueueHandle_t xLCDQueue;\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
\r
/* Holds the maximum number of ticks that can be suppressed - which is\r
basically how far into the future an interrupt can be generated. Set during\r
initialisation. */\r
-static portTickType xMaximumPossibleSuppressedTicks = 0;\r
+static TickType_t xMaximumPossibleSuppressedTicks = 0;\r
\r
/* Flag set from the tick interrupt to allow the sleep processing to know if\r
sleep mode was exited because of an tick interrupt or a different interrupt. */\r
/* Override the default definition of vPortSuppressTicksAndSleep() that is\r
weakly defined in the FreeRTOS Cortex-M3 port layer with a version that manages\r
the TIM2 interrupt, as the tick is generated from TIM2 compare matches events. */\r
-void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime )\r
+void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )\r
{\r
uint32_t ulCounterValue, ulCompleteTickPeriods;\r
eSleepModeStatus eSleepAction;\r
-portTickType xModifiableIdleTime;\r
-const portTickType xRegulatorOffIdleTime = 30;\r
+TickType_t xModifiableIdleTime;\r
+const TickType_t xRegulatorOffIdleTime = 30;\r
\r
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */\r
\r
/* A few settings are dependent on the configCREATE_LOW_POWER_DEMO setting. */\r
#if configCREATE_LOW_POWER_DEMO == 1\r
#define configTICK_RATE_HZ ( 100 )\r
- #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP ( 20 + 1 ) /* ( ( 200 / portTICK_RATE_MS ) + 1 ) written out pre-processed to enable #error statements to check its value. */\r
+ #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP ( 20 + 1 ) /* ( ( 200 / portTICK_PERIOD_MS ) + 1 ) written out pre-processed to enable #error statements to check its value. */\r
#define configUSE_TIMERS 0\r
#else\r
#define configSYSTICK_CLOCK_HZ ( SystemCoreClock >> 3UL ) /* Systick clock is one eighth the system clock. */\r
- #define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+ #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configUSE_TIMERS 1\r
#endif /* configCREATE_LOW_POWER_DEMO */\r
\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
/* The period after which the check timer will expire providing no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Configure the LCD, then write welcome message.\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* The LCD is only used in the Full demo. */\r
prvConfigureLCD();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
#define mainQUEUED_VALUE ( 100UL )\r
\r
/* The length of time the LED will remain on for. */\r
-#define mainLED_TOGGLE_DELAY ( 10 / portTICK_RATE_MS )\r
+#define mainLED_TOGGLE_DELAY ( 10 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to pass data from the Tx task to the Rx task. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Holds the block time used by the Tx task. */\r
-portTickType xSendBlockTime = ( 100UL / portTICK_RATE_MS );\r
+TickType_t xSendBlockTime = ( 100UL / portTICK_PERIOD_MS );\r
\r
/* The lower an upper limits of the block time. An infinite block time is used\r
if xSendBlockTime is incremented past xMaxBlockTime. */\r
-static const portTickType xMaxBlockTime = ( 500L / portTICK_RATE_MS ), xMinBlockTime = ( 100L / portTICK_RATE_MS );\r
+static const TickType_t xMaxBlockTime = ( 500L / portTICK_PERIOD_MS ), xMinBlockTime = ( 100L / portTICK_PERIOD_MS );\r
\r
/* The semaphore on which the Tx task blocks. */\r
-static xSemaphoreHandle xTxSemaphore = NULL;\r
+static SemaphoreHandle_t xTxSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Handles interrupts generated by pressing the USER button. */\r
void EXTI0_IRQHandler(void)\r
{\r
-static const portTickType xIncrement = 200UL / portTICK_RATE_MS;\r
+static const TickType_t xIncrement = 200UL / portTICK_PERIOD_MS;\r
\r
/* If xSendBlockTime is already portMAX_DELAY then the Tx task was blocked\r
indefinitely, and this interrupt is bringing the MCU out of STOP low power\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 32000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
\r
/* The handle of the queue used to send messages from tasks and interrupts to\r
the LCD task. */\r
-static xQueueHandle xLCDQueue = NULL;\r
+static QueueHandle_t xLCDQueue = NULL;\r
\r
/* The definition of each message sent from tasks and interrupts to the LCD\r
task. */\r
void vApplicationTickHook( void )\r
{\r
static unsigned long ulCounter = 0;\r
-static const unsigned long ulCheckFrequency = 5000UL / portTICK_RATE_MS;\r
+static const unsigned long ulCheckFrequency = 5000UL / portTICK_PERIOD_MS;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Define the status message that is sent to the LCD task. By default the\r
\r
/* Block for 10 milliseconds so this task does not utilise all the CPU\r
time and debouncing of the button is not necessary. */\r
- vTaskDelay( 10 / portTICK_RATE_MS );\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25000 ) )\r
#define cmdMAX_INPUT_SIZE 50\r
\r
/* The maximum time in ticks to wait for the UART access mutex. */\r
-#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS )\r
+#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS )\r
\r
/* Characters are only ever received slowly on the CLI so it is ok to pass\r
received characters from the UART interrupt to the task on a queue. This sets\r
/* Because characters are received slowly (at the speed somebody can type) then\r
it is ok to pass received characters from the Rx interrupt to the task on a\r
queue. This is the queue used for that purpose. */\r
-static xQueueHandle xRxedChars = NULL;\r
+static QueueHandle_t xRxedChars = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvSendBuffer( const char * pcBuffer, size_t xBufferLength )\r
{\r
-const portTickType xVeryShortDelay = 2UL;\r
+const TickType_t xVeryShortDelay = 2UL;\r
\r
if( xBufferLength > 0 )\r
{\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The standard demo flash timers can be used to flash any number of LEDs. In\r
this case, because only three LEDs are available, and one is in use by the\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Register commands that can be used with FreeRTOS+CLI. The commands are\r
\r
void main_full( void )\r
{\r
-xTimerHandle xCheckTimer = NULL;\r
+TimerHandle_t xCheckTimer = NULL;\r
\r
/* Prepare to run the full demo: Configure the IO, register the CLI\r
commands, and depending on configuration, generate a set of sample files on\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorFound = pdFALSE;\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
void vStart7SegTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
- xTaskCreate( prvRefreshTask, "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL );\r
- xTaskCreate( prvCountTask, "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL );\r
+ xTaskCreate( prvRefreshTask, "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t *) NULL );\r
+ xTaskCreate( prvCountTask, "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t *) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
0x08 /* A */\r
};\r
\r
-portTickType xRefreshRate, xLastRefreshTime;\r
+TickType_t xRefreshRate, xLastRefreshTime;\r
\r
/* Digit to scan */\r
static int d = 0;\r
\r
static void prvCountTask( void *pvParameters )\r
{\r
-portTickType xCountRate, xLastCountTime;\r
+TickType_t xCountRate, xLastCountTime;\r
\r
/* Approximately 20HZ */\r
xCountRate = configTICK_RATE_HZ / 20;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) CLOCK_FREQUENCY )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )\r
\r
/* The size of the memory blocks allocated by the vMemCheckTask() task. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This function will be called if a task overflows its stack. Inspect\r
pxCurrentTCB to find the offending task if the overflow was sever enough\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
/*-----------------------------------------------------------*/\r
\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports uart1. */\r
(void) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
( void ) pxPort;\r
\r
#define PHY_DUPLEX_STATUS ( 4 )\r
\r
/* Delay between polling the PHY to see if a link has been established. */\r
-#define fecLINK_DELAY ( 500 / portTICK_RATE_MS )\r
+#define fecLINK_DELAY ( 500 / portTICK_PERIOD_MS )\r
\r
/* Very short delay to use when waiting for the Tx to finish with a buffer if\r
we run out of Rx buffers. */\r
-#define fecMINIMAL_DELAY ( 3 / portTICK_RATE_MS )\r
+#define fecMINIMAL_DELAY ( 3 / portTICK_PERIOD_MS )\r
\r
/* Don't block to wait for a buffer more than this many times. */\r
#define uipBUFFER_WAIT_ATTEMPTS ( 30 )\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used to wake the uIP task when data arrives. */\r
-xSemaphoreHandle xFECSemaphore = NULL;\r
+SemaphoreHandle_t xFECSemaphore = NULL;\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers to avoid having to copy the Rx buffer into\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 50000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 13 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-extern xSemaphoreHandle xFECSemaphore;\r
+extern SemaphoreHandle_t xFECSemaphore;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vApplicationTickHook( void )\r
{\r
static unsigned long ulExecutionCount = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
-const unsigned long ulExecutionRate = 5000 / portTICK_RATE_MS;\r
+const unsigned long ulExecutionRate = 5000 / portTICK_PERIOD_MS;\r
\r
/* Increment the count of how many times the tick hook has been called. */\r
ulExecutionCount++;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality - as described at the\r
top of this file. */\r
-#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which the LED controlled by the 'check' task will flash should an\r
error have been detected. */\r
-#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED controlled by the 'check' task. */\r
#define mainCHECK_LED ( 3 )\r
static void prvCheckTask( void *pvParameters )\r
{\r
unsigned long ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxUnusedStack;\r
\r
( void ) pvParameters;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/* Flag used to indicate the tx status. */\r
static portBASE_TYPE xTxHasEnded = pdTRUE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 160 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality - as described at the\r
top of this file. */\r
-#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which the LED controlled by the 'check' task will flash should an\r
error have been detected. */\r
-#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED controlled by the 'check' task. */\r
#define mainCHECK_LED ( 3 )\r
static void prvCheckTask( void *pvParameters )\r
{\r
unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
\r
( void ) pvParameters;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 64000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 100 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 100 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 190 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40000 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
\r
/* The time between cycles of the 'check' functionality - as described at the\r
top of this file. */\r
-#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which the LED controlled by the 'check' task will flash should an\r
error have been detected. */\r
-#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED controlled by the 'check' task. */\r
#define mainCHECK_LED ( 3 )\r
static void prvCheckTask( void *pvParameters )\r
{\r
unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
\r
( void ) pvParameters;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/* Flag used to indicate the tx status. */\r
static portBASE_TYPE xTxHasEnded = pdTRUE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
\r
Changes from V4.0.2\r
\r
/* Structure used to pass parameters to the blocking queue tasks. */\r
typedef struct BLOCKING_QUEUE_PARAMETERS\r
{\r
- xQueueHandle xQueue; /*< The queue to be used by the task. */\r
- portTickType xBlockTime; /*< The block time to use on queue reads/writes. */\r
+ QueueHandle_t xQueue; /*< The queue to be used by the task. */\r
+ TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */\r
volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */\r
} xBlockingQueueParameters;\r
\r
xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4;\r
xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6;\r
const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5;\r
-const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS;\r
-const portTickType xDontBlock = ( portTickType ) 0;\r
+const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
+const TickType_t xDontBlock = ( TickType_t ) 0;\r
\r
/* Create the first two tasks as described at the top of the file. */ \r
\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-static xQueueHandle xPolledQueue;\r
+static QueueHandle_t xPolledQueue;\r
const unsigned portBASE_TYPE uxQueueSize = 10;\r
\r
/* Create the queue used by the producer and consumer. */\r
static void vPolledQueueProducer( void *pvParameters )\r
{\r
unsigned short usValue = 0, usLoop;\r
-xQueueHandle *pxQueue;\r
-const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;\r
+QueueHandle_t *pxQueue;\r
+const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS;\r
const unsigned short usNumToProduce = 3;\r
const char * const pcTaskStartMsg = "Polled queue producer started.\r\n";\r
const char * const pcTaskErrorMsg = "Could not post on polled queue.\r\n";\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
\r
/* The queue being used is passed in as the parameter. */\r
- pxQueue = ( xQueueHandle * ) pvParameters;\r
+ pxQueue = ( QueueHandle_t * ) pvParameters;\r
\r
for( ;; )\r
{ \r
for( usLoop = 0; usLoop < usNumToProduce; ++usLoop )\r
{\r
/* Send an incrementing number on the queue without blocking. */\r
- if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( portTickType ) 0 ) != pdPASS )\r
+ if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( TickType_t ) 0 ) != pdPASS )\r
{\r
/* We should never find the queue full - this is an error. */\r
vPrintDisplayMessage( &pcTaskErrorMsg );\r
static void vPolledQueueConsumer( void *pvParameters )\r
{\r
unsigned short usData, usExpectedValue = 0;\r
-xQueueHandle *pxQueue;\r
-const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;\r
+QueueHandle_t *pxQueue;\r
+const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS;\r
const char * const pcTaskStartMsg = "Polled queue consumer started.\r\n";\r
const char * const pcTaskErrorMsg = "Incorrect value received on polled queue.\r\n";\r
short sError = pdFALSE;\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
\r
/* The queue being used is passed in as the parameter. */\r
- pxQueue = ( xQueueHandle * ) pvParameters;\r
+ pxQueue = ( QueueHandle_t * ) pvParameters;\r
\r
for( ;; )\r
{ \r
/* Loop until the queue is empty. */\r
while( uxQueueMessagesWaiting( *pxQueue ) )\r
{\r
- if( xQueueReceive( *pxQueue, &usData, ( portTickType ) 0 ) == pdPASS )\r
+ if( xQueueReceive( *pxQueue, &usData, ( TickType_t ) 0 ) == pdPASS )\r
{\r
if( usData != usExpectedValue )\r
{\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
+ Slight modification to task priorities.\r
\r
*/\r
\r
/* The Tx task will transmit the sequence of characters at a pseudo random\r
interval. This is the maximum and minimum block time between sends. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x15e )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0xc8 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x15e )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0xc8 )\r
\r
#define comMAX_CONSECUTIVE_ERRORS ( 2 )\r
\r
volatile short sTxCount = 0, sRxCount = 0, sSemCount = 0;\r
\r
/* The handle to the semaphore test task. */\r
-static xTaskHandle xSemTestTaskHandle = NULL;\r
+static TaskHandle_t xSemTestTaskHandle = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vComTxTask( void *pvParameters )\r
{\r
const char * const pcTaskStartMsg = "COM Tx task started.\r\n";\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* Stop warnings. */\r
( void ) pvParameters;\r
const char * const pcTaskErrorMsg = "COM read error\r\n";\r
const char * const pcTaskRestartMsg = "COM resynced\r\n";\r
const char * const pcTaskTimeoutMsg = "COM Rx timed out\r\n";\r
-const portTickType xBlockTime = ( portTickType ) 0xffff / portTICK_RATE_MS;\r
+const TickType_t xBlockTime = ( TickType_t ) 0xffff / portTICK_PERIOD_MS;\r
const char *pcExpectedChar;\r
portBASE_TYPE xGotChar;\r
char cRxedChar;\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
/* Used to store a handle to the tasks that should be killed by a suicidal task, \r
before it kills itself. */\r
-xTaskHandle xCreatedTask1, xCreatedTask2;\r
+TaskHandle_t xCreatedTask1, xCreatedTask2;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vSuicidalTask( void *pvParameters )\r
{\r
portDOUBLE d1, d2;\r
-xTaskHandle xTaskToKill;\r
-const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS;\r
+TaskHandle_t xTaskToKill;\r
+const TickType_t xDelay = ( TickType_t ) 500 / portTICK_PERIOD_MS;\r
\r
if( pvParameters != NULL )\r
{\r
/* This task is periodically created four times. Tow created tasks are \r
passed a handle to the other task so it can kill it before killing itself. \r
The other task is passed in null. */\r
- xTaskToKill = *( xTaskHandle* )pvParameters;\r
+ xTaskToKill = *( TaskHandle_t* )pvParameters;\r
}\r
else\r
{\r
if( xTaskToKill != NULL )\r
{\r
/* Make sure the other task has a go before we delete it. */\r
- vTaskDelay( ( portTickType ) 0 );\r
+ vTaskDelay( ( TickType_t ) 0 );\r
/* Kill the other task that was created by vCreateTasks(). */\r
vTaskDelete( xTaskToKill );\r
/* Kill ourselves. */\r
\r
static void vCreateTasks( void *pvParameters )\r
{\r
-const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS;\r
+const TickType_t xDelay = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
unsigned portBASE_TYPE uxPriority;\r
const char * const pcTaskStartMsg = "Create task started.\r\n";\r
\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
+ Added a second, simple test that uses the functions \r
vQueueReceiveWhenSuspendedTask() and vQueueSendWhenSuspendedTask().\r
\r
\r
/* Demo task specific constants. */\r
#define priSTACK_SIZE ( ( unsigned short ) configMINIMAL_STACK_SIZE )\r
-#define priSLEEP_TIME ( ( portTickType ) 50 )\r
+#define priSLEEP_TIME ( ( TickType_t ) 50 )\r
#define priLOOPS ( 5 )\r
#define priMAX_COUNT ( ( unsigned long ) 0xff )\r
-#define priNO_BLOCK ( ( portTickType ) 0 )\r
+#define priNO_BLOCK ( ( TickType_t ) 0 )\r
#define priSUSPENDED_QUEUE_LENGTH ( 1 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Handles to the two counter tasks. These could be passed in as parameters\r
to the controller task to prevent them having to be file scope. */\r
-static xTaskHandle xContinuousIncrementHandle, xLimitedIncrementHandle, xChangePriorityWhenSuspendedHandle;\r
+static TaskHandle_t xContinuousIncrementHandle, xLimitedIncrementHandle, xChangePriorityWhenSuspendedHandle;\r
\r
/* The shared counter variable. This is passed in as a parameter to the two \r
counter variables for demonstration purposes. */\r
static portBASE_TYPE xPriorityRaiseWhenSuspendedError = pdFALSE;\r
\r
/* Queue used by the second test. */\r
-xQueueHandle xSuspendedTestQueue;\r
+QueueHandle_t xSuspendedTestQueue;\r
\r
/*-----------------------------------------------------------*/\r
/*\r
\r
/* Handles to the four event tasks. These are required to suspend and resume\r
the tasks. */\r
-static xTaskHandle xCreatedTasks[ evtNUM_TASKS ];\r
+static TaskHandle_t xCreatedTasks[ evtNUM_TASKS ];\r
\r
/* The single queue onto which the controlling task posts, and the four event\r
tasks block. */\r
-static xQueueHandle xQueue;\r
+static QueueHandle_t xQueue;\r
\r
/* Flag used to indicate whether or not an error has occurred at any time.\r
An error is either the queue being full when not expected, or an unexpected\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
\r
Changes from V2.1.1\r
\r
typedef struct LED_PARAMETERS\r
{\r
unsigned portBASE_TYPE uxLED; /*< The output the task should use. */\r
- portTickType xFlashRate; /*< The rate at which the LED should flash. */\r
+ TickType_t xFlashRate; /*< The rate at which the LED should flash. */\r
} xLEDParameters;\r
\r
/* The task that is created eight times - each time with a different xLEDParaemtes \r
unsigned portBASE_TYPE uxLEDTask;\r
xLEDParameters *pxLEDParameters;\r
const unsigned portBASE_TYPE uxNumOfLEDs = 8;\r
-const portTickType xFlashRate = 125;\r
+const TickType_t xFlashRate = 125;\r
\r
/* Create the eight tasks. */\r
for( uxLEDTask = 0; uxLEDTask < uxNumOfLEDs; ++uxLEDTask )\r
created task. */\r
pxLEDParameters = ( xLEDParameters * ) pvPortMalloc( sizeof( xLEDParameters ) );\r
pxLEDParameters->uxLED = uxLEDTask;\r
- pxLEDParameters->xFlashRate = ( xFlashRate + ( xFlashRate * ( portTickType ) uxLEDTask ) );\r
- pxLEDParameters->xFlashRate /= portTICK_RATE_MS;\r
+ pxLEDParameters->xFlashRate = ( xFlashRate + ( xFlashRate * ( TickType_t ) uxLEDTask ) );\r
+ pxLEDParameters->xFlashRate /= portTICK_PERIOD_MS;\r
\r
/* Spawn the task. */\r
- xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, ( void * ) pxLEDParameters, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, ( void * ) pxLEDParameters, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
for(;;)\r
{\r
/* Delay for half the flash period then turn the LED on. */\r
- vTaskDelay( pxParameters->xFlashRate / ( portTickType ) 2 );\r
+ vTaskDelay( pxParameters->xFlashRate / ( TickType_t ) 2 );\r
vParTestToggleLED( pxParameters->uxLED );\r
\r
/* Delay for half the flash period then turn the LED off. */\r
- vTaskDelay( pxParameters->xFlashRate / ( portTickType ) 2 );\r
+ vTaskDelay( pxParameters->xFlashRate / ( TickType_t ) 2 );\r
vParTestToggleLED( pxParameters->uxLED );\r
}\r
}\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
/* Demo program include files. */\r
#include "print.h"\r
\r
-static xQueueHandle xPrintQueue;\r
+static QueueHandle_t xPrintQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend )\r
{\r
#ifdef USE_STDIO\r
- xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( portTickType ) 0 );\r
+ xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( TickType_t ) 0 );\r
#else\r
/* Stop warnings. */\r
( void ) ppcMessageToSend;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-const char *pcPrintGetNextMessage( portTickType xPrintRate )\r
+const char *pcPrintGetNextMessage( TickType_t xPrintRate )\r
{\r
char *pcMessage;\r
\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
\r
Changes from V2.1.1\r
\r
\r
#define semtstNUM_TASKS ( 4 )\r
\r
-#define semtstDELAY_FACTOR ( ( portTickType ) 10 )\r
+#define semtstDELAY_FACTOR ( ( TickType_t ) 10 )\r
\r
/* The task function as described at the top of the file. */\r
static void prvSemaphoreTest( void *pvParameters );\r
/* Structure used to pass parameters to each task. */\r
typedef struct SEMAPHORE_PARAMETERS\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
volatile unsigned long *pulSharedVariable;\r
- portTickType xBlockTime;\r
+ TickType_t xBlockTime;\r
} xSemaphoreParameters;\r
\r
/* Variables used to check that all the tasks are still running without errors. */\r
void vStartSemaphoreTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
xSemaphoreParameters *pxFirstSemaphoreParameters, *pxSecondSemaphoreParameters;\r
-const portTickType xBlockTime = ( portTickType ) 100;\r
+const TickType_t xBlockTime = ( TickType_t ) 100;\r
\r
/* Create the structure used to pass parameters to the first two tasks. */\r
pxFirstSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );\r
*( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE;\r
\r
/* The first two tasks do not block on semaphore calls. */\r
- pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0;\r
+ pxFirstSemaphoreParameters->xBlockTime = ( TickType_t ) 0;\r
\r
/* Spawn the first two tasks. As they poll they operate at the idle priority. */\r
- xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
- xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
}\r
}\r
\r
{\r
pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );\r
*( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE;\r
- pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS;\r
+ pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_PERIOD_MS;\r
\r
- xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );\r
- xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
}\r
}\r
\r
/* If we are blocking we use a much higher count to ensure loads of context\r
switches occur during the count. */\r
- if( pxParameters->xBlockTime > ( portTickType ) 0 )\r
+ if( pxParameters->xBlockTime > ( TickType_t ) 0 )\r
{\r
ulExpectedValue = semtstBLOCKING_EXPECTED_VALUE;\r
}\r
}\r
else\r
{\r
- if( pxParameters->xBlockTime == ( portTickType ) 0 )\r
+ if( pxParameters->xBlockTime == ( TickType_t ) 0 )\r
{\r
/* We have not got the semaphore yet, so no point using the\r
processor. We are not blocking when attempting to obtain the\r
/* Structure used to pass parameters to the blocking queue tasks. */\r
typedef struct BLOCKING_QUEUE_PARAMETERS\r
{\r
- xQueueHandle xQueue; /*< The queue to be used by the task. */\r
- portTickType xBlockTime; /*< The block time to use on queue reads/writes. */\r
+ QueueHandle_t xQueue; /*< The queue to be used by the task. */\r
+ TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */\r
volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */\r
} xBlockingQueueParameters;\r
\r
xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4;\r
xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6;\r
const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5;\r
-const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS;\r
-const portTickType xDontBlock = ( portTickType ) 0;\r
+const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
+const TickType_t xDontBlock = ( TickType_t ) 0;\r
\r
/* Create the first two tasks as described at the top of the file. */\r
\r
\r
/* Task behaviour. */\r
#define bktQUEUE_LENGTH ( 5 )\r
-#define bktSHORT_WAIT ( ( ( portTickType ) 20 ) / portTICK_RATE_MS )\r
+#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS )\r
#define bktPRIMARY_BLOCK_TIME ( 10 )\r
#define bktALLOWABLE_MARGIN ( 12 )\r
#define bktTIME_TO_BLOCK ( 175 )\r
-#define bktDONT_BLOCK ( ( portTickType ) 0 )\r
+#define bktDONT_BLOCK ( ( TickType_t ) 0 )\r
#define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 )\r
\r
/* The queue on which the tasks block. */\r
-static xQueueHandle xTestQueue;\r
+static QueueHandle_t xTestQueue;\r
\r
/* Handle to the secondary task is required by the primary task for calls\r
to vTaskSuspend/Resume(). */\r
-static xTaskHandle xSecondary;\r
+static TaskHandle_t xSecondary;\r
\r
/* Used to ensure that tasks are still executing without error. */\r
static portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0;\r
static void vPrimaryBlockTimeTestTask( void *pvParameters )\r
{\r
portBASE_TYPE xItem, xData;\r
-portTickType xTimeWhenBlocking;\r
-portTickType xTimeToBlock, xBlockedTime;\r
+TickType_t xTimeWhenBlocking;\r
+TickType_t xTimeToBlock, xBlockedTime;\r
\r
#ifdef USE_STDIO\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
static void vSecondaryBlockTimeTestTask( void *pvParameters )\r
{\r
-portTickType xTimeWhenBlocking, xBlockedTime;\r
+TickType_t xTimeWhenBlocking, xBlockedTime;\r
portBASE_TYPE xData;\r
\r
#ifdef USE_STDIO\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
#define pollqSTACK_SIZE configMINIMAL_STACK_SIZE\r
#define pollqQUEUE_SIZE ( 10 )\r
-#define pollqPRODUCER_DELAY ( ( portTickType ) 200 / portTICK_RATE_MS )\r
-#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( portTickType ) ( 20 / portTICK_RATE_MS ) )\r
-#define pollqNO_DELAY ( ( portTickType ) 0 )\r
+#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS )\r
+#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) )\r
+#define pollqNO_DELAY ( ( TickType_t ) 0 )\r
#define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 )\r
#define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 )\r
\r
\r
void vStartAltPolledQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-static xQueueHandle xPolledQueue;\r
+static QueueHandle_t xPolledQueue;\r
\r
/* Create the queue used by the producer and consumer. */\r
xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
\r
\r
/* Spawn the producer and consumer. */\r
- xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ )\r
{\r
/* Send an incrementing number on the queue without blocking. */\r
- if( xQueueAltSendToBack( *( ( xQueueHandle * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
+ if( xQueueAltSendToBack( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
{\r
/* We should never find the queue full so if we get here there\r
has been an error. */\r
for( ;; )\r
{ \r
/* Loop until the queue is empty. */\r
- while( uxQueueMessagesWaiting( *( ( xQueueHandle * ) pvParameters ) ) )\r
+ while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) )\r
{\r
- if( xQueueAltReceive( *( ( xQueueHandle * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
+ if( xQueueAltReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
{\r
if( usData != usExpectedValue )\r
{\r
\r
/* Handles used in the mutext test to suspend and resume the high and medium\r
priority mutex test tasks. */\r
-static xTaskHandle xHighPriorityMutexTask, xMediumPriorityMutexTask;\r
+static TaskHandle_t xHighPriorityMutexTask, xMediumPriorityMutexTask;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vStartAltGenericQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xQueueHandle xQueue;\r
-xSemaphoreHandle xMutex;\r
+QueueHandle_t xQueue;\r
+SemaphoreHandle_t xMutex;\r
\r
/* Create the queue that we are going to use for the\r
prvSendFrontAndBackTest demo. */\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Alt_Q_Mutex" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Alt_Q_Mutex" );\r
\r
/* Create the mutex demo tasks and pass it the mutex just created. We are\r
passing the mutex handle by value so it does not matter that it is declared\r
static void prvSendFrontAndBackTest( void *pvParameters )\r
{\r
unsigned long ulData, ulData2;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
\r
#ifdef USE_STDIO\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
#endif\r
\r
- xQueue = ( xQueueHandle ) pvParameters;\r
+ xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
\r
static void prvLowPriorityMutexTask( void *pvParameters )\r
{\r
-xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
+SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters;\r
\r
#ifdef USE_STDIO\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
static void prvHighPriorityMutexTask( void *pvParameters )\r
{\r
-xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
+SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters;\r
\r
( void ) pvParameters;\r
\r
/* Structure used to pass parameters to the blocking queue tasks. */\r
typedef struct BLOCKING_QUEUE_PARAMETERS\r
{\r
- xQueueHandle xQueue; /*< The queue to be used by the task. */\r
- portTickType xBlockTime; /*< The block time to use on queue reads/writes. */\r
+ QueueHandle_t xQueue; /*< The queue to be used by the task. */\r
+ TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */\r
volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */\r
} xBlockingQueueParameters;\r
\r
xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4;\r
xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6;\r
const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5;\r
-const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS;\r
-const portTickType xDontBlock = ( portTickType ) 0;\r
+const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
+const TickType_t xDontBlock = ( TickType_t ) 0;\r
\r
/* Create the first two tasks as described at the top of the file. */\r
\r
#define ebDONT_BLOCK ( 0 )\r
\r
/* A 5ms delay. */\r
-#define ebSHORT_DELAY ( 5 / portTICK_RATE_MS )\r
+#define ebSHORT_DELAY ( 5 / portTICK_PERIOD_MS )\r
\r
/* Used in the selective bits test which checks no, one or both tasks blocked on\r
event bits in a group are unblocked as appropriate as different bits get set. */\r
\r
/* Handles used in the mutext test to suspend and resume the high and medium\r
priority mutex test tasks. */\r
-static xTaskHandle xHighPriorityMutexTask, xMediumPriorityMutexTask;\r
+static TaskHandle_t xHighPriorityMutexTask, xMediumPriorityMutexTask;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vStartGenericQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xQueueHandle xQueue;\r
-xSemaphoreHandle xMutex;\r
+QueueHandle_t xQueue;\r
+SemaphoreHandle_t xMutex;\r
\r
/* Create the queue that we are going to use for the\r
prvSendFrontAndBackTest demo. */\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is\r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Gen_Queue_Mutex" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Gen_Queue_Mutex" );\r
\r
/* Create the mutex demo tasks and pass it the mutex just created. We are\r
passing the mutex handle by value so it does not matter that it is declared\r
static void prvSendFrontAndBackTest( void *pvParameters )\r
{\r
unsigned long ulData, ulData2;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
\r
#ifdef USE_STDIO\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
#endif\r
\r
- xQueue = ( xQueueHandle ) pvParameters;\r
+ xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
\r
static void prvLowPriorityMutexTask( void *pvParameters )\r
{\r
-xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
+SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters;\r
\r
#ifdef USE_STDIO\r
void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
static void prvHighPriorityMutexTask( void *pvParameters )\r
{\r
-xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
+SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
/*-----------------------------------------------------------*/\r
\r
/* The two queues used by the test. */\r
-static xQueueHandle xNormallyEmptyQueue, xNormallyFullQueue;\r
+static QueueHandle_t xNormallyEmptyQueue, xNormallyFullQueue;\r
\r
/* Variables used to detect a stall in one of the tasks. */\r
static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;\r
volatile unsigned portBASE_TYPE uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;\r
\r
/* A handle to some of the tasks is required so they can be suspended/resumed. */\r
-xTaskHandle xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
+TaskHandle_t xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
\r
/* When a value is received in a queue the value is ticked off in the array\r
the array position of the value is set to a the identifier of the task or\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
#define pollqSTACK_SIZE configMINIMAL_STACK_SIZE\r
#define pollqQUEUE_SIZE ( 10 )\r
-#define pollqPRODUCER_DELAY ( ( portTickType ) 200 / portTICK_RATE_MS )\r
-#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( portTickType ) ( 20 / portTICK_RATE_MS ) )\r
-#define pollqNO_DELAY ( ( portTickType ) 0 )\r
+#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS )\r
+#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) )\r
+#define pollqNO_DELAY ( ( TickType_t ) 0 )\r
#define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 )\r
#define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 )\r
\r
\r
void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-static xQueueHandle xPolledQueue;\r
+static QueueHandle_t xPolledQueue;\r
\r
/* Create the queue used by the producer and consumer. */\r
xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
vQueueAddToRegistry( xPolledQueue, "Poll_Test_Queue" );\r
\r
/* Spawn the producer and consumer. */\r
- xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ )\r
{\r
/* Send an incrementing number on the queue without blocking. */\r
- if( xQueueSend( *( ( xQueueHandle * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
+ if( xQueueSend( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
{\r
/* We should never find the queue full so if we get here there\r
has been an error. */\r
for( ;; )\r
{ \r
/* Loop until the queue is empty. */\r
- while( uxQueueMessagesWaiting( *( ( xQueueHandle * ) pvParameters ) ) )\r
+ while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) )\r
{\r
- if( xQueueReceive( *( ( xQueueHandle * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
+ if( xQueueReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
{\r
if( usData != usExpectedValue )\r
{\r
static volatile unsigned long ulLoopCounter = 0;\r
\r
/* Handles to the test tasks. */\r
-xTaskHandle xMediumPriorityTask, xHighPriorityTask, xHighestPriorityTask;\r
+TaskHandle_t xMediumPriorityTask, xHighPriorityTask, xHighestPriorityTask;\r
/*-----------------------------------------------------------*/\r
\r
void vStartQueuePeekTasks( void )\r
{\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
\r
/* Create the queue that we are going to use for the test/demo. */\r
xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
static void prvHighestPriorityPeekTask( void *pvParameters )\r
{\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
unsigned long ulValue;\r
\r
#ifdef USE_STDIO\r
\r
static void prvHighPriorityPeekTask( void *pvParameters )\r
{\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
unsigned long ulValue;\r
\r
for( ;; )\r
\r
static void prvMediumPriorityPeekTask( void *pvParameters )\r
{\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
unsigned long ulValue;\r
\r
for( ;; )\r
\r
static void prvLowPriorityPeekTask( void *pvParameters )\r
{\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
unsigned long ulValue;\r
\r
for( ;; )\r
\r
/* The queue that is accessed from the ISR. The queue accessed by the task is\r
created inside the task itself. */\r
-static xQueueHandle xISRQueue = NULL;\r
+static QueueHandle_t xISRQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Create the test task. The queue used by the test task is created inside\r
the task itself. */\r
- xTaskCreate( prvQueueOverwriteTask, "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvQueueOverwriteTask, "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
static void prvQueueOverwriteTask( void *pvParameters )\r
{\r
-xQueueHandle xTaskQueue;\r
+QueueHandle_t xTaskQueue;\r
const unsigned portBASE_TYPE uxQueueLength = 1;\r
unsigned long ulValue, ulStatus = pdPASS, x;\r
\r
/* A delay inserted when the Tx task changes its priority to be above the idle\r
task priority to ensure the idle priority tasks get some CPU time before the\r
next iteration of the queue set Tx task. */\r
-#define queuesetTX_LOOP_DELAY ( 200 / portTICK_RATE_MS )\r
+#define queuesetTX_LOOP_DELAY ( 200 / portTICK_PERIOD_MS )\r
\r
/* The allowable maximum deviation between a received value and the expected\r
received value. A deviation will occur when data is received from a queue\r
/*-----------------------------------------------------------*/\r
\r
/* The queues that are added to the set. */\r
-static xQueueHandle xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
+static QueueHandle_t xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
\r
/* Counts how many times each queue in the set is used to ensure all the\r
queues are used. */\r
static unsigned long ulQueueUsedCounter[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
\r
/* The handle of the queue set to which the queues are added. */\r
-static xQueueSetHandle xQueueSet;\r
+static QueueSetHandle_t xQueueSet;\r
\r
/* If the prvQueueSetReceivingTask() task has not detected any errors then\r
it increments ulCycleCounter on each iteration.\r
static unsigned long ulNextRand = 0;\r
\r
/* The task handles are stored so their priorities can be changed. */\r
-xTaskHandle xQueueSetSendingTask, xQueueSetReceivingTask;\r
+TaskHandle_t xQueueSetSendingTask, xQueueSetReceivingTask;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void prvQueueSetSendingTask( void *pvParameters )\r
{\r
unsigned long ulTaskTxValue = 0, ulQueueToWriteTo;\r
-xQueueHandle xQueueInUse;\r
+QueueHandle_t xQueueInUse;\r
\r
/* Remove compiler warning about the unused parameter. */\r
( void ) pvParameters;\r
static void prvQueueSetReceivingTask( void *pvParameters )\r
{\r
unsigned long ulReceived;\r
-xQueueHandle xActivatedQueue;\r
+QueueHandle_t xActivatedQueue;\r
\r
/* Remove compiler warnings. */\r
( void ) pvParameters;\r
\r
static void prvReceiveFromQueueInSetFromISR( void )\r
{\r
-xQueueSetMemberHandle xActivatedQueue;\r
+QueueSetMemberHandle_t xActivatedQueue;\r
unsigned long ulReceived;\r
\r
/* See if any of the queues in the set contain data. */\r
#error configTIMER_TASK_PRIORITY must be set to at least 1 for this test/demo to function correctly.\r
#endif\r
\r
-#define tmrdemoDONT_BLOCK ( ( portTickType ) 0 )\r
-#define tmrdemoONE_SHOT_TIMER_PERIOD ( xBasePeriod * ( portTickType ) 3 )\r
+#define tmrdemoDONT_BLOCK ( ( TickType_t ) 0 )\r
+#define tmrdemoONE_SHOT_TIMER_PERIOD ( xBasePeriod * ( TickType_t ) 3 )\r
#define trmdemoNUM_TIMER_RESETS ( ( unsigned char ) 10 )\r
\r
/*-----------------------------------------------------------*/\r
pxExpiredTimer parameter passed into that function to know which counter to\r
increment. The other timers all have their own unique callback function and\r
simply increment their counters without using the callback function parameter. */\r
-static void prvAutoReloadTimerCallback( xTimerHandle pxExpiredTimer );\r
-static void prvOneShotTimerCallback( xTimerHandle pxExpiredTimer );\r
+static void prvAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer );\r
+static void prvOneShotTimerCallback( TimerHandle_t pxExpiredTimer );\r
static void prvTimerTestTask( void *pvParameters );\r
-static void prvISRAutoReloadTimerCallback( xTimerHandle pxExpiredTimer );\r
-static void prvISROneShotTimerCallback( xTimerHandle pxExpiredTimer );\r
+static void prvISRAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer );\r
+static void prvISROneShotTimerCallback( TimerHandle_t pxExpiredTimer );\r
\r
/* The test functions used by the timer test task. These manipulate the auto\r
reload and one shot timers in various ways, then delay, then inspect the timers\r
The callback function uses the timer ID to index into, and then increment, a\r
counter in the ucAutoReloadTimerCounters[] array. The auto reload timers\r
referenced from xAutoReloadTimers[] are used by the prvTimerTestTask task. */\r
-static xTimerHandle xAutoReloadTimers[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 };\r
+static TimerHandle_t xAutoReloadTimers[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 };\r
static unsigned char ucAutoReloadTimerCounters[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 };\r
\r
/* The one shot timer is configured to use a callback function that increments\r
ucOneShotTimerCounter each time it gets called. */\r
-static xTimerHandle xOneShotTimer = NULL;\r
+static TimerHandle_t xOneShotTimer = NULL;\r
static unsigned char ucOneShotTimerCounter = ( unsigned char ) 0;\r
\r
/* The ISR reload timer is controlled from the tick hook to exercise the timer\r
API functions that can be used from an ISR. It is configured to increment\r
ucISRReloadTimerCounter each time its callback function is executed. */\r
-static xTimerHandle xISRAutoReloadTimer = NULL;\r
+static TimerHandle_t xISRAutoReloadTimer = NULL;\r
static unsigned char ucISRAutoReloadTimerCounter = ( unsigned char ) 0;\r
\r
/* The ISR one shot timer is controlled from the tick hook to exercise the timer\r
API functions that can be used from an ISR. It is configured to increment\r
ucISRReloadTimerCounter each time its callback function is executed. */\r
-static xTimerHandle xISROneShotTimer = NULL;\r
+static TimerHandle_t xISROneShotTimer = NULL;\r
static unsigned char ucISROneShotTimerCounter = ( unsigned char ) 0;\r
\r
/* The period of all the timers are a multiple of the base period. The base\r
period is configured by the parameter to vStartTimerDemoTask(). */\r
-static portTickType xBasePeriod = 0;\r
+static TickType_t xBasePeriod = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartTimerDemoTask( portTickType xBasePeriodIn )\r
+void vStartTimerDemoTask( TickType_t xBasePeriodIn )\r
{\r
/* Start with the timer and counter arrays clear - this is only necessary\r
where the compiler does not clear them automatically on start up. */\r
\r
/* This is called to check that the created task is still running and has not\r
detected any errors. */\r
-portBASE_TYPE xAreTimerDemoTasksStillRunning( portTickType xCycleFrequency )\r
+portBASE_TYPE xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency )\r
{\r
static unsigned long ulLastLoopCounter = 0UL;\r
-portTickType xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax;\r
-static portTickType xIterationsWithoutCounterIncrement = ( portTickType ) 0, xLastCycleFrequency;\r
+TickType_t xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax;\r
+static TickType_t xIterationsWithoutCounterIncrement = ( TickType_t ) 0, xLastCycleFrequency;\r
\r
if( xLastCycleFrequency != xCycleFrequency )\r
{\r
/* The cycle frequency has probably become much faster due to an error\r
elsewhere. Start counting Iterations again. */\r
- xIterationsWithoutCounterIncrement = ( portTickType ) 0;\r
+ xIterationsWithoutCounterIncrement = ( TickType_t ) 0;\r
xLastCycleFrequency = xCycleFrequency;\r
} \r
\r
function to be called without ulLoopCounter being incremented. This is\r
necessary because the tests in this file block for extended periods, and the\r
block period might be longer than the time between calls to this function. */\r
- xMaxBlockTimeUsedByTheseTests = ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;\r
+ xMaxBlockTimeUsedByTheseTests = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;\r
xLoopCounterIncrementTimeMax = ( xMaxBlockTimeUsedByTheseTests / xCycleFrequency ) + 1;\r
\r
/* If the demo task is still running then the loop counter is expected to\r
{\r
/* ulLoopCounter changed, so the count of times this function was called\r
without a change can be reset to zero. */\r
- xIterationsWithoutCounterIncrement = ( portTickType ) 0;\r
+ xIterationsWithoutCounterIncrement = ( TickType_t ) 0;\r
}\r
\r
ulLastLoopCounter = ulLoopCounter;\r
been started, so their block times should get set to zero within the timer\r
API itself. */\r
xAutoReloadTimers[ xTimer ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
- ( ( xTimer + ( portTickType ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */\r
+ ( ( xTimer + ( TickType_t ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */\r
pdTRUE, /* Auto-reload is set to true. */\r
( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */\r
prvAutoReloadTimerCallback ); /* The callback to be called when the timer expires. */\r
static void prvTest3_CheckAutoReloadExpireRates( void )\r
{\r
unsigned char ucMaxAllowableValue, ucMinAllowableValue, ucTimer;\r
-portTickType xBlockPeriod, xTimerPeriod, xExpectedNumber;\r
+TickType_t xBlockPeriod, xTimerPeriod, xExpectedNumber;\r
\r
/* Check the auto reload timers expire at the expected rates. */\r
\r
\r
/* Delaying for configTIMER_QUEUE_LENGTH * xBasePeriod ticks should allow\r
all the auto reload timers to expire at least once. */\r
- xBlockPeriod = ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;\r
+ xBlockPeriod = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod;\r
vTaskDelay( xBlockPeriod );\r
\r
/* Check that all the auto reload timers have called their callback \r
{\r
/* The expected number of expiries is equal to the block period divided\r
by the timer period. */\r
- xTimerPeriod = ( ( ( portTickType ) ucTimer + ( portTickType ) 1 ) * xBasePeriod );\r
+ xTimerPeriod = ( ( ( TickType_t ) ucTimer + ( TickType_t ) 1 ) * xBasePeriod );\r
xExpectedNumber = xBlockPeriod / xTimerPeriod;\r
\r
ucMaxAllowableValue = ( ( unsigned char ) xExpectedNumber ) ;\r
\r
/* The timers are now all inactive, so this time, after delaying, none\r
of the callback counters should have incremented. */\r
- vTaskDelay( ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod );\r
+ vTaskDelay( ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod );\r
for( ucTimer = 0; ucTimer < ( unsigned char ) configTIMER_QUEUE_LENGTH; ucTimer++ )\r
{\r
if( ucAutoReloadTimerCounters[ ucTimer ] != ( unsigned char ) 0 )\r
/* Delay for three times as long as the one shot timer period, then check\r
to ensure it has only called its callback once, and is now not in the\r
active state. */\r
- vTaskDelay( tmrdemoONE_SHOT_TIMER_PERIOD * ( portTickType ) 3 );\r
+ vTaskDelay( tmrdemoONE_SHOT_TIMER_PERIOD * ( TickType_t ) 3 );\r
\r
if( xTimerIsTimerActive( xOneShotTimer ) != pdFALSE )\r
{\r
}\r
\r
/* Finally delay long enough for both running timers to expire. */\r
- vTaskDelay( ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod );\r
+ vTaskDelay( ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod );\r
\r
/* The timers were not reset during the above delay period so should now\r
both have called their callback functions. */\r
\r
void vTimerPeriodicISRTests( void )\r
{\r
-static portTickType uxTick = ( portTickType ) -1;\r
+static TickType_t uxTick = ( TickType_t ) -1;\r
\r
#if( configTIMER_TASK_PRIORITY != ( configMAX_PRIORITIES - 1 ) )\r
/* The timer service task is not the highest priority task, so it cannot\r
will expire when the kernel's tick count is (100 + xBasePeriod). For this\r
reason xMargin is used as an allowable margin for premature timer expiries\r
as well as late timer expiries. */\r
- const portTickType xMargin = 6;\r
+ const TickType_t xMargin = 6;\r
#else\r
- const portTickType xMargin = 3;\r
+ const TickType_t xMargin = 3;\r
#endif\r
\r
\r
/* It is possible that the timer task has not yet made room in the\r
timer queue. If the timers cannot be started then reset uxTick so\r
another attempt is made later. */\r
- uxTick = ( portTickType ) -1;\r
+ uxTick = ( TickType_t ) -1;\r
\r
/* Try starting first timer. */\r
if( xTimerChangePeriodFromISR( xISRAutoReloadTimer, xBasePeriod, NULL ) == pdPASS )\r
configASSERT( xTestStatus );\r
}\r
}\r
- else if( uxTick == ( ( 2 * xBasePeriod ) + ( xBasePeriod >> ( portTickType ) 2U ) ) )\r
+ else if( uxTick == ( ( 2 * xBasePeriod ) + ( xBasePeriod >> ( TickType_t ) 2U ) ) )\r
{\r
/* The auto reload timer will still be active, but the one shot timer\r
should now have stopped. Again though, at this time, neither timer call\r
configASSERT( xTestStatus );\r
}\r
\r
- uxTick = ( portTickType ) -1;\r
+ uxTick = ( TickType_t ) -1;\r
} \r
}\r
/*-----------------------------------------------------------*/\r
\r
/*** Timer callback functions are defined below here. ***/\r
\r
-static void prvAutoReloadTimerCallback( xTimerHandle pxExpiredTimer )\r
+static void prvAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer )\r
{\r
unsigned long ulTimerID;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvOneShotTimerCallback( xTimerHandle pxExpiredTimer )\r
+static void prvOneShotTimerCallback( TimerHandle_t pxExpiredTimer )\r
{\r
/* The parameter is not used in this case as only one timer uses this\r
callback function. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvISRAutoReloadTimerCallback( xTimerHandle pxExpiredTimer )\r
+static void prvISRAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer )\r
{\r
/* The parameter is not used in this case as only one timer uses this\r
callback function. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvISROneShotTimerCallback( xTimerHandle pxExpiredTimer )\r
+static void prvISROneShotTimerCallback( TimerHandle_t pxExpiredTimer )\r
{\r
/* The parameter is not used in this case as only one timer uses this\r
callback function. */\r
\r
/* Task behaviour. */\r
#define bktQUEUE_LENGTH ( 5 )\r
-#define bktSHORT_WAIT ( ( ( portTickType ) 20 ) / portTICK_RATE_MS )\r
+#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS )\r
#define bktPRIMARY_BLOCK_TIME ( 10 )\r
#define bktALLOWABLE_MARGIN ( 15 )\r
#define bktTIME_TO_BLOCK ( 175 )\r
-#define bktDONT_BLOCK ( ( portTickType ) 0 )\r
+#define bktDONT_BLOCK ( ( TickType_t ) 0 )\r
#define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 )\r
\r
/* The queue on which the tasks block. */\r
-static xQueueHandle xTestQueue;\r
+static QueueHandle_t xTestQueue;\r
\r
/* Handle to the secondary task is required by the primary task for calls\r
to vTaskSuspend/Resume(). */\r
-static xTaskHandle xSecondary;\r
+static TaskHandle_t xSecondary;\r
\r
/* Used to ensure that tasks are still executing without error. */\r
static volatile portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0;\r
static void vPrimaryBlockTimeTestTask( void *pvParameters )\r
{\r
portBASE_TYPE xItem, xData;\r
-portTickType xTimeWhenBlocking;\r
-portTickType xTimeToBlock, xBlockedTime;\r
+TickType_t xTimeWhenBlocking;\r
+TickType_t xTimeToBlock, xBlockedTime;\r
\r
( void ) pvParameters;\r
\r
{\r
/* The queue is empty. Attempt to read from the queue using a block\r
time. When we wake, ensure the delta in time is as expected. */\r
- xTimeToBlock = ( portTickType ) ( bktPRIMARY_BLOCK_TIME << xItem );\r
+ xTimeToBlock = ( TickType_t ) ( bktPRIMARY_BLOCK_TIME << xItem );\r
\r
xTimeWhenBlocking = xTaskGetTickCount();\r
\r
{\r
/* The queue is full. Attempt to write to the queue using a block\r
time. When we wake, ensure the delta in time is as expected. */\r
- xTimeToBlock = ( portTickType ) ( bktPRIMARY_BLOCK_TIME << xItem );\r
+ xTimeToBlock = ( TickType_t ) ( bktPRIMARY_BLOCK_TIME << xItem );\r
\r
xTimeWhenBlocking = xTaskGetTickCount();\r
\r
\r
static void vSecondaryBlockTimeTestTask( void *pvParameters )\r
{\r
-portTickType xTimeWhenBlocking, xBlockedTime;\r
+TickType_t xTimeWhenBlocking, xBlockedTime;\r
portBASE_TYPE xData;\r
\r
( void ) pvParameters;\r
\r
/* The Tx task will transmit the sequence of characters at a pseudo random\r
interval. This is the maximum and minimum block time between sends. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 )\r
-#define comOFFSET_TIME ( ( portTickType ) 3 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 )\r
+#define comOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* We should find that each character can be queued for Tx immediately and we\r
don't have to block to send. */\r
-#define comNO_BLOCK ( ( portTickType ) 0 )\r
+#define comNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The Rx task will block on the Rx queue for a long period. */\r
-#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff )\r
+#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff )\r
\r
/* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */\r
#define comFIRST_BYTE ( 'A' )\r
xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );\r
\r
/* The Tx task is spawned with a lower priority than the Rx task. */\r
- xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vComTxTask, pvParameters )\r
{\r
char cByteToSend;\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
/* The Tx timer transmits the sequence of characters at a pseudo random\r
interval that is capped between comTX_MAX_BLOCK_TIME and\r
comTX_MIN_BLOCK_TIME. */\r
-#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 )\r
-#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 )\r
-#define comOFFSET_TIME ( ( portTickType ) 3 )\r
+#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 )\r
+#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 )\r
+#define comOFFSET_TIME ( ( TickType_t ) 3 )\r
\r
/* States for the simple state machine implemented in the Rx task. */\r
#define comtstWAITING_START_OF_STRING 0\r
to comTX_MIN_BLOCK_TIME to ensure it is never longer than the shortest gap\r
between transmissions. It could be worked out more scientifically from the\r
baud rate being used. */\r
-#define comSHORT_DELAY ( comTX_MIN_BLOCK_TIME >> ( portTickType ) 2 )\r
+#define comSHORT_DELAY ( comTX_MIN_BLOCK_TIME >> ( TickType_t ) 2 )\r
\r
/* The string that is transmitted and received. */\r
#define comTRANSACTED_STRING "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"\r
\r
/* A block time of 0 simply means "don't block". */\r
-#define comtstDONT_BLOCK ( portTickType ) 0\r
+#define comtstDONT_BLOCK ( TickType_t ) 0\r
\r
/* Handle to the com port used by both tasks. */\r
static xComPortHandle xPort = NULL;\r
\r
/* The callback function allocated to the transmit timer, as described in the\r
comments at the top of this file. */\r
-static void prvComTxTimerCallback( xTimerHandle xTimer );\r
+static void prvComTxTimerCallback( TimerHandle_t xTimer );\r
\r
/* The receive task as described in the comments at the top of this file. */\r
static void vComRxTask( void *pvParameters );\r
\r
/* The timer used to periodically transmit the string. This is the timer that\r
has prvComTxTimerCallback allocated to it as its callback function. */\r
-static xTimerHandle xTxTimer = NULL;\r
+static TimerHandle_t xTxTimer = NULL;\r
\r
/* The string length is held at file scope so the Tx timer does not need to\r
calculate it each time it executes. */\r
\r
/* Create the Rx task and the Tx timer. The timer is started from the\r
Rx task. */\r
- xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
xTxTimer = xTimerCreate( "TxTimer", comTX_MIN_BLOCK_TIME, pdFALSE, NULL, prvComTxTimerCallback );\r
configASSERT( xTxTimer );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvComTxTimerCallback( xTimerHandle xTimer )\r
+static void prvComTxTimerCallback( TimerHandle_t xTimer )\r
{\r
-portTickType xTimeToWait;\r
+TickType_t xTimeToWait;\r
\r
/* The parameter is not used in this case. */\r
( void ) xTimer;\r
* Utility function to increment the semaphore count value up from zero to\r
* countMAX_COUNT_VALUE.\r
*/\r
-static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter );\r
+static void prvIncrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter );\r
\r
/*\r
* Utility function to decrement the semaphore count value up from \r
* countMAX_COUNT_VALUE to zero.\r
*/\r
-static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter );\r
+static void prvDecrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter );\r
\r
/*-----------------------------------------------------------*/\r
\r
typedef struct COUNT_SEM_STRUCT\r
{\r
/* The semaphore to be used for the demo. */\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
/* Set to countSTART_AT_MAX_COUNT if the semaphore should be created with\r
its count value set to its max count value, or countSTART_AT_ZERO if it\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" );\r
- vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" );\r
\r
\r
/* Were the semaphores created? */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter )\r
+static void prvDecrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter )\r
{\r
unsigned portBASE_TYPE ux;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter )\r
+static void prvIncrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter )\r
{\r
unsigned portBASE_TYPE ux;\r
\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
-static xQueueHandle xFlashQueue;\r
+static QueueHandle_t xFlashQueue;\r
\r
/* This will be set to pdFALSE if we detect an error. */\r
static portBASE_TYPE xCoRoutineFlashStatus = pdPASS;\r
signed portBASE_TYPE xResult;\r
/* The uxIndex parameter of the co-routine function is used as an index into\r
the xFlashRates array to obtain the delay period to use. */\r
-static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,\r
- 200 / portTICK_RATE_MS,\r
- 250 / portTICK_RATE_MS,\r
- 300 / portTICK_RATE_MS,\r
- 350 / portTICK_RATE_MS,\r
- 400 / portTICK_RATE_MS,\r
- 450 / portTICK_RATE_MS,\r
- 500 / portTICK_RATE_MS };\r
+static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS,\r
+ 200 / portTICK_PERIOD_MS,\r
+ 250 / portTICK_PERIOD_MS,\r
+ 300 / portTICK_PERIOD_MS,\r
+ 350 / portTICK_PERIOD_MS,\r
+ 400 / portTICK_PERIOD_MS,\r
+ 450 / portTICK_PERIOD_MS,\r
+ 500 / portTICK_PERIOD_MS };\r
\r
/* Co-routines MUST start with a call to crSTART. */\r
crSTART( xHandle );\r
/* Queues used to send data FROM a co-routine TO the tick hook function.\r
The hook functions received (Rx's) on these queues. One queue per\r
'hook' co-routine. */\r
-static xQueueHandle xHookRxQueues[ hookNUM_HOOK_CO_ROUTINES ];\r
+static QueueHandle_t xHookRxQueues[ hookNUM_HOOK_CO_ROUTINES ];\r
\r
/* Queues used to send data FROM the tick hook TO a co-routine function.\r
The hood function transmits (Tx's) on these queues. One queue per\r
'hook' co-routine. */\r
-static xQueueHandle xHookTxQueues[ hookNUM_HOOK_CO_ROUTINES ];\r
+static QueueHandle_t xHookTxQueues[ hookNUM_HOOK_CO_ROUTINES ];\r
\r
/* Set to true if an error is detected at any time. */\r
static portBASE_TYPE xCoRoutineErrorDetected = pdFALSE;\r
\r
/* Used to store a handle to the task that should be killed by a suicidal task,\r
before it kills itself. */\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vSuicidalTask, pvParameters )\r
{\r
volatile long l1, l2;\r
-xTaskHandle xTaskToKill;\r
-const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;\r
+TaskHandle_t xTaskToKill;\r
+const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS;\r
\r
if( pvParameters != NULL )\r
{\r
/* This task is periodically created four times. Two created tasks are\r
passed a handle to the other task so it can kill it before killing itself.\r
The other task is passed in null. */\r
- xTaskToKill = *( xTaskHandle* )pvParameters;\r
+ xTaskToKill = *( TaskHandle_t* )pvParameters;\r
}\r
else\r
{\r
if( xTaskToKill != NULL )\r
{\r
/* Make sure the other task has a go before we delete it. */\r
- vTaskDelay( ( portTickType ) 0 );\r
+ vTaskDelay( ( TickType_t ) 0 );\r
\r
/* Kill the other task that was created by vCreateTasks(). */\r
vTaskDelete( xTaskToKill );\r
\r
static portTASK_FUNCTION( vCreateTasks, pvParameters )\r
{\r
-const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS;\r
+const TickType_t xDelay = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
unsigned portBASE_TYPE uxPriority;\r
\r
uxPriority = *( unsigned portBASE_TYPE * ) pvParameters;\r
\r
/* Demo task specific constants. */\r
#define priSTACK_SIZE ( configMINIMAL_STACK_SIZE )\r
-#define priSLEEP_TIME ( ( portTickType ) 128 / portTICK_RATE_MS )\r
+#define priSLEEP_TIME ( ( TickType_t ) 128 / portTICK_PERIOD_MS )\r
#define priLOOPS ( 5 )\r
#define priMAX_COUNT ( ( unsigned long ) 0xff )\r
-#define priNO_BLOCK ( ( portTickType ) 0 )\r
+#define priNO_BLOCK ( ( TickType_t ) 0 )\r
#define priSUSPENDED_QUEUE_LENGTH ( 1 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Handles to the two counter tasks. These could be passed in as parameters\r
to the controller task to prevent them having to be file scope. */\r
-static xTaskHandle xContinuousIncrementHandle, xLimitedIncrementHandle;\r
+static TaskHandle_t xContinuousIncrementHandle, xLimitedIncrementHandle;\r
\r
/* The shared counter variable. This is passed in as a parameter to the two\r
counter variables for demonstration purposes. */\r
static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE;\r
\r
/* Queue used by the second test. */\r
-xQueueHandle xSuspendedTestQueue;\r
+QueueHandle_t xSuspendedTestQueue;\r
\r
/* The value the queue receive task expects to receive next. This is file\r
scope so xAreDynamicPriorityTasksStillRunning() can ensure it is still\r
\r
#define ledSTACK_SIZE configMINIMAL_STACK_SIZE\r
#define ledNUMBER_OF_LEDS ( 3 )\r
-#define ledFLASH_RATE_BASE ( ( portTickType ) 333 )\r
+#define ledFLASH_RATE_BASE ( ( TickType_t ) 333 )\r
\r
/* Variable used by the created tasks to calculate the LED number to use, and\r
the rate at which they should flash the LED. */\r
for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask )\r
{\r
/* Spawn the task. */\r
- xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vLEDFlashTask, pvParameters )\r
{\r
-portTickType xFlashRate, xLastFlashTime;\r
+TickType_t xFlashRate, xLastFlashTime;\r
unsigned portBASE_TYPE uxLED;\r
\r
/* The parameters are not used. */\r
}\r
portEXIT_CRITICAL();\r
\r
- xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( portTickType ) uxLED );\r
- xFlashRate /= portTICK_RATE_MS;\r
+ xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( TickType_t ) uxLED );\r
+ xFlashRate /= portTICK_PERIOD_MS;\r
\r
/* We will turn the LED on and off again in the delay period, so each\r
delay is only half the total period. */\r
- xFlashRate /= ( portTickType ) 2;\r
+ xFlashRate /= ( TickType_t ) 2;\r
\r
/* We need to initialise xLastFlashTime prior to the first call to \r
vTaskDelayUntil(). */\r
#include "flash_timer.h"\r
\r
/* The toggle rates are all a multple of ledFLASH_RATE_BASE. */\r
-#define ledFLASH_RATE_BASE ( ( ( portTickType ) 333 ) / portTICK_RATE_MS )\r
+#define ledFLASH_RATE_BASE ( ( ( TickType_t ) 333 ) / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "don't block". */\r
-#define ledDONT_BLOCK ( ( portTickType ) 0 )\r
+#define ledDONT_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
* this function, and the timer ID is used within the function to determine\r
* which timer has actually expired.\r
*/\r
-static void prvLEDTimerCallback( xTimerHandle xTimer );\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
void vStartLEDFlashTimers( unsigned portBASE_TYPE uxNumberOfLEDs )\r
{\r
unsigned portBASE_TYPE uxLEDTimer;\r
-xTimerHandle xTimer;\r
+TimerHandle_t xTimer;\r
\r
/* Create and start the requested number of timers. */\r
for( uxLEDTimer = 0; uxLEDTimer < uxNumberOfLEDs; ++uxLEDTimer )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLEDTimerCallback( xTimerHandle xTimer )\r
+static void prvLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
portBASE_TYPE xTimerID;\r
\r
\r
for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ )\r
{\r
- xTaskCreate( vCompeteingIntMathTask, "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vCompeteingIntMathTask, "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
#define recmuMAX_COUNT ( 10 )\r
\r
/* Misc. */\r
-#define recmuSHORT_DELAY ( 20 / portTICK_RATE_MS )\r
-#define recmuNO_DELAY ( ( portTickType ) 0 )\r
-#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 )\r
+#define recmuSHORT_DELAY ( 20 / portTICK_PERIOD_MS )\r
+#define recmuNO_DELAY ( ( TickType_t ) 0 )\r
+#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 )\r
\r
/* The three tasks as described at the top of this file. */\r
static void prvRecursiveMutexControllingTask( void *pvParameters );\r
static void prvRecursiveMutexPollingTask( void *pvParameters );\r
\r
/* The mutex used by the demo. */\r
-static xSemaphoreHandle xMutex;\r
+static SemaphoreHandle_t xMutex;\r
\r
/* Variables used to detect and latch errors. */\r
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;\r
\r
/* Handles of the two higher priority tasks, required so they can be resumed\r
(unsuspended). */\r
-static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle;\r
+static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle;\r
\r
/*-----------------------------------------------------------*/\r
\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is\r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );\r
\r
\r
if( xMutex != NULL )\r
\r
#define semtstNUM_TASKS ( 4 )\r
\r
-#define semtstDELAY_FACTOR ( ( portTickType ) 10 )\r
+#define semtstDELAY_FACTOR ( ( TickType_t ) 10 )\r
\r
/* The task function as described at the top of the file. */\r
static portTASK_FUNCTION_PROTO( prvSemaphoreTest, pvParameters );\r
/* Structure used to pass parameters to each task. */\r
typedef struct SEMAPHORE_PARAMETERS\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
volatile unsigned long *pulSharedVariable;\r
- portTickType xBlockTime;\r
+ TickType_t xBlockTime;\r
} xSemaphoreParameters;\r
\r
/* Variables used to check that all the tasks are still running without errors. */\r
void vStartSemaphoreTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
xSemaphoreParameters *pxFirstSemaphoreParameters, *pxSecondSemaphoreParameters;\r
-const portTickType xBlockTime = ( portTickType ) 100;\r
+const TickType_t xBlockTime = ( TickType_t ) 100;\r
\r
/* Create the structure used to pass parameters to the first two tasks. */\r
pxFirstSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );\r
*( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE;\r
\r
/* The first two tasks do not block on semaphore calls. */\r
- pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0;\r
+ pxFirstSemaphoreParameters->xBlockTime = ( TickType_t ) 0;\r
\r
/* Spawn the first two tasks. As they poll they operate at the idle priority. */\r
- xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
- xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
}\r
}\r
\r
{\r
pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );\r
*( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE;\r
- pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS;\r
+ pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_PERIOD_MS;\r
\r
- xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );\r
- xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
}\r
\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" );\r
- vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" );\r
}\r
/*-----------------------------------------------------------*/\r
\r
\r
/* If we are blocking we use a much higher count to ensure loads of context\r
switches occur during the count. */\r
- if( pxParameters->xBlockTime > ( portTickType ) 0 )\r
+ if( pxParameters->xBlockTime > ( TickType_t ) 0 )\r
{\r
ulExpectedValue = semtstBLOCKING_EXPECTED_VALUE;\r
}\r
}\r
else\r
{\r
- if( pxParameters->xBlockTime == ( portTickType ) 0 )\r
+ if( pxParameters->xBlockTime == ( TickType_t ) 0 )\r
{\r
/* We have not got the semaphore yet, so no point using the\r
processor. We are not blocking when attempting to obtain the\r
LCD_WriteReg(R1, 0x10);\r
LCD_WriteReg(R0, 0xA0);\r
LCD_WriteReg(R3, 0x01);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R3, 0x00);\r
LCD_WriteReg(R43, 0x04);\r
\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
\r
/* Chip Set ------------------------------------------------------------------*/\r
LCD_WriteReg(R157, 0x00);\r
\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
/* Increment the character counter */\r
i++;\r
}\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
i = 0;\r
//LCD_ClearLine(Line);\r
ptr -= length;\r
LCD_WriteReg(R36, 0x74);\r
LCD_WriteReg(R30, 0x01);\r
LCD_WriteReg(R24, 0xC1);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R24, 0xE1);\r
LCD_WriteReg(R24, 0xF1);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R24, 0xF5);\r
- vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */\r
+ vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */\r
LCD_WriteReg(R27, 0x09);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
LCD_WriteReg(R31, 0x11);\r
LCD_WriteReg(R32, 0x0E);\r
LCD_WriteReg(R30, 0x81);\r
- vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */\r
}\r
\r
/*******************************************************************************\r
/* Display On */\r
LCD_WriteReg(R0, 0x80);\r
LCD_WriteReg(R59, 0x01);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R0, 0x20);\r
}\r
\r
{\r
/* Display Off */\r
LCD_WriteReg(R0, 0xA0);\r
- vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */\r
+ vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */\r
LCD_WriteReg(R59, 0x00);\r
}\r
\r
#define ETH_ERROR ((u32)0)\r
#define ETH_SUCCESS ((u32)1)\r
\r
-#define ethFIVE_SECONDS ( 5000 / portTICK_RATE_MS )\r
-#define ethHUNDRED_MS ( 100 / portTICK_RATE_MS )\r
+#define ethFIVE_SECONDS ( 5000 / portTICK_PERIOD_MS )\r
+#define ethHUNDRED_MS ( 100 / portTICK_PERIOD_MS )\r
\r
/* Private macro -------------------------------------------------------------*/\r
/* Private variables ---------------------------------------------------------*/\r
}\r
\r
/* Delay to assure PHY reset */\r
- vTaskDelay( 250 / portTICK_RATE_MS );\r
+ vTaskDelay( 250 / portTICK_PERIOD_MS );\r
\r
if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable)\r
{\r
return ETH_ERROR;\r
}\r
\r
- vTaskDelay( 250 / portTICK_RATE_MS );\r
+ vTaskDelay( 250 / portTICK_PERIOD_MS );\r
}\r
\r
/*------------------------- ETHERNET MACCR Configuration ---------------------*/\r
\r
#include "FreeRTOS.h"\r
\r
-typedef portTickType clock_time_t;\r
+typedef TickType_t clock_time_t;\r
#define CLOCK_CONF_SECOND configTICK_RATE_HZ\r
\r
#endif /* __CLOCK_ARCH_H__ */\r
#include "FreeRTOS.h"\r
#include "task.h"\r
\r
-xTaskHandle xEthIntTask;\r
+TaskHandle_t xEthIntTask;\r
\r
/* lwIP includes. */\r
#include "lwip/def.h"\r
/* Delay to wait for a DMA buffer to become available if one is not already\r
available. */\r
#define netifBUFFER_WAIT_ATTEMPTS 10\r
-#define netifBUFFER_WAIT_DELAY (10 / portTICK_RATE_MS)\r
+#define netifBUFFER_WAIT_DELAY (10 / portTICK_PERIOD_MS)\r
\r
/* Delay between polling the PHY to see if a link has been established. */\r
-#define netifLINK_DELAY ( 500 / portTICK_RATE_MS )\r
+#define netifLINK_DELAY ( 500 / portTICK_PERIOD_MS )\r
\r
/* Delay between looking for incoming packets. In ideal world this would be\r
infinite. */\r
static unsigned portBASE_TYPE uxNextRxBuffer = 0, uxNextTxBuffer = 0;\r
\r
/* Semaphore used by the FEC interrupt handler to wake the handler task. */\r
-static xSemaphoreHandle xFecSemaphore;\r
+static SemaphoreHandle_t xFecSemaphore;\r
\r
#pragma options align= packed\r
struct ethernetif\r
/* This is the number of threads that can be started with sys_thead_new() */\r
#define SYS_MBOX_SIZE ( 16 )\r
#define MS_TO_TICKS( ms ) \\r
- ( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS )\r
+ ( TickType_t )( ( TickType_t ) ( ms ) / portTICK_PERIOD_MS )\r
#define TICKS_TO_MS( ticks ) \\r
- ( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )\r
+ ( unsigned long )( ( TickType_t ) ( ticks ) * portTICK_PERIOD_MS )\r
#define THREAD_STACK_SIZE ( 256 /*FSL:1024*/ )\r
#define THREAD_NAME "lwIP"\r
\r
#define THREAD_INIT( tcb ) \\r
do { \\r
tcb->next = NULL; \\r
- tcb->pid = ( xTaskHandle )0; \\r
+ tcb->pid = ( TaskHandle_t )0; \\r
tcb->timeouts.next = NULL; \\r
} while( 0 )\r
\r
{\r
struct sys_tcb *next;\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
} sys_tcb_t;\r
\r
/* ------------------------ Prototypes ------------------------------------ */\r
{\r
sys_tcb_t *current = tasks, *prev;\r
sys_tcb_t *toremove = hdl;\r
- xTaskHandle pid = ( xTaskHandle ) 0;\r
+ TaskHandle_t pid = ( TaskHandle_t ) 0;\r
\r
LWIP_ASSERT( "sys_arch_thread_remove: assertion hdl != NULL failed!", hdl != NULL );\r
\r
* resources.\r
*/\r
vPortExitCritical( );\r
- if( pid != ( xTaskHandle ) 0 )\r
+ if( pid != ( TaskHandle_t ) 0 )\r
{\r
vTaskDelete( pid );\r
/* not reached. */\r
sys_arch_thread_current( void )\r
{\r
sys_tcb_t *p = tasks;\r
- xTaskHandle pid = xTaskGetCurrentTaskHandle( );\r
+ TaskHandle_t pid = xTaskGetCurrentTaskHandle( );\r
\r
vPortEnterCritical( );\r
while( ( p != NULL ) && ( p->pid != pid ) )\r
sys_sem_t\r
sys_sem_new( u8_t count )\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
vSemaphoreCreateBinary( xSemaphore );\r
if( xSemaphore != SYS_SEM_NULL )\r
sys_arch_sem_wait( sys_sem_t sem, u32_t timeout )\r
{\r
portBASE_TYPE xStatus;\r
- portTickType xTicksStart, xTicksEnd, xTicksElapsed;\r
+ TickType_t xTicksStart, xTicksEnd, xTicksElapsed;\r
u32_t timespent;\r
\r
LWIP_ASSERT( "sys_arch_sem_wait: sem != SYS_SEM_NULL", sem != SYS_SEM_NULL );\r
sys_mbox_t\r
sys_mbox_new( /*paolo:void*/int size )\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
mbox = xQueueCreate( SYS_MBOX_SIZE/*size*/, sizeof( void * ) );\r
if( mbox != SYS_MBOX_NULL )\r
{\r
void *ret_msg;\r
portBASE_TYPE xStatus;\r
- portTickType xTicksStart, xTicksEnd, xTicksElapsed;\r
+ TickType_t xTicksStart, xTicksEnd, xTicksElapsed;\r
u32_t timespent;\r
\r
LWIP_ASSERT( "sys_arch_mbox_fetch: mbox != SYS_MBOX_NULL", mbox != SYS_MBOX_NULL );\r
u32_t\r
sys_jiffies( void )\r
{\r
- portTickType xTicks = xTaskGetTickCount( );\r
+ TickType_t xTicks = xTaskGetTickCount( );\r
\r
return ( u32_t )TICKS_TO_MS( xTicks );\r
}\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL (xQueueHandle)0\r
-#define SYS_SEM_NULL (xSemaphoreHandle)0\r
+#define SYS_MBOX_NULL (QueueHandle_t)0\r
+#define SYS_SEM_NULL (SemaphoreHandle_t)0\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
/* Message queue constants. */\r
#define archMESG_QUEUE_LENGTH ( 6 )\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL (xQueueHandle)0\r
-#define SYS_SEM_NULL (xSemaphoreHandle)0\r
+#define SYS_MBOX_NULL (QueueHandle_t)0\r
+#define SYS_SEM_NULL (SemaphoreHandle_t)0\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
/* Message queue constants. */\r
#define archMESG_QUEUE_LENGTH ( 6 )\r
struct timeoutlist\r
{\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
};\r
\r
/* This is the number of threads that can be started with sys_thread_new() */\r
// Creates an empty mailbox.\r
sys_mbox_t sys_mbox_new(int size)\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
( void ) size;\r
\r
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)\r
{\r
void *dummyptr;\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
\r
if ( timeout != 0 )\r
{\r
- if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_RATE_MS ) )\r
+ if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_PERIOD_MS ) )\r
{\r
EndTime = xTaskGetTickCount();\r
- Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;\r
+ Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS;\r
\r
return ( Elapsed );\r
}\r
{\r
while( pdTRUE != xQueueReceive( mbox, &(*msg), portMAX_DELAY ) ){} // time is arbitrary\r
EndTime = xTaskGetTickCount();\r
- Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;\r
+ Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS;\r
\r
return ( Elapsed ); // return time blocked TODO test\r
}\r
// the initial state of the semaphore.\r
sys_sem_t sys_sem_new(u8_t count)\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
vSemaphoreCreateBinary( xSemaphore );\r
\r
*/\r
u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)\r
{\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
if( timeout != 0)\r
{\r
- if( xSemaphoreTake( sem, timeout / portTICK_RATE_MS ) == pdTRUE )\r
+ if( xSemaphoreTake( sem, timeout / portTICK_PERIOD_MS ) == pdTRUE )\r
{\r
EndTime = xTaskGetTickCount();\r
- Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;\r
+ Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS;\r
\r
return (Elapsed); // return time blocked TODO test\r
}\r
{\r
while( xSemaphoreTake( sem, portMAX_DELAY ) != pdTRUE ){}\r
EndTime = xTaskGetTickCount();\r
- Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;\r
+ Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS;\r
\r
return ( Elapsed ); // return time blocked\r
\r
struct sys_timeouts *sys_arch_timeouts(void)\r
{\r
int i;\r
-xTaskHandle pid;\r
+TaskHandle_t pid;\r
struct timeoutlist *tl;\r
\r
pid = xTaskGetCurrentTaskHandle( );\r
*/\r
sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio)\r
{\r
-xTaskHandle CreatedTask;\r
+TaskHandle_t CreatedTask;\r
int result;\r
\r
if ( s_nextthread < SYS_THREAD_MAX )\r
#define netifINTERFACE_TASK_STACK_SIZE ( 350 )\r
#define netifINTERFACE_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
#define netifBUFFER_WAIT_ATTEMPTS 10\r
-#define netifBUFFER_WAIT_DELAY (10 / portTICK_RATE_MS)\r
+#define netifBUFFER_WAIT_DELAY (10 / portTICK_PERIOD_MS)\r
#define IFNAME0 'e'\r
#define IFNAME1 'n'\r
\r
/* The time to block waiting for input. */\r
-#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 )\r
+#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 )\r
\r
/* Interrupt status bit definition. */\r
#define DMI_RX_CURRENT_DONE 0x8000\r
static u8_t s_rxBuff[1520];\r
\r
/* The semaphore used by the ISR to wake the lwIP task. */\r
-static xSemaphoreHandle s_xSemaphore = NULL;\r
+static SemaphoreHandle_t s_xSemaphore = NULL;\r
\r
struct ethernetif {\r
struct eth_addr *ethaddr;\r
* milliseconds. It will do this a maximum of netifMAX_TX_ATTEMPTS before\r
* giving up.\r
*/\r
-#define netifTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define netifTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_PERIOD_MS )\r
#define netifMAX_TX_ATTEMPTS ( 5 )\r
\r
#define netifMAX_MTU 1500\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL ( ( xQueueHandle ) NULL )\r
-#define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL )\r
+#define SYS_MBOX_NULL ( ( QueueHandle_t ) NULL )\r
+#define SYS_SEM_NULL ( ( SemaphoreHandle_t ) NULL )\r
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xSemaphoreHandle sys_mutex_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef SemaphoreHandle_t sys_mutex_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
#define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE )\r
#define sys_mbox_set_invalid( x ) ( ( *x ) = NULL )\r
}\r
else\r
{\r
- xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( portTickType ) 0 );\r
+ xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 );\r
}\r
\r
if( xReturn == pdPASS )\r
u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut )\r
{\r
void *pvDummy;\r
-portTickType xStartTime, xEndTime, xElapsed;\r
+TickType_t xStartTime, xEndTime, xElapsed;\r
unsigned long ulReturn;\r
\r
xStartTime = xTaskGetTickCount();\r
{\r
configASSERT( xInsideISR == ( portBASE_TYPE ) 0 );\r
\r
- if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_RATE_MS ) )\r
+ if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) )\r
{\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
ulReturn = xElapsed;\r
}\r
{\r
while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) );\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
if( xElapsed == 0UL )\r
{\r
*---------------------------------------------------------------------------*/\r
u32_t sys_arch_sem_wait( sys_sem_t *pxSemaphore, u32_t ulTimeout )\r
{\r
-portTickType xStartTime, xEndTime, xElapsed;\r
+TickType_t xStartTime, xEndTime, xElapsed;\r
unsigned long ulReturn;\r
\r
xStartTime = xTaskGetTickCount();\r
\r
if( ulTimeout != 0UL )\r
{\r
- if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_RATE_MS ) == pdTRUE )\r
+ if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE )\r
{\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;\r
+ xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS;\r
ulReturn = xElapsed;\r
}\r
else\r
{\r
while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE );\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
if( xElapsed == 0UL )\r
{\r
*---------------------------------------------------------------------------*/\r
sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority )\r
{\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
portBASE_TYPE xResult;\r
sys_thread_t xReturn;\r
\r
{\r
static struct pcap_pkthdr *pxHeader;\r
const unsigned char *pucPacketData;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
long lResult;\r
\r
{\r
static struct pcap_pkthdr *pxHeader;\r
const unsigned char *pucPacketData;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
long lResult;\r
\r
/* Just to kill the compiler warning. */\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL ( ( xQueueHandle ) NULL )\r
-#define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL )\r
+#define SYS_MBOX_NULL ( ( QueueHandle_t ) NULL )\r
+#define SYS_SEM_NULL ( ( SemaphoreHandle_t ) NULL )\r
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xSemaphoreHandle sys_mutex_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef SemaphoreHandle_t sys_mutex_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
#define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE )\r
#define sys_mbox_set_invalid( x ) ( ( *x ) = NULL )\r
u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut )\r
{\r
void *pvDummy;\r
-portTickType xStartTime, xEndTime, xElapsed;\r
+TickType_t xStartTime, xEndTime, xElapsed;\r
unsigned long ulReturn;\r
\r
xStartTime = xTaskGetTickCount();\r
\r
if( ulTimeOut != 0UL )\r
{\r
- if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_RATE_MS ) )\r
+ if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) )\r
{\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
ulReturn = xElapsed;\r
}\r
{\r
while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) );\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
if( xElapsed == 0UL )\r
{\r
*---------------------------------------------------------------------------*/\r
u32_t sys_arch_sem_wait( sys_sem_t *pxSemaphore, u32_t ulTimeout )\r
{\r
-portTickType xStartTime, xEndTime, xElapsed;\r
+TickType_t xStartTime, xEndTime, xElapsed;\r
unsigned long ulReturn;\r
\r
xStartTime = xTaskGetTickCount();\r
\r
if( ulTimeout != 0UL )\r
{\r
- if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_RATE_MS ) == pdTRUE )\r
+ if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE )\r
{\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;\r
+ xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS;\r
ulReturn = xElapsed;\r
}\r
else\r
{\r
while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE );\r
xEndTime = xTaskGetTickCount();\r
- xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
+ xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS;\r
\r
if( xElapsed == 0UL )\r
{\r
*---------------------------------------------------------------------------*/\r
sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority )\r
{\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
portBASE_TYPE xResult;\r
sys_thread_t xReturn;\r
\r
#ifndef TIMER_DEMO_H\r
#define TIMER_DEMO_H\r
\r
-void vStartTimerDemoTask( portTickType xBaseFrequencyIn );\r
-portBASE_TYPE xAreTimerDemoTasksStillRunning( portTickType xCycleFrequency );\r
+void vStartTimerDemoTask( TickType_t xBaseFrequencyIn );\r
+portBASE_TYPE xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency );\r
void vTimerPeriodicISRTests( void );\r
\r
#endif /* TIMER_DEMO_H */\r
\r
void vPrintInitialise( void );\r
void vPrintDisplayMessage( const char * const * pcMessageToSend );\r
-const char *pcPrintGetNextMessage( portTickType xPrintRate );\r
+const char *pcPrintGetNextMessage( TickType_t xPrintRate );\r
\r
#endif\r
\r
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength );\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength );\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime );\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime );\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime );\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime );\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );\r
void vSerialClose( xComPortHandle xPort );\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 98000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 - ( unsigned short ) configSTACK_START )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6 * 1024 ) )\r
\r
/* Toggle rate for the on board LED - which is dependent on whether or not\r
an error has been detected. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 5000 )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 250 )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 5000 )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 250 )\r
\r
/* Baud rate used by the serial port tasks. */\r
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )\r
must not be used with the co-operative scheduler. */\r
#if configUSE_PREEMPTION == 1\r
{\r
- xTaskCreate( vRegisterCheck, "RegChck", configMINIMAL_STACK_SIZE, mainDUMMY_POINTER, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vFLOPCheck1, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vFLOPCheck2, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vRegisterCheck, "RegChck", configMINIMAL_STACK_SIZE, mainDUMMY_POINTER, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vFLOPCheck1, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vFLOPCheck2, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );\r
}\r
#endif \r
\r
- xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, ( TaskHandle_t * ) NULL );\r
\r
/* Finally kick off the scheduler. This function should never return. */\r
vTaskStartScheduler();\r
#define ser8BIT_WITH_RELOAD ( ( unsigned char ) 0x20 )\r
#define serSMOD ( ( unsigned char ) 0x10 )\r
\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
data static unsigned portBASE_TYPE uxTxEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* There is only one port supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn;\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) \r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 10 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) \r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
/* If an error is detected in a task then the vErrorChecks() task will enter\r
an infinite loop flashing the LED at this rate. */\r
-#define mainERROR_FLASH_RATE ( ( portTickType ) 100 / portTICK_RATE_MS )\r
+#define mainERROR_FLASH_RATE ( ( TickType_t ) 100 / portTICK_PERIOD_MS )\r
\r
/* Task function for the "Print" task as described at the top of the file. */\r
static void vErrorChecks( void *pvParameters );\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xExpectedWakeTime;\r
-const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS;\r
+TickType_t xExpectedWakeTime;\r
+const TickType_t xPrintRate = ( TickType_t ) 5000 / portTICK_PERIOD_MS;\r
const long lMaxAllowableTimeDifference = ( long ) 0;\r
-portTickType xWakeTime;\r
+TickType_t xWakeTime;\r
long lTimeDifference;\r
const char *pcReceivedMessage;\r
const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n";\r
\r
Changes from V2.0.0\r
\r
- + Use portTickType in place of unsigned pdLONG for delay periods.\r
+ + Use TickType_t in place of unsigned pdLONG for delay periods.\r
+ Slightly more efficient vSerialSendString() implementation.\r
+ cQueueReieveFromISR() used in place of xQueueReceive() in ISR.\r
*/\r
#define serCLEAR_ALL_STATUS_BITS ( ( unsigned short ) 0x00 )\r
#define serINTERRUPT_PRIORITY ( ( unsigned short ) 0x01 ) /*< Just below the scheduler priority. */\r
\r
-#define serDONT_BLOCK ( ( portTickType ) 0 )\r
+#define serDONT_BLOCK ( ( TickType_t ) 0 )\r
\r
typedef enum\r
{ \r
unsigned short usIRQVector;\r
\r
/* Queues used for communications with com test task. */\r
- xQueueHandle xRxedChars; \r
- xQueueHandle xCharsForTx;\r
+ QueueHandle_t xRxedChars; \r
+ QueueHandle_t xCharsForTx;\r
\r
/* This semaphore does nothing useful except test a feature of the\r
scheduler. */\r
- xSemaphoreHandle xTestSem;\r
+ SemaphoreHandle_t xTestSem;\r
\r
} xComPort;\r
\r
/* These prototypes are repeated here so we don't have to include the serial header. This allows\r
the xComPortHandle structure details to be private to this file. */\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime );\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime );\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime );\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime );\r
void vSerialClose( xComPortHandle xPort );\r
short sSerialWaitForSemaphore( xComPortHandle xPort );\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer, note that this routine is only \r
called having checked that the is (at least) one to get */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime )\r
{\r
if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
{\r
\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort )\r
{\r
-const portTickType xBlockTime = ( portTickType ) 0xffff;\r
+const TickType_t xBlockTime = ( TickType_t ) 0xffff;\r
\r
/* This function does nothing interesting, but test the \r
semaphore from ISR mechanism. */\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 22118400 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15 * 1024 ) )\r
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found\r
the the toggle rate increases to mainERROR_CHECK_PERIOD. */\r
#define mainCHECK_TASK_LED ( 5 )\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )\r
*/\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainCHECK_PERIOD;\r
+TickType_t xDelayPeriod = mainCHECK_PERIOD;\r
volatile unsigned long ulMemCheckTaskRunningCount;\r
-xTaskHandle xCreatedTask;\r
-portTickType xLastWakeTime;\r
+TaskHandle_t xCreatedTask;\r
+TickType_t xLastWakeTime;\r
\r
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()\r
functions correctly. */\r
\r
/* The queues used to communicate between the task code and the interrupt\r
service routines. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Hardware specific constants. */\r
#define serTX_INTERRUPT ( ( unsigned char ) 0x80 )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer queue. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn = pdPASS;\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10240 ) )\r
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found \r
then the toggle rate increases to mainERROR_CHECK_PERIOD. */\r
#define mainCHECK_TASK_LED ( 7 )\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The constants used in the idle task calculation. */\r
#define intgCONST1 ( ( long ) 123 )\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainCHECK_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainCHECK_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()\r
functions correctly. */\r
\r
/* The queues used to communicate between the task code and the interrupt\r
service routines. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Interrupt identification bits. */\r
#define serOVERRUN_INTERRUPT ( 0x08 )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer queue. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Place the character in the queue of characters to be transmitted. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2048 - 256 ) )\r
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found \r
then the toggle rate increases to mainERROR_CHECK_PERIOD. */\r
#define mainCHECK_TASK_LED ( 7 )\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* LED that is toggled by the button push interrupt. */\r
#define mainBUTTON_PUSH_LED ( 5 )\r
\r
/* The queue used to send data from the button push ISR to the Button Push \r
task. */\r
-static xQueueHandle xButtonQueue;\r
+static QueueHandle_t xButtonQueue;\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainCHECK_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainCHECK_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()\r
functions correctly. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn = pdPASS;\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 977 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 977 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300/*128*/ )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10752 ) )\r
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found \r
then the toggle rate increases to mainERROR_CHECK_PERIOD. */\r
#define mainCHECK_TASK_LED ( 7 )\r
-#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The constants used in the idle task calculation. */\r
#define intgCONST1 ( ( long ) 123 )\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainCHECK_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainCHECK_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()\r
functions correctly. */\r
\r
/* The queues used to communicate between the task code and the interrupt\r
service routines. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Interrupt identification bits. */\r
#define serOVERRUN_INTERRUPT ( '\x08' )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer queue. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Place the character in the queue of characters to be transmitted. */\r
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 64000000 ) /* Clock setup from start91460.asm in the demo application. */\r
#define configPER_CLOCK_HZ ( ( unsigned long ) 16000000 ) /* Clock setup from start91460.asm in the demo application. */\r
#define configMAX_PRIORITIES ( 6 )\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
-static xQueueHandle xFlashQueue;\r
+static QueueHandle_t xFlashQueue;\r
\r
/* This will be set to pdFALSE if we detect an error. */\r
static unsigned portBASE_TYPE uxCoRoutineFlashStatus = pdPASS;\r
signed portBASE_TYPE xResult;\r
/* The uxIndex parameter of the co-routine function is used as an index into\r
the xFlashRates array to obtain the delay period to use. */\r
-static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,\r
- 200 / portTICK_RATE_MS,\r
- 250 / portTICK_RATE_MS,\r
- 300 / portTICK_RATE_MS,\r
- 350 / portTICK_RATE_MS,\r
- 400 / portTICK_RATE_MS,\r
- 450 / portTICK_RATE_MS,\r
- 500 / portTICK_RATE_MS };\r
+static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS,\r
+ 200 / portTICK_PERIOD_MS,\r
+ 250 / portTICK_PERIOD_MS,\r
+ 300 / portTICK_PERIOD_MS,\r
+ 350 / portTICK_PERIOD_MS,\r
+ 400 / portTICK_PERIOD_MS,\r
+ 450 / portTICK_PERIOD_MS,\r
+ 500 / portTICK_PERIOD_MS };\r
\r
/* Co-routines MUST start with a call to crSTART. */\r
crSTART( xHandle );\r
toggles an LED every three seconds. If an error is discovered in any task the\r
rate is increased to 500 milliseconds. [in this case the '*' characters on the\r
LCD represent LEDs]*/\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The total number of LEDs available. */\r
#define mainNO_CO_ROUTINE_LEDs ( 8 )\r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
\r
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
works correctly. */\r
#include "serial.h"\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars; \r
+static QueueHandle_t xRxedChars; \r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xCharsForTx; \r
\r
static volatile short sTHREEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
void vInitUart5( void );\r
\r
\r
-static xQueueHandle xQueue;\r
+static QueueHandle_t xQueue;\r
\r
void vInitUart5( void )\r
{\r
case '2':\r
vTaskStartTrace( (signed char *) buff, sizeof( buff ) );\r
Puts5( "\n\rThe trace started!!" );\r
- vTaskDelay( (portTickType) 450 );\r
+ vTaskDelay( (TickType_t) 450 );\r
trace_len = ulTaskEndTrace();\r
Puts5( "\n\rThe trace ended!!" );\r
Puts5( "\n\rThe trace is as follows...." );\r
#if WATCHDOG == WTC_IN_TASK\r
static void prvWatchdogTask ( void *pvParameters )\r
{\r
- const portTickType xFrequency = WTC_CLR_PER;\r
- portTickType xLastWakeTime;\r
+ const TickType_t xFrequency = WTC_CLR_PER;\r
+ TickType_t xLastWakeTime;\r
\r
/* Get currrent tick count */\r
xLastWakeTime = xTaskGetTickCount();\r
#if WATCHDOG == WTC_IN_TASK\r
void vStartWatchdogTask( unsigned short uxPriority )\r
{\r
- xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
#endif\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 ) /* This can be greatly reduced when using the small or medium memory model. */\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */\r
#define configCLKP1_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (20000) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
-static xQueueHandle xFlashQueue;\r
+static QueueHandle_t xFlashQueue;\r
\r
/* This will be set to pdFALSE if we detect an error. */\r
static unsigned portBASE_TYPE uxCoRoutineFlashStatus = pdPASS;\r
signed portBASE_TYPE xResult;\r
/* The uxIndex parameter of the co-routine function is used as an index into\r
the xFlashRates array to obtain the delay period to use. */\r
-static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,\r
- 200 / portTICK_RATE_MS,\r
- 250 / portTICK_RATE_MS,\r
- 300 / portTICK_RATE_MS,\r
- 350 / portTICK_RATE_MS,\r
- 400 / portTICK_RATE_MS,\r
- 450 / portTICK_RATE_MS,\r
- 500 / portTICK_RATE_MS };\r
+static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS,\r
+ 200 / portTICK_PERIOD_MS,\r
+ 250 / portTICK_PERIOD_MS,\r
+ 300 / portTICK_PERIOD_MS,\r
+ 350 / portTICK_PERIOD_MS,\r
+ 400 / portTICK_PERIOD_MS,\r
+ 450 / portTICK_PERIOD_MS,\r
+ 500 / portTICK_PERIOD_MS };\r
\r
/* Co-routines MUST start with a call to crSTART. */\r
crSTART( xHandle );\r
toggles an LED every three seconds. If an error is discovered in any task the\r
rate is increased to 500 milliseconds. [in this case the '*' characters on the\r
LCD represent LED's] */\r
-#define mainNO_ERROR_CHECK_DELAY ( (portTickType) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( (portTickType) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( (TickType_t) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( (TickType_t) 500 / portTICK_PERIOD_MS )\r
\r
/* LED assignments for the demo tasks. */\r
#define mainNUM_FLASH_CO_ROUTINES 8\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
\r
/* Just to remove compiler warnings. */\r
( void ) pvParameters;\r
#include "serial.h"\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xCharsForTx;\r
\r
static volatile short sTHREEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
/*********************@GLOBAL_VARIABLES_START*******************/\r
const char ASCII[] = "0123456789ABCDEF";\r
\r
-xTaskHandle UART_TaskHandle;\r
+TaskHandle_t UART_TaskHandle;\r
\r
-static xQueueHandle xQueue;\r
+static QueueHandle_t xQueue;\r
void InitUart0( void )\r
{\r
/* Initialize UART asynchronous mode */\r
case '2':\r
vTaskStartTrace( (signed char *) buff, sizeof( buff ) );\r
Puts0( "\n\rThe trace started!!" );\r
- vTaskDelay( (portTickType) 500 );\r
+ vTaskDelay( (TickType_t) 500 );\r
trace_len = ulTaskEndTrace();\r
Puts0( "\n\rThe trace ended!!" );\r
Puts0( "\n\rThe trace is as follows...." );\r
#if WATCHDOG == WTC_IN_TASK\r
static void prvWatchdogTask( void *pvParameters )\r
{\r
- const portTickType xFrequency = WTC_CLR_PER;\r
- portTickType xLastWakeTime;\r
+ const TickType_t xFrequency = WTC_CLR_PER;\r
+ TickType_t xLastWakeTime;\r
( void ) pvParameters;\r
\r
/* Get currrent tick count */\r
#if WATCHDOG == WTC_IN_TASK\r
void vStartWatchdogTask( unsigned portBASE_TYPE uxPriority )\r
{\r
- xTaskCreate( prvWatchdogTask, "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( prvWatchdogTask, "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
\r
#endif\r
#include "semphr.h"\r
\r
/* Delays used within the dice functionality. All delays are defined in milliseconds. */\r
-#define diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ( 20 / portTICK_RATE_MS )\r
-#define diceSHAKE_TIME ( ( 2000 / portTICK_RATE_MS ) / diceDELAY_BETWEEN_RANDOM_NUMBERS_ms )\r
-#define diceSHORT_PAUSE_BEFORE_SHAKE ( 250 / portTICK_RATE_MS )\r
-#define diceDELAY_WHILE_DISPLAYING_RESULT ( 5000 / portTICK_RATE_MS )\r
+#define diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ( 20 / portTICK_PERIOD_MS )\r
+#define diceSHAKE_TIME ( ( 2000 / portTICK_PERIOD_MS ) / diceDELAY_BETWEEN_RANDOM_NUMBERS_ms )\r
+#define diceSHORT_PAUSE_BEFORE_SHAKE ( 250 / portTICK_PERIOD_MS )\r
+#define diceDELAY_WHILE_DISPLAYING_RESULT ( 5000 / portTICK_PERIOD_MS )\r
\r
/* Macro to access the display ports. */\r
#define dice7SEG_Value( x ) ( *( pucDisplayOutput[ x ] ) )\r
/* The semaphores used to communicate button push events between the button\r
input interrupt handlers and the dice tasks. Two dice tasks are created so two\r
semaphores are required. */\r
-static xSemaphoreHandle xSemaphores[ 2 ] = { 0 };\r
+static SemaphoreHandle_t xSemaphores[ 2 ] = { 0 };\r
\r
/* Defines the ports used to write to the display. This variable is defined in\r
partest.c, which contains the LED set/clear/toggle functions. */\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 ) /* This can be greatly reduced when using the small or medium memory model. */\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */\r
#define configCLKP1_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (5000) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
#define ledNUM_OF_LED_TASKS ( 7 )\r
\r
/* Each task toggles at a frequency that is a multiple of 333ms. */\r
-#define ledFLASH_RATE_BASE ( ( portTickType ) 333 )\r
+#define ledFLASH_RATE_BASE ( ( TickType_t ) 333 )\r
\r
/* One co-routine per segment of the right hand display. */\r
#define ledNUM_OF_LED_CO_ROUTINES 7\r
\r
/* Handles to each of the 7 tasks. Used so the tasks can be suspended\r
and resumed. */\r
-static xTaskHandle xFlashTaskHandles[ ledNUM_OF_LED_TASKS ] = { 0 };\r
+static TaskHandle_t xFlashTaskHandles[ ledNUM_OF_LED_TASKS ] = { 0 };\r
\r
/* Handle to the task in which the co-routines run. Used so the\r
co-routines can be suspended and resumed. */\r
-static xTaskHandle xCoroutineTask;\r
+static TaskHandle_t xCoroutineTask;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void vLEDFlashTask( void * pvParameters )\r
{\r
-portTickType xFlashRate, xLastFlashTime;\r
+TickType_t xFlashRate, xLastFlashTime;\r
unsigned short usLED;\r
\r
/* The LED to flash is passed in as the task parameter. */\r
usLED = ( unsigned short ) pvParameters;\r
\r
/* Calculate the rate at which this task is going to toggle its LED. */\r
- xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( portTickType ) usLED );\r
- xFlashRate /= portTICK_RATE_MS;\r
+ xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( TickType_t ) usLED );\r
+ xFlashRate /= portTICK_PERIOD_MS;\r
\r
/* We will turn the LED on and off again in the delay period, so each\r
delay is only half the total period. */\r
- xFlashRate /= ( portTickType ) 2;\r
+ xFlashRate /= ( TickType_t ) 2;\r
\r
/* We need to initialise xLastFlashTime prior to the first call to\r
vTaskDelayUntil(). */\r
{\r
/* The usIndex parameter of the co-routine function is used as an index into\r
the xFlashRates array to obtain the delay period to use. */\r
-static const portTickType xFlashRates[ ledNUM_OF_LED_CO_ROUTINES ] = { 150 / portTICK_RATE_MS,\r
- 300 / portTICK_RATE_MS,\r
- 450 / portTICK_RATE_MS,\r
- 600 / portTICK_RATE_MS,\r
- 750 / portTICK_RATE_MS,\r
- 900 / portTICK_RATE_MS,\r
- 1050 / portTICK_RATE_MS };\r
+static const TickType_t xFlashRates[ ledNUM_OF_LED_CO_ROUTINES ] = { 150 / portTICK_PERIOD_MS,\r
+ 300 / portTICK_PERIOD_MS,\r
+ 450 / portTICK_PERIOD_MS,\r
+ 600 / portTICK_PERIOD_MS,\r
+ 750 / portTICK_PERIOD_MS,\r
+ 900 / portTICK_PERIOD_MS,\r
+ 1050 / portTICK_PERIOD_MS };\r
\r
/* Co-routines MUST start with a call to crSTART. */\r
crSTART( xHandle );\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 7 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )\r
#define configMAX_TASK_NAME_LEN ( 16 )\r
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* Interval in which tasks are checked. */\r
-#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 2000 / portTICK_PERIOD_MS )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )\r
portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
unsigned long ulMemCheckTaskRunningCount;\r
- xTaskHandle xCreatedTask;\r
+ TaskHandle_t xCreatedTask;\r
\r
/* The parameters are not used in this function. */\r
( void )pvParameters;\r
typedef struct\r
{\r
portBASE_TYPE xInitialized;\r
- xQueueHandle xRXChars;\r
- xQueueHandle xTXChars;\r
+ QueueHandle_t xRXChars;\r
+ QueueHandle_t xTXChars;\r
} xComPortIF_t;\r
\r
static xComPortIF_t xComPortIF[ COM_NIFACE ];\r
\r
signed portBASE_TYPE\r
xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar,\r
- portTickType xBlockTime )\r
+ TickType_t xBlockTime )\r
{\r
int i;\r
portBASE_TYPE xResult = pdFALSE;\r
\r
signed portBASE_TYPE\r
xSerialPutChar( xComPortHandle pxPort, signed char cOutChar,\r
- portTickType xBlockTime )\r
+ TickType_t xBlockTime )\r
{\r
int i;\r
portBASE_TYPE xResult = pdFALSE;\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 25000000UL )\r
#define configLFXT_CLOCK_HZ ( 32768L )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
\r
/* The frequency at which the check timer (described in the comments at the top\r
of this file) will call its callback function. */\r
-#define mainCHECK_TIMER_PERIOD ( 5000UL / ( unsigned long ) portTICK_RATE_MS )\r
+#define mainCHECK_TIMER_PERIOD ( 5000UL / ( unsigned long ) portTICK_PERIOD_MS )\r
\r
/* Misc. */\r
#define mainDONT_BLOCK ( 0 )\r
/*\r
* Defines the 'check' functionality as described at the top of this file. This\r
* function is the callback function for the 'check' timer. */\r
-static void vCheckTimerCallback( xTimerHandle xTimer );\r
+static void vCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* The handle of the queue used to send messages from tasks and interrupts to\r
the LCD task. */\r
-static xQueueHandle xLCDQueue = NULL;\r
+static QueueHandle_t xLCDQueue = NULL;\r
\r
/* The 'check' timer, as described at the top of this file. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The definition of each message sent from tasks and interrupts to the LCD\r
task. */\r
\r
/* Block for 10 milliseconds so this task does not utilise all the CPU\r
time and debouncing of the button is not necessary. */\r
- vTaskDelay( 10 / portTICK_RATE_MS );\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vCheckTimerCallback( xTimerHandle xTimer )\r
+static void vCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
\r
xStatusMessage.ulMessageValue = mainERROR_COUNT_SEM_TEST;\r
}\r
\r
- if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainCHECK_TIMER_PERIOD ) != pdPASS )\r
+ if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainCHECK_TIMER_PERIOD ) != pdPASS )\r
{\r
xStatusMessage.ulMessageValue = mainERROR_TIMER_TEST;\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r
#include "serial.h"\r
\r
/* Misc. constants. */\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( 25000000UL )\r
#define configLFXT_CLOCK_HZ ( 32768L )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
\r
/* The handle of the queue used to send messages from tasks and interrupts to\r
the LCD task. */\r
-static xQueueHandle xLCDQueue = NULL;\r
+static QueueHandle_t xLCDQueue = NULL;\r
\r
/* The definition of each message sent from tasks and interrupts to the LCD\r
task. */\r
\r
/* Block for 10 milliseconds so this task does not utilise all the CPU\r
time and debouncing of the button is not necessary. */\r
- vTaskDelay( 10 / portTICK_RATE_MS );\r
+ vTaskDelay( 10 / portTICK_PERIOD_MS );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
{\r
static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
static unsigned long ulCounter = 0;\r
-static const unsigned long ulCheckFrequency = 5000UL / portTICK_RATE_MS;\r
+static const unsigned long ulCheckFrequency = 5000UL / portTICK_PERIOD_MS;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Define the status message that is sent to the LCD task. By default the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r
#include "serial.h"\r
\r
/* Misc. constants. */\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 100000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_PERIOD;\r
\r
/* The parameters are not used. */\r
( void ) pvParameters;\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added because it has the higher priority, meaning\r
#define mainQUEUE_LENGTH ( 1 )\r
\r
/* A block time of 0 simply means, "don't block". */\r
-#define mainDONT_BLOCK ( portTickType ) 0\r
+#define mainDONT_BLOCK ( TickType_t ) 0\r
\r
/* The following constants describe the timer instance used in this application.\r
They are defined here such that a user can easily change all the needed parameters\r
* The LED timer callback function. This does nothing but increment the\r
* ulCallback variable each time it executes.\r
*/\r
-static void vSoftwareTimerCallback( xTimerHandle xTimer );\r
+static void vSoftwareTimerCallback( TimerHandle_t xTimer );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by the queue send and queue receive tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vSoftwareTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xExampleSoftwareTimer = NULL;\r
+static TimerHandle_t xExampleSoftwareTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Create the software timer */\r
xExampleSoftwareTimer = xTimerCreate( "SoftwareTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vSoftwareTimerCallback /* The callback function that switches the LED off. */\r
/*-----------------------------------------------------------*/\r
\r
/* The callback is executed when the software timer expires. */\r
-static void vSoftwareTimerCallback( xTimerHandle xTimer )\r
+static void vSoftwareTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Just increment the ulCallbac variable. */\r
ulCallback++;\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( XPAR_MICROBLAZE_CORE_CLOCK_FREQ_HZ ) /* Not actually used in this demo as the timer is set up in main() and uses the peripheral clock, not the CPU clock. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 7 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 64 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added because it has the higher priority, meaning\r
#define mainTIMER_CONTROLLED_LED 0x02UL\r
\r
/* A block time of 0 simply means, "don't block". */\r
-#define mainDONT_BLOCK ( portTickType ) 0\r
+#define mainDONT_BLOCK ( TickType_t ) 0\r
\r
/*-----------------------------------------------------------*/\r
\r
* The LED timer callback function. This does nothing but switch off the\r
* LED defined by the mainTIMER_CONTROLLED_LED constant.\r
*/\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The handler executed each time a button interrupt is generated. This ensures\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by the queue send and queue receive tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The LED software timer. This uses vLEDTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
\r
/* Maintains the current LED output state. */\r
static volatile unsigned char ucGPIOState = 0U;\r
this file. The timer is not actually started until a button interrupt is\r
pushed, as it is not until that point that the LED is turned on. */\r
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
- ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
vLEDTimerCallback /* The callback function that switches the LED off. */\r
/*-----------------------------------------------------------*/\r
\r
/* The callback is executed when the LED timer expires. */\r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The timer has expired - so no button pushes have occurred in the last\r
five seconds - turn the LED off. NOTE - accessing the LED port should use\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. See the description of the check timer in the comments at the\r
top of this file. */\r
-#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. See the description of the check timer in the comments at\r
the top of this file. */\r
-#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
-#define mainDONT_BLOCK ( ( portTickType ) 0 )\r
+#define mainDONT_BLOCK ( ( TickType_t ) 0 )\r
\r
/* The LED used by the comtest tasks. See the comtest_strings.c file for more\r
information. In this case an invalid LED number is provided as all four\r
* Defines the 'check' timer functionality as described at the top of this file.\r
* This function is the callback function associated with the 'check' timer.\r
*/\r
-static void vCheckTimerCallback( xTimerHandle xTimer );\r
+static void vCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Configure the interrupt controller, LED outputs and button inputs.\r
static XTmrCtr xTimer0Instance;\r
\r
/* The 'check' timer, as described at the top of this file. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* Used in the run time stats calculations. */\r
static unsigned long ulClocksPer10thOfAMilliSecond = 0UL;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vCheckTimerCallback( xTimerHandle xTimer )\r
+static void vCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
extern unsigned long ulRegTest1CycleCount, ulRegTest2CycleCount;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
static long lErrorAlreadyLatched = pdFALSE;\r
-portTickType xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD;\r
+TickType_t xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD;\r
\r
/* This is the callback function used by the 'check' timer, as described\r
in the comments at the top of this file. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
static XUartLite xUartLiteInstance;\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
#define butLED1 P7_bit.no7\r
\r
/* A short delay used for button debouncing. */\r
-#define butDEBOUNCE_DELAY ( 200 / portTICK_RATE_MS )\r
+#define butDEBOUNCE_DELAY ( 200 / portTICK_PERIOD_MS )\r
\r
/* The semaphore used to synchronise the button push task with the interrupt. */\r
-static xSemaphoreHandle xButtonSemaphore;\r
+static SemaphoreHandle_t xButtonSemaphore;\r
\r
/*\r
* The definition of the button task itself. See the comments at the top of\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
- #define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+ #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#define mainGEN_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
\r
/* The period between executions of the check task. */\r
-#define mainNO_ERROR_TOGGLE_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_TOGGLE_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_TOGGLE_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_TOGGLE_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED toggled by the check task. */\r
#define mainLED_0 P7_bit.no6\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime;\r
+TickType_t xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime;\r
\r
/* Ensure the parameter was passed in as expected. This is just a test of\r
the kernel port, the parameter is not actually used for anything. The\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
- #define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+ #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#define mainCHECK_PARAMETER ( ( void * ) 0x12345678 )\r
\r
/* The period between executions of the check task. */\r
-#define mainNO_ERROR_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* There are no spare LEDs for the comtest tasks, so this is just set to an\r
invalid number. */\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_DELAY, xLastWakeTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_DELAY, xLastWakeTime;\r
unsigned portBASE_TYPE uxLEDToUse = 0;\r
\r
/* Ensure parameter is passed in correctly. */\r
#define serLSB ( 0x10 )\r
\r
/* Misc. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdPASS;\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) SYS_CLK_FREQ ) \r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( 1024 )\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD;\r
+TickType_t xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD;\r
unsigned long ulLastRegTest1 = 0UL, ulLastRegTest2 = 0UL;\r
const char * pcMessage;\r
\r
#include "Serial.h"\r
/*---------------------------------------------------------------------------*/\r
\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
/*---------------------------------------------------------------------------*/\r
\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
alt_u32 uartControl;\r
/*---------------------------------------------------------------------------*/\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE lReturn = pdPASS;\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) \r
#define configMAX_TASK_NAME_LEN ( 16 )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 1\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) /* This can be made smaller if required. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) \r
#define configMAX_TASK_NAME_LEN ( 16 )\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xExpectedWakeTime;\r
-const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS;\r
+TickType_t xExpectedWakeTime;\r
+const TickType_t xPrintRate = ( TickType_t ) 5000 / portTICK_PERIOD_MS;\r
const long lMaxAllowableTimeDifference = ( long ) 0;\r
-portTickType xWakeTime;\r
+TickType_t xWakeTime;\r
long lTimeDifference;\r
const char *pcReceivedMessage;\r
const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n";\r
unsigned char ucInterruptEnableMast;\r
\r
/* Read/Write buffers. */\r
- xQueueHandle xRxedChars; \r
- xQueueHandle xCharsForTx;\r
+ QueueHandle_t xRxedChars; \r
+ QueueHandle_t xCharsForTx;\r
\r
/* This lot are set up to minimise CPU time where accessing the comm\r
* port's registers.\r
\r
/* This semaphore does nothing useful except test a feature of the\r
scheduler. */\r
- xSemaphoreHandle xTestSem;\r
+ SemaphoreHandle_t xTestSem;\r
\r
} xComPort;\r
\r
/* These prototypes are repeated here so we don't have to include the serial header. This allows\r
the xComPortHandle structure details to be private to this file. */\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime );\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime );\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime );\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime );\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );\r
\r
static void prvSetupPortHardware( xComPort *pxPort, eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer, note that this routine is only \r
called having checked that the is (at least) one to get */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime )\r
{\r
if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
{\r
void vSerialPutString( xComPortHandle pxPort, const char * const pcString, unsigned short usStringLength )\r
{\r
char * pcNextChar;\r
-const portTickType xNoBlock = ( portTickType ) 0;\r
+const TickType_t xNoBlock = ( TickType_t ) 0;\r
\r
/* Stop warnings. */\r
( void ) usStringLength;\r
\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort )\r
{\r
-const portTickType xBlockTime = ( portTickType ) 0xffff;\r
+const TickType_t xBlockTime = ( TickType_t ) 0xffff;\r
\r
/* This function does nothing interesting, but test the \r
semaphore from ISR mechanism. */\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( 105 )\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
/* Scheduler include files. */\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
priority. */\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 9600 )\r
\r
/*\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
portBASE_TYPE xErrorOccurred;\r
\r
/* Cycle for ever, delaying then checking all the other tasks are still\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
/* Scheduler include files. */\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 9600 )\r
\r
/*\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
/* Scheduler include files. */\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS )\r
\r
/* The period for which mainRESET_LED remain on every reset. */\r
-#define mainRESET_LED_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainRESET_LED_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED that is toggled whenever a character is transmitted.\r
mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
volatile unsigned long ulDummy = 3UL;\r
\r
/* Toggle the LED so we can see when a reset occurs. */\r
\r
Changes from V2.0.0\r
\r
- + Use portTickType in place of unsigned pdLONG for delay periods.\r
+ + Use TickType_t in place of unsigned pdLONG for delay periods.\r
+ cQueueReieveFromISR() used in place of xQueueReceive() in ISR.\r
*/\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues to interface between comms API and interrupt routines. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Return false if after the block time there is no room on the Tx queue. */\r
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != pdPASS )\r
#include <FreeRTOS.h>\r
#include <task.h>\r
\r
-#define mainBLINK_LED_INTERVAL ( ( portTickType ) 100 / ( portTICK_RATE_MS ) )\r
+#define mainBLINK_LED_INTERVAL ( ( TickType_t ) 100 / ( portTICK_PERIOD_MS ) )\r
\r
/* The LED that is flashed by the B0 task. */\r
#define mainBLINK_LED0_PORT LATD\r
unsigned char *port;\r
unsigned char *tris;\r
unsigned char pin;\r
- portTickType interval;\r
+ TickType_t interval;\r
} SBLINK;\r
\r
const SBLINK sled0 = {&mainBLINK_LED0_PORT, &mainBLINK_LED0_TRIS, mainBLINK_LED0_PIN, mainBLINK_LED0_INTERVAL};\r
unsigned char *Port = ((SBLINK *)pvParameters)->port;\r
unsigned char *Tris = ((SBLINK *)pvParameters)->tris;\r
unsigned char Pin = ((SBLINK *)pvParameters)->pin;\r
- portTickType Interval = ((SBLINK *)pvParameters)->interval;\r
+ TickType_t Interval = ((SBLINK *)pvParameters)->interval;\r
\r
- portTickType xLastWakeTime;\r
+ TickType_t xLastWakeTime;\r
\r
/*\r
* Initialize the hardware\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 57600 )\r
\r
/*\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xLastCheckTime;\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xLastCheckTime;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 57600 )\r
\r
/*\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
- portTickType xLastCheckTime;\r
- portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+ TickType_t xLastCheckTime;\r
+ TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 57600 )\r
\r
/*\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
- portTickType xLastCheckTime;\r
- portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+ TickType_t xLastCheckTime;\r
+ TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 57600 )\r
\r
/*\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xLastCheckTime;\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xLastCheckTime;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xLastCheckTime;\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xLastCheckTime;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/* The period between executions of the check task before and after an error\r
has been discovered. If an error has been discovered the check task runs\r
more frequently - increasing the LED flash rate. */\r
-#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )\r
\r
/* Priority definitions for some of the tasks. Other tasks just use the idle\r
/* Constants required for the communications. Only one character is ever\r
transmitted. */\r
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )\r
-#define mainNO_BLOCK ( ( portTickType ) 0 )\r
+#define mainNO_BLOCK ( ( TickType_t ) 0 )\r
#define mainBAUD_RATE ( ( unsigned long ) 57600 )\r
\r
/*\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xLastCheckTime;\r
-portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
+TickType_t xLastCheckTime;\r
+TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
char cErrorOccurred;\r
\r
/* We need to initialise xLastCheckTime prior to the first call to\r
/*\r
* Queue to interface between comms API and interrupt routine.\r
*/\r
- extern xQueueHandle xRxedChars;\r
+ extern QueueHandle_t xRxedChars;\r
\r
/*\r
* Because we are not allowed to use local variables here,\r
/*\r
* Queue to interface between comms API and interrupt routine.\r
*/\r
- extern xQueueHandle xCharsForTx;\r
+ extern QueueHandle_t xCharsForTx;\r
\r
/*\r
* Because we are not allowed to use local variables here,\r
/*-----------------------------------------------------------*/\r
\r
/* Queues to interface between comms API and interrupt routines. */\r
-xQueueHandle xRxedChars; \r
-xQueueHandle xCharsForTx;\r
+QueueHandle_t xRxedChars; \r
+QueueHandle_t xCharsForTx;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime )\r
{\r
/* Return false if after the block time there is no room on the Tx queue. */\r
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != ( char ) pdPASS )\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 16000000 ) /* Fosc / 2 */\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( 115 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
-xQueueHandle xStartLCDTask( void )\r
+QueueHandle_t xStartLCDTask( void )\r
{\r
/* Create the queue used by the LCD task. Messages for display on the LCD\r
are received via this queue. */\r
\r
/* Create the task that will control the LCD. Returned is a handle to the queue\r
on which messages to get written to the LCD should be written. */\r
-xQueueHandle xStartLCDTask( void );\r
+QueueHandle_t xStartLCDTask( void );\r
\r
typedef struct\r
{\r
/* The minimum amount of time the message should remain on the LCD without\r
being overwritten. */\r
- portTickType xMinDisplayTime;\r
+ TickType_t xMinDisplayTime;\r
\r
/* A pointer to the string to be displayed. */\r
char *pcMessage;\r
#define mainCHECK_TAKS_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )\r
\r
/* The execution period of the check task. */\r
-#define mainCHECK_TASK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_TASK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_COROUTINES ( 5 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
/* Used to wake the task at the correct frequency. */\r
-portTickType xLastExecutionTime; \r
+TickType_t xLastExecutionTime; \r
\r
/* The maximum jitter time measured by the fast interrupt test. */\r
extern unsigned short usMaxJitter ;\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
static portBASE_TYPE xTxHasEnded;\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( 80000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( 40000000UL )\r
#define configMAX_PRIORITIES ( 5UL )\r
\r
/* Brief delay to permit the LCD to catch up with commands. */\r
#define lcdVERY_SHORT_DELAY ( 1 )\r
-#define lcdSHORT_DELAY ( 8 / portTICK_RATE_MS )\r
-#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS )\r
+#define lcdSHORT_DELAY ( 8 / portTICK_PERIOD_MS )\r
+#define lcdLONG_DELAY ( 15 / portTICK_PERIOD_MS )\r
\r
/* LCD specific definitions. */\r
#define LCD_CLEAR_DISPLAY_CMD 0x01\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
/* LCD access functions. */\r
static void prvLCDCommand( char cCommand );\r
\r
/*-----------------------------------------------------------*/\r
\r
-xQueueHandle xStartLCDTask( void )\r
+QueueHandle_t xStartLCDTask( void )\r
{\r
/* Create the queue used by the LCD task. Messages for display on the LCD\r
are received via this queue. */\r
\r
/* Create the task that will control the LCD. Returned is a handle to the queue\r
on which messages to get written to the LCD should be written. */\r
-xQueueHandle xStartLCDTask( void );\r
+QueueHandle_t xStartLCDTask( void );\r
\r
typedef struct\r
{\r
/* The minimum amount of time the message should remain on the LCD without\r
being overwritten. */\r
- portTickType xMinDisplayTime;\r
+ TickType_t xMinDisplayTime;\r
\r
/* A pointer to the string to be displayed. */\r
char *pcMessage;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
#define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL )\r
\r
/* The period of the blinky software timer. The period is specified in ms and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS )\r
\r
/* The LED used by the communicating tasks and the blinky timer respectively. */\r
#define mainTASKS_LED ( 0 )\r
* The callback function for the blinky software timer, as described at the top\r
* of this file.\r
*/\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the simply blinky style application if\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_blinky( void )\r
{\r
-xTimerHandle xTimer;\r
+TimerHandle_t xTimer;\r
\r
/* Create the queue. */\r
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the task parameter is as expected. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
{\r
/* This function is called when the blinky software time expires. All the\r
function does is toggle the LED. LED mainTIMER_LED should therefore toggle\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The priorities of the various demo application tasks. */\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* It is important to ensure the high frequency timer test does not start before\r
* executing. A one-shot timer is used, so the callback function will only\r
* execute once (unless it is manually reset/restarted).\r
*/\r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer );\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer );\r
\r
/*\r
* Tasks that test the context switch mechanism by filling the processor\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on\r
each iteration of their function. This is used to detect either task stopping\r
*/\r
int main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* Create the LCD task - this returns the queue to use when writing\r
messages to the LCD. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
\r
/* The count of the high frequency timer interrupts. */\r
extern unsigned long ulHighFrequencyTimerInterrupts;\r
-static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };\r
+static xLCDMessage xMessage = { ( 200 / portTICK_PERIOD_MS ), cStringBuffer };\r
\r
/* Check that the register test 1 task is still running. */\r
if( ulLastRegTest1Value == ulRegTest1Cycles )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer )\r
{\r
/* Setup the high frequency, high priority, timer test. It is setup in this\r
software timer callback to ensure it does not start before the kernel does.\r
#define serSET_FLAG ( 1 )\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Flag used to indicate the tx status. */\r
static volatile portBASE_TYPE xTxHasEnded;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_QUEUE_SETS 1\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 1\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( 200000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( 40000000UL )\r
#define configMAX_PRIORITIES ( 5UL )\r
\r
/* The semaphore given by the T5 interrupt to unblock the task implemented by\r
the prvISRTriggeredTask() function. */\r
-static xSemaphoreHandle xBlockSemaphore = NULL;\r
+static SemaphoreHandle_t xBlockSemaphore = NULL;\r
/*-----------------------------------------------------------*/\r
\r
void vStartISRTriggeredTask( void )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
#define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL )\r
\r
/* The period of the blinky software timer. The period is specified in ms and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS )\r
\r
/* The LED used by the communicating tasks and the blinky timer respectively. */\r
#define mainTASKS_LED ( 0 )\r
* The callback function for the blinky software timer, as described at the top\r
* of this file.\r
*/\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Called by main() to create the simply blinky style application if\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
void main_blinky( void )\r
{\r
-xTimerHandle xTimer;\r
+TimerHandle_t xTimer;\r
\r
/* Create the queue. */\r
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove compiler warnigns in the case that configASSERT() is not dfined. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Avoid compiler warnings. */\r
( void ) xTimer;\r
\r
/* The period after which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* The priorities of the various demo application tasks. */\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* It is important to ensure the high frequency timer test does not start before\r
* executing. A one-shot timer is used, so the callback function will only\r
* execute once (unless it is manually reset/restarted).\r
*/\r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer );\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer );\r
\r
/*\r
* Tasks that test the context switch mechanism by filling the processor\r
*/\r
int main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* Create all the other standard demo tasks. */\r
vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulLastHighFrequencyTimerInterrupts = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer )\r
{\r
void vSetupTimerTest( unsigned short usFrequencyHz );\r
\r
#define configUSE_TICK_HOOK 0\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
void vStartFlopRegTests( void )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
\r
/* Fill the arrays into which the flop registers are to be saved with \r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
portBASE_TYPE x, y;\r
\r
/* Place known values into the buffers into which the flop registers are \r
the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
error has been found at any time then the toggle rate will increase to \r
mainERROR_CHECK_DELAY milliseconds. */\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
\r
/* \r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxFreeStack;\r
\r
/* Just to remove compiler warning. */\r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
+volatile TaskHandle_t xTaskIn = xTask;\r
volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Structure that maintains information on the UART being used. */\r
static XUartLite xUART;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
#define configUSE_TICK_HOOK 0\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
void vStartFlopRegTests( void )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
\r
/* Fill the arrays into which the flop registers are to be saved with \r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
portBASE_TYPE x, y;\r
\r
/* Place known values into the buffers into which the flop registers are \r
the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
error has been found at any time then the toggle rate will increase to \r
mainERROR_CHECK_DELAY milliseconds. */\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
\r
/* \r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxFreeStack;\r
\r
/* Just to remove compiler warning. */\r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
+volatile TaskHandle_t xTaskIn = xTask;\r
volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Structure that maintains information on the UART being used. */\r
static XUartLite xUART;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
#define configUSE_TICK_HOOK 0\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
void vStartFlopRegTests( void )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
unsigned portBASE_TYPE x, y;\r
portDOUBLE z = flopSTART_VALUE;\r
\r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
portBASE_TYPE x, y;\r
\r
/* Place known values into the buffers into which the flop registers are \r
the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
error has been found at any time then the toggle rate will increase to \r
mainERROR_CHECK_DELAY milliseconds. */\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
\r
/* \r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxFreeStack;\r
\r
/* Just to remove compiler warning. */\r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
+volatile TaskHandle_t xTaskIn = xTask;\r
volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Structure that maintains information on the UART being used. */\r
static XUartLite xUART;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
#define configUSE_TICK_HOOK 0\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
void vStartFlopRegTests( void )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
\r
/* Fill the arrays into which the flop registers are to be saved with \r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
portBASE_TYPE x, y;\r
\r
/* Place known values into the buffers into which the flop registers are \r
the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
error has been found at any time then the toggle rate will increase to \r
mainERROR_CHECK_DELAY milliseconds. */\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
\r
/* \r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxFreeStack;\r
\r
/* Just to remove compiler warning. */\r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
+volatile TaskHandle_t xTaskIn = xTask;\r
volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Structure that maintains information on the UART being used. */\r
static XUartLite xUART;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
#define configUSE_TICK_HOOK 0\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */\r
-#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configTICK_RATE_HZ ( (TickType_t) 1000 )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
#define configMAX_TASK_NAME_LEN ( 20 )\r
\r
void vStartFlopRegTests( void )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
\r
/* Fill the arrays into which the flop registers are to be saved with \r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xTaskJustCreated;\r
+TaskHandle_t xTaskJustCreated;\r
portBASE_TYPE x, y;\r
\r
/* Place known values into the buffers into which the flop registers are \r
the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
error has been found at any time then the toggle rate will increase to \r
mainERROR_CHECK_DELAY milliseconds. */\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
\r
/* \r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxFreeStack;\r
\r
/* Just to remove compiler warning. */\r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
+volatile TaskHandle_t xTaskIn = xTask;\r
volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
/* Structure that maintains information on the UART being used. */\r
static XUartLite xUART;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
<option id="com.renesas.cdt.core.Compiler.option.includeSymbolTable.318290481" name="Include Symbol Table(s)" superClass="com.renesas.cdt.core.Compiler.option.includeSymbolTable" value="true" valueType="boolean"/>\r
<option id="com.renesas.cdt.core.Compiler.option.misc26.759636132" name="Ignore 'inline' keyword(-fno-inline)" superClass="com.renesas.cdt.core.Compiler.option.misc26" value="false" valueType="boolean"/>\r
<option id="com.renesas.cdt.core.Compiler.option.misc48.181042602" name="List macro definitions but omit arguments and contents(-dN)" superClass="com.renesas.cdt.core.Compiler.option.misc48" value="false" valueType="boolean"/>\r
- <option id="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions.2146764026" name="User defined options" superClass="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions" valueType="stringList"/>\r
+ <option id="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions.2146764026" name="User defined options" superClass="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions"/>\r
<option id="com.renesas.cdt.core.Compiler.option.misc2.1429263328" name="Don't search standard system directories for header files(-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
<inputType id="%Base.Compiler.C.InputType.Id.1290374987" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>\r
<inputType id="Base.Compiler.CPP.InputType.Id.1815429899" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>\r
<listOptionValue builtIn="false" value="RSKRL78G1C"/>\r
</option>\r
<option id="com.renesas.cdt.core.Compiler.option.includeSymbolTable.992185200" name="Include Symbol Table(s)" superClass="com.renesas.cdt.core.Compiler.option.includeSymbolTable" value="true" valueType="boolean"/>\r
- <option id="com.renesas.cdt.core.Compiler.option.misc2.23981720" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
+ <option id="com.renesas.cdt.core.Compiler.option.misc2.23981720" name="Don't search standard system directories for header files(-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
<inputType id="%Base.Compiler.C.InputType.Id.1356266742" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>\r
<inputType id="Base.Compiler.CPP.InputType.Id.1207636487" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>\r
</tool>\r
<listOptionValue builtIn="false" value="RSKRL78L13"/>\r
</option>\r
<option id="com.renesas.cdt.core.Compiler.option.includeSymbolTable.1827952485" name="Include Symbol Table(s)" superClass="com.renesas.cdt.core.Compiler.option.includeSymbolTable" value="true" valueType="boolean"/>\r
- <option id="com.renesas.cdt.core.Compiler.option.misc2.1309529749" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
+ <option id="com.renesas.cdt.core.Compiler.option.misc2.1309529749" name="Don't search standard system directories for header files(-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
+ <option id="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions.1713741321" name="User defined options" superClass="com.renesas.cdt.rl78.HardwareDebug.Compiler.option.userDefinedOptions" valueType="stringList"/>\r
<inputType id="%Base.Compiler.C.InputType.Id.1471081059" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>\r
<inputType id="Base.Compiler.CPP.InputType.Id.1237074300" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>\r
</tool>\r
<listOptionValue builtIn="false" value="RL78_G1A_TB"/>\r
</option>\r
<option id="com.renesas.cdt.core.Compiler.option.includeSymbolTable.702595527" name="Include Symbol Table(s)" superClass="com.renesas.cdt.core.Compiler.option.includeSymbolTable" value="true" valueType="boolean"/>\r
- <option id="com.renesas.cdt.core.Compiler.option.misc2.713693207" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
+ <option id="com.renesas.cdt.core.Compiler.option.misc2.713693207" name="Don't search standard system directories for header files(-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>\r
<inputType id="%Base.Compiler.C.InputType.Id.1185371592" name="C Input" superClass="%Base.Compiler.C.InputType.Id"/>\r
<inputType id="Base.Compiler.CPP.InputType.Id.763886474" name="C++ Input" superClass="Base.Compiler.CPP.InputType.Id"/>\r
</tool>\r
GCC_STRING=4.8-GNURL78_v13.02
VERSION_IDE=3.06.02.004
E2STUDIO_VERSION=2.2.0.13
-ACTIVE_CONFIGURATION=RSKRL78L13
+ACTIVE_CONFIGURATION=RSKRL78G1C
<stringAttribute key="com.renesas.cdt.core.initCommands" value=""/>\r
<stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/>\r
<stringAttribute key="com.renesas.cdt.core.jtagDevice" value="E1 (RL78)"/>\r
+<stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rl78.e1"/>\r
<booleanAttribute key="com.renesas.cdt.core.loadImage" value="true"/>\r
<stringAttribute key="com.renesas.cdt.core.optionInitCommands" value=""/>\r
<intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/>\r
<stringAttribute key="com.renesas.cdt.core.runCommands" value=""/>\r
-<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E1 -l 0 -t R5F10JGC -p 61234 -d 61236 -umFreq= 0 -usFreq= 0 -umClock= 1 -w 0 -usupplyVoltage= 1 -ucommMethod= 0 -usecurityID= 00000000000000000000 -upermitFlash= 1 -uuseWideVoltageMode= 1 -ueraseRom= 1 -uuseOnChipDebug= 0 -uuseUserOptionByte= 0 -ustopTimerEmu= 0 -ustopSerialEmu= 0 -umaskInternalResetSignal= 0 -umaskTargetResetSignal= 0 -n 0 -uverifyOnWritingMemory= 1"/>\r
+<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E1 -l 0 -t R5F10JGC -p 61234 -d 61236 -umFreq= 0 -usFreq= 0 -umClock= 1 -w 0 -usupplyVoltage= 1 -ucommMethod= 0 -usecurityID= 00000000000000000000 -upermitFlash= 1 -uuseWideVoltageMode= 1 -ueraseRom= 1 -uuseOnChipDebug= 0 -uuseUserOptionByte= 0 -ustopTimerEmu= 0 -ustopSerialEmu= 0 -umaskInternalResetSignal= 0 -umaskTargetResetSignal= 0 -n 0 -uverifyOnWritingMemory= 1 -uTraceCapture= 0"/>\r
<booleanAttribute key="com.renesas.cdt.core.setResume" value="true"/>\r
<booleanAttribute key="com.renesas.cdt.core.setStopAt" value="true"/>\r
<booleanAttribute key="com.renesas.cdt.core.startServer" value="true"/>\r
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R5F10JGC"/>\r
<booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/>\r
<booleanAttribute key="com.renesas.cdt.core.verboseMode" value="false"/>\r
+<stringAttribute key="com.renesas.cdt.debug.realtimemanager.memory.mruRanges" value=""/>\r
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${eclipse_home}..\internal\IoFiles\RL78\R5F10JGC.sfrx"/>\r
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>\r
+<stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/>\r
+<stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${eclipse_home}../DebugComp/e2-server-gdb.exe"/>\r
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.clock.source.internal" value="false"/>\r
<intAttribute key="com.renesas.hardwaredebug.e1.clock_source" value="0"/>\r
<stringAttribute key="com.renesas.hardwaredebug.e1.connection.mode" value="0"/>\r
<booleanAttribute key="com.renesas.hardwaredebug.e1rl78.stopTimerEmu" value="false"/>\r
<stringAttribute key="com.renesas.hardwaredebug.e1rl78.sub.clock.freq" value="0"/>\r
<stringAttribute key="com.renesas.hardwaredebug.e1rl78.supply.voltage" value="1"/>\r
+<booleanAttribute key="com.renesas.hardwaredebug.e1rl78.traceEnable" value="false"/>\r
<booleanAttribute key="com.renesas.hardwaredebug.e1rl78.use.wide.voltage.mode" value="true"/>\r
<booleanAttribute key="com.renesas.hardwaredebug.e1rl78.verify.on.writing.to.memory" value="true"/>\r
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>\r
<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/>\r
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>\r
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>\r
+<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>\r
</launchConfiguration>\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned long.\r
+ TickType_t rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
\r
#define pollqSTACK_SIZE configMINIMAL_STACK_SIZE\r
#define pollqQUEUE_SIZE ( 10 )\r
-#define pollqPRODUCER_DELAY ( ( portTickType ) 200 / portTICK_RATE_MS )\r
-#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( portTickType ) ( 20 / portTICK_RATE_MS ) )\r
-#define pollqNO_DELAY ( ( portTickType ) 0 )\r
+#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS )\r
+#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) )\r
+#define pollqNO_DELAY ( ( TickType_t ) 0 )\r
#define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 )\r
#define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 )\r
\r
\r
void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-static xQueueHandle xPolledQueue;\r
+static QueueHandle_t xPolledQueue;\r
\r
/* Create the queue used by the producer and consumer. */\r
xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
vQueueAddToRegistry( xPolledQueue, ( signed char * ) "Poll_Test_Queue" );\r
\r
/* Spawn the producer and consumer. */\r
- xTaskCreate( vPolledQueueConsumer, ( signed char * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
- xTaskCreate( vPolledQueueProducer, ( signed char * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );\r
+ xTaskCreate( vPolledQueueConsumer, ( signed char * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
+ xTaskCreate( vPolledQueueProducer, ( signed char * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ )\r
{\r
/* Send an incrementing number on the queue without blocking. */\r
- if( xQueueSend( *( ( xQueueHandle * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
+ if( xQueueSend( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS )\r
{\r
/* We should never find the queue full so if we get here there\r
has been an error. */\r
for( ;; )\r
{ \r
/* Loop until the queue is empty. */\r
- while( uxQueueMessagesWaiting( *( ( xQueueHandle * ) pvParameters ) ) )\r
+ while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) )\r
{\r
- if( xQueueReceive( *( ( xQueueHandle * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
+ if( xQueueReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS )\r
{\r
if( usData != usExpectedValue )\r
{\r
\r
/* Task behaviour. */\r
#define bktQUEUE_LENGTH ( 5 )\r
-#define bktSHORT_WAIT ( ( ( portTickType ) 20 ) / portTICK_RATE_MS )\r
+#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS )\r
#define bktPRIMARY_BLOCK_TIME ( 10 )\r
#define bktALLOWABLE_MARGIN ( 15 )\r
#define bktTIME_TO_BLOCK ( 175 )\r
-#define bktDONT_BLOCK ( ( portTickType ) 0 )\r
+#define bktDONT_BLOCK ( ( TickType_t ) 0 )\r
#define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 )\r
\r
/* The queue on which the tasks block. */\r
-static xQueueHandle xTestQueue;\r
+static QueueHandle_t xTestQueue;\r
\r
/* Handle to the secondary task is required by the primary task for calls\r
to vTaskSuspend/Resume(). */\r
-static xTaskHandle xSecondary;\r
+static TaskHandle_t xSecondary;\r
\r
/* Used to ensure that tasks are still executing without error. */\r
static volatile portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0;\r
static void vPrimaryBlockTimeTestTask( void *pvParameters )\r
{\r
portBASE_TYPE xItem, xData;\r
-portTickType xTimeWhenBlocking;\r
-portTickType xTimeToBlock, xBlockedTime;\r
+TickType_t xTimeWhenBlocking;\r
+TickType_t xTimeToBlock, xBlockedTime;\r
\r
( void ) pvParameters;\r
\r
\r
static void vSecondaryBlockTimeTestTask( void *pvParameters )\r
{\r
-portTickType xTimeWhenBlocking, xBlockedTime;\r
+TickType_t xTimeWhenBlocking, xBlockedTime;\r
portBASE_TYPE xData;\r
\r
( void ) pvParameters;\r
\r
/* Demo task specific constants. */\r
#define priSTACK_SIZE ( configMINIMAL_STACK_SIZE )\r
-#define priSLEEP_TIME ( ( portTickType ) 128 / portTICK_RATE_MS )\r
+#define priSLEEP_TIME ( ( TickType_t ) 128 / portTICK_PERIOD_MS )\r
#define priLOOPS ( 5 )\r
#define priMAX_COUNT ( ( unsigned long ) 0xff )\r
-#define priNO_BLOCK ( ( portTickType ) 0 )\r
+#define priNO_BLOCK ( ( TickType_t ) 0 )\r
#define priSUSPENDED_QUEUE_LENGTH ( 1 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Handles to the two counter tasks. These could be passed in as parameters\r
to the controller task to prevent them having to be file scope. */\r
-static xTaskHandle xContinousIncrementHandle, xLimitedIncrementHandle;\r
+static TaskHandle_t xContinousIncrementHandle, xLimitedIncrementHandle;\r
\r
/* The shared counter variable. This is passed in as a parameter to the two\r
counter variables for demonstration purposes. */\r
static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE;\r
\r
/* Queue used by the second test. */\r
-static xQueueHandle xSuspendedTestQueue;\r
+static QueueHandle_t xSuspendedTestQueue;\r
\r
/*-----------------------------------------------------------*/\r
/*\r
\r
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
or 0 to run the more comprehensive test and demo application. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0\r
\r
/*-----------------------------------------------------------*/\r
\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/* This variable is not actually used, but provided to allow an example of how\r
to write an ISR to be included in this file. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
/*-----------------------------------------------------------*/\r
\r
int main( void )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
/*\r
- FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+ All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
\r
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
- Integrity Systems, who sell the code with commercial support,\r
- indemnification and middleware, under the OpenRTOS brand.\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
\r
http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/******************************************************************************\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
the queue empty. */\r
#define mainQUEUE_LENGTH ( 1 )\r
\r
-\r
+/* Used to check the task parameter passing in both supported memory models. */\r
+#define mainQUEUE_SEND_PARAMETER ( ( void * ) 0x1234U )\r
+#define mainQUEUE_RECEIVE_PARAMETER ( ( void * ) 0x1122U )\r
/*-----------------------------------------------------------*/\r
\r
/*\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
/* Start the two tasks as described in the comments at the top of this\r
file. */\r
- xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */\r
- ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
- configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */\r
- NULL, /* The parameter passed to the task - not used in this case. */\r
- mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */\r
- NULL ); /* The task handle is not required, so NULL is passed. */\r
+ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */\r
+ "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
+ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */\r
+ mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just used to check the port in this case. */\r
+ mainQUEUE_RECEIVE_TASK_PRIORITY,/* The priority assigned to the task. */\r
+ NULL ); /* The task handle is not required, so NULL is passed. */\r
\r
- xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+ xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
\r
/* Start the tasks and timer running. */\r
vTaskStartScheduler();\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
- /* Remove compiler warning about unused parameter. */\r
- ( void ) pvParameters;\r
+ /* Check the parameter was passed in correctly. */\r
+ configASSERT( pvParameters == mainQUEUE_SEND_PARAMETER )\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
xNextWakeTime = xTaskGetTickCount();\r
unsigned long ulReceivedValue;\r
const unsigned long ulExpectedValue = 100UL;\r
\r
- /* Remove compiler warning about unused parameter. */\r
- ( void ) pvParameters;\r
+ /* Check the parameter was passed in correctly. */\r
+ configASSERT( pvParameters == mainQUEUE_RECEIVE_PARAMETER )\r
\r
for( ;; )\r
{\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks, the check tasks, or the demo timer.\r
-ms are converted to the equivalent in ticks using the portTICK_RATE_MS\r
+ms are converted to the equivalent in ticks using the portTICK_PERIOD_MS\r
constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* These two definitions are used to set the period of the demo timer. The demo\r
timer period is always relative to the check timer period, so the check timer\r
/*\r
* The 'check' timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The 'demo' timer callback function, as described at the top of this file.\r
*/\r
-static void prvDemoTimerCallback( xTimerHandle xTimer );\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Functions that define the RegTest tasks, as described at the top of this\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */\r
-static xTimerHandle xDemoTimer = NULL;\r
+static TimerHandle_t xDemoTimer = NULL;\r
\r
/* This variable is incremented each time the demo timer expires. */\r
static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDemoTimerCallback( xTimerHandle xTimer )\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Remove compiler warning about unused parameter. */\r
( void ) xTimer;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS;\r
static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks, the check tasks, or the demo timer.\r
-ms are converted to the equivalent in ticks using the portTICK_RATE_MS\r
+ms are converted to the equivalent in ticks using the portTICK_PERIOD_MS\r
constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* These two definitions are used to set the period of the demo timer. The demo\r
timer period is always relative to the check timer period, so the check timer\r
/*\r
* The 'check' timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The 'demo' timer callback function, as described at the top of this file.\r
*/\r
-static void prvDemoTimerCallback( xTimerHandle xTimer );\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* This function is called from the C startup routine to setup the processor -\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */\r
-static xTimerHandle xDemoTimer = NULL;\r
+static TimerHandle_t xDemoTimer = NULL;\r
\r
/* This variable is incremented each time the demo timer expires. */\r
static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDemoTimerCallback( xTimerHandle xTimer )\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The demo timer has expired. All it does is increment a variable. The\r
period of the demo timer is relative to that of the check timer, so the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* This variable is not actually used, but provided to allow an example of how\r
to write an ISR to be included in this file. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/* RL78 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
enabled. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Check the parameter was passed in correctly. */\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks, the check tasks, or the demo timer.\r
-ms are converted to the equivalent in ticks using the portTICK_RATE_MS\r
+ms are converted to the equivalent in ticks using the portTICK_PERIOD_MS\r
constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* These two definitions are used to set the period of the demo timer. The demo\r
timer period is always relative to the check timer period, so the check timer\r
/*\r
* The 'check' timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* The 'demo' timer callback function, as described at the top of this file.\r
*/\r
-static void prvDemoTimerCallback( xTimerHandle xTimer );\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Functions that define the RegTest tasks, as described at the top of this\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */\r
-static xTimerHandle xDemoTimer = NULL;\r
+static TimerHandle_t xDemoTimer = NULL;\r
\r
/* This variable is incremented each time the demo timer expires. */\r
static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvDemoTimerCallback( xTimerHandle xTimer )\r
+static void prvDemoTimerCallback( TimerHandle_t xTimer )\r
{\r
/* Remove compiler warning about unused parameter. */\r
( void ) xTimer;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS;\r
static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_HZ ) /* Set in mcu_info.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLKB_HZ ) /* Set in muc_info.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 9 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "Don't Block". */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
/*-----------------------------------------------------------*/\r
\r
/* The queue to pass data from the Tx task to the Rx task. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The semaphore that is 'given' by interrupts generated from button pushes. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xDelay;\r
+TickType_t xDelay;\r
const unsigned long ulValueToSend = mainQUEUED_VALUE;\r
\r
/* Remove compiler warning about unused parameter. */\r
{\r
/* The delay period between successive sends to the queue is set by\r
the potentiometer reading. */\r
- xDelay = ( portTickType ) prvReadPOT();\r
+ xDelay = ( TickType_t ) prvReadPOT();\r
\r
/* If the block time is greater than 3000 milliseconds then block\r
indefinitely waiting for a button push. */\r
else\r
{\r
/* Convert a time in milliseconds to a time in ticks. */\r
- xDelay /= portTICK_RATE_MS;\r
+ xDelay /= portTICK_PERIOD_MS;\r
\r
/* Place this task in the blocked state until it is time to run\r
again. As this is not an indefinite sleep the kernel will place\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_HZ ) /* Set in mcu_info.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLKB_HZ ) /* Set in muc_info.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 9 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "Don't Block". */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
/*-----------------------------------------------------------*/\r
\r
/* The queue to pass data from the Tx task to the Rx task. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The semaphore that is 'given' by interrupts generated from button pushes. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xDelay;\r
+TickType_t xDelay;\r
const unsigned long ulValueToSend = mainQUEUED_VALUE;\r
\r
/* Remove compiler warning about unused parameter. */\r
{\r
/* The delay period between successive sends to the queue is set by\r
the potentiometer reading. */\r
- xDelay = ( portTickType ) prvReadPOT();\r
+ xDelay = ( TickType_t ) prvReadPOT();\r
\r
/* If the block time is greater than 3000 milliseconds then block\r
indefinitely waiting for a button push. */\r
else\r
{\r
/* Convert a time in milliseconds to a time in ticks. */\r
- xDelay /= portTICK_RATE_MS;\r
+ xDelay /= portTICK_PERIOD_MS;\r
\r
/* Place this task in the blocked state until it is time to run\r
again. As this is not an indefinite sleep the kernel will place\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_HZ ) /* Set in mcu_info.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLKB_HZ ) /* Set in muc_info.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 9 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "Don't Block". */\r
#define mainDONT_BLOCK ( 0UL )\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
/*-----------------------------------------------------------*/\r
\r
/* The queue to pass data from the Tx task to the Rx task. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* The semaphore that is 'given' by interrupts generated from button pushes. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xDelay;\r
+TickType_t xDelay;\r
const unsigned long ulValueToSend = mainQUEUED_VALUE;\r
\r
/* Remove compiler warning about unused parameter. */\r
{\r
/* The delay period between successive sends to the queue is set by\r
the potentiometer reading. */\r
- xDelay = ( portTickType ) prvReadPOT();\r
+ xDelay = ( TickType_t ) prvReadPOT();\r
\r
/* If the block time is greater than 3000 milliseconds then block\r
indefinitely waiting for a button push. */\r
else\r
{\r
/* Convert a time in milliseconds to a time in ticks. */\r
- xDelay /= portTICK_RATE_MS;\r
+ xDelay /= portTICK_PERIOD_MS;\r
\r
/* Place this task in the blocked state until it is time to run\r
again. As this is not an indefinite sleep the kernel will place\r
\r
/* Defines the minimum time that must pass between consecutive button presses\r
to accept a button press as a unique press rather than just a bounce. */\r
-#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_RATE_MS )\r
+#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_PERIOD_MS )\r
\r
/* Button interrupt handlers. */\r
#pragma interrupt ( prvIRQ1_Handler( vect = 65, enable ) )\r
* lcdMIN_TIME_BETWEEN_INTERRUPTS_MS milliseconds have passed since the button\r
* was last pushed (for debouncing). \r
*/\r
-static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand );\r
+static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand );\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to pass commands from the button interrupt handlers to the\r
prvLCDTaskLine2() task. */\r
-static xQueueHandle xButtonCommandQueue = NULL;\r
+static QueueHandle_t xButtonCommandQueue = NULL;\r
\r
/* The mutex used to ensure only one task writes to the display at any one\r
time. */\r
-static xSemaphoreHandle xLCDMutex = NULL;\r
+static SemaphoreHandle_t xLCDMutex = NULL;\r
\r
/* The string that is scrolled up and down the first line of the display. */\r
static const char cDataString1[] = " http://www.FreeRTOS.org ";\r
\r
for( ;; )\r
{\r
- vTaskDelay( pxLCDParamaters->Speed / portTICK_RATE_MS ); \r
+ vTaskDelay( pxLCDParamaters->Speed / portTICK_PERIOD_MS ); \r
\r
/* Write the string. */\r
prvDisplayNextString( pxLCDParamaters->Line, &( pxLCDParamaters->ptr_str[ usPosition ] ) );\r
struct _LCD_Params *pxLCDParamaters = ( struct _LCD_Params * ) pvParameters;\r
unsigned short usPosition = 0U;\r
unsigned char ucDirection = lcdRIGHT_TO_LEFT, ucStatus = lcdRUNNING, ucQueueData;\r
-portTickType xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );\r
+TickType_t xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );\r
\r
for(;;)\r
{\r
\r
if( ucStatus == lcdRUNNING )\r
{\r
- xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );\r
+ xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );\r
}\r
else\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand )\r
+static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portTickType xCurrentTickCount;\r
+TickType_t xCurrentTickCount;\r
\r
/* Check the time now for debouncing purposes. */\r
xCurrentTickCount = xTaskGetTickCountFromISR();\r
\r
static void prvIRQ1_Handler( void )\r
{\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
static const unsigned char ucCommand = lcdSHIFT_BACK_COMMAND;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
\r
static void prvIRQ3_Handler(void)\r
{\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
static const unsigned char ucCommand = lcdSTART_STOP_COMMAND;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
\r
static void prvIRQ4_Handler(void)\r
{\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
static const unsigned char ucCommand = lcdSHIFT_FORWARD_COMMAND;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx210def.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx210def.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full build \r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
FreeRTOSConfig.h, then this function will be called if a task overflows its \r
stack space. See \r
http://www.freertos.org/Stacks-and-stack-overflow-checking.html. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "Don't Block". */\r
#define mainDONT_BLOCK ( 0UL )\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
\r
/*\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Re-enabled interrupts. */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined\r
purely to allow the project to link as it is used by the full project. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
/* For outputing debug console messages - just maps to printf. */\r
#ifdef DEBUG_BUILD\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
__enable_interrupt();\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full project. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
/*\r
* vApplicationMallocFailedHook() will only be called if\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Has a Tx end occurred? */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
\r
/*\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Re-enabled interrupts. */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full project. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
/* For outputing debug console messages - just maps to printf. */\r
#ifdef DEBUG_BUILD\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
__enable_interrupt();\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full project. */\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check task as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check task as described at the top of\r
this file. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
/*\r
* vApplicationMallocFailedHook() will only be called if\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
static void prvCheckTask( void *pvParameters )\r
{\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
extern void vSetupHighFrequencyTimer( void );\r
\r
/* If this is being executed then the kernel has been started. Start the high\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Has a Tx end occurred? */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx630def.h. */\r
#define configPERIPHERAL_CLOCK_HZ ( PCLKB_FREQUENCY ) /* Set in rskrx630def.h. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
static void prvQueueSendTask( void *pvParameters );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full build \r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
FreeRTOSConfig.h, then this function will be called if a task overflows its \r
stack space. See \r
http://www.freertos.org/Stacks-and-stack-overflow-checking.html. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )\r
\r
/* The period at which the check timer will expire, in ms, if an error has been\r
reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simple means "Don't Block". */\r
#define mainDONT_BLOCK ( 0UL )\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;\r
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( 96000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( 48000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The period of the software timer, specified in milliseconds. */\r
-#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_RATE_MS )\r
+#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
/*\r
* The callback function used by the software timer.\r
*/\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full project. */\r
\r
void main(void)\r
{\r
-xTimerHandle xTimer;\r
+TimerHandle_t xTimer;\r
\r
/* Turn all LEDs off. */\r
vParTestInitialise();\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The software timer does nothing but toggle an LED. */\r
vParTestToggleLED( mainTIMER_LED );\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check timer as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check timer as described at the top of\r
this file. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Contains the implementation of the WEB server.\r
\r
void main(void)\r
{\r
-xTimerHandle xCheckTimer;\r
+TimerHandle_t xCheckTimer;\r
extern void HardwareSetup( void );\r
\r
/* Turn all LEDs off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1CycleCount = 0, ulLastRegTest2CycleCount = 0;\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Has a Tx end occurred? */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( 96000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( 48000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
\r
/* The rate at which data is sent to the queue, specified in milliseconds. */\r
-#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_RATE_MS )\r
+#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_PERIOD_MS )\r
\r
/* The period of the software timer, specified in milliseconds. */\r
-#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_RATE_MS )\r
+#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added so the send task should always find the\r
/*\r
* The callback function used by the software timer.\r
*/\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/* This variable is not used by this simple Blinky example. It is defined \r
purely to allow the project to link as it is used by the full project. */\r
\r
void main(void)\r
{\r
-xTimerHandle xTimer;\r
+TimerHandle_t xTimer;\r
\r
/* Turn all LEDs off. */\r
vParTestInitialise();\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Initialise xNextWakeTime - this only needs to be done once. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The software timer does nothing but toggle an LED. */\r
vParTestToggleLED( mainTIMER_LED );\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. Controlled by the check timer as described at the top of this\r
file. */\r
-#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. Controlled by the check timer as described at the top of\r
this file. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
* it is possible that the stack overflow will have corrupted these - in which\r
* case pxCurrentTCB can be inspected to find the same information.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
\r
/*\r
* The reg test tasks as described at the top of this file.\r
/*\r
* The check timer callback function, as described at the top of this file.\r
*/\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Contains the implementation of the WEB server.\r
\r
void main(void)\r
{\r
-xTimerHandle xCheckTimer;\r
+TimerHandle_t xCheckTimer;\r
extern void HardwareSetup( void );\r
\r
/* Turn all LEDs off. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
static unsigned long ulLastRegTest1CycleCount = 0, ulLastRegTest2CycleCount = 0;\r
\r
/* This function is explained by the comments above its prototype at the top\r
of this file. */\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
* The callback function that is assigned to both the periodic timer and the\r
* ARP timer.\r
*/\r
-static void prvUIPTimerCallback( xTimerHandle xTimer );\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer );\r
\r
/*\r
* Port functions required by the uIP stack.\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send TCP/IP events to the uIP stack. */\r
-xQueueHandle xEMACEventQueue = NULL;\r
+QueueHandle_t xEMACEventQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvInitialise_uIP( void )\r
{\r
-xTimerHandle xARPTimer, xPeriodicTimer;\r
+TimerHandle_t xARPTimer, xPeriodicTimer;\r
uip_ipaddr_t xIPAddr;\r
const unsigned long ul_uIPEventQueueLength = 10UL;\r
\r
\r
/* Create and start the uIP timers. */\r
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
- ( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
+ ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
xPeriodicTimer = xTimerCreate( "PeriodicTimer",\r
- ( 50 / portTICK_RATE_MS ),\r
+ ( 50 / portTICK_PERIOD_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
prvUIPTimerCallback\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvUIPTimerCallback( xTimerHandle xTimer )\r
+static void prvUIPTimerCallback( TimerHandle_t xTimer )\r
{\r
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;\r
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
{\r
/* Ensure the EtherC and EDMAC are enabled. */\r
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xQueueHandle xEMACEventQueue;\r
+extern QueueHandle_t xEMACEventQueue;\r
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
\r
/* Has a Tx end occurred? */\r
\r
do\r
{\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
reg = _phy_read(BASIC_MODE_CONTROL_REG);\r
count++;\r
} while (reg & 0x8000 && count < PHY_RESET_WAIT);\r
{\r
reg = _phy_read(BASIC_MODE_STATUS_REG);\r
count++;\r
- vTaskDelay( 100 / portTICK_RATE_MS );\r
+ vTaskDelay( 100 / portTICK_PERIOD_MS );\r
\r
/* Make sure we don't break out if reg just contains 0xffff. */\r
if( reg == 0xffff )\r
#define configUSE_TICK_HOOK 1 /* Must be set to one for the timer interrupt to be cleared. */\r
#define configCPU_CLOCK_HZ ( 200000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( 50000000UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 36 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 12 )\r
{\r
USHORT usData;\r
\r
- vTaskDelay( 2 / portTICK_RATE_MS );\r
+ vTaskDelay( 2 / portTICK_PERIOD_MS );\r
\r
/* Read the status of the PHY */\r
usData = phyReadReg(PHY_BASIC_MODE_CONTROL);\r
phyWriteReg(PHY_BASIC_MODE_CONTROL, PHY_AN_ENABLE);\r
\r
/* Auto negotiation will now take place wait for two seconds */\r
- vTaskDelay( 2000 / portTICK_RATE_MS );\r
+ vTaskDelay( 2000 / portTICK_PERIOD_MS );\r
\r
/* Success */\r
return 0;\r
\r
void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
{\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
\r
/* Create one of the floating point tasks... */\r
xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xCreatedTask );\r
\r
/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
without error. */\r
-#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )\r
\r
/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
by at least one task. */\r
-#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )\r
+#define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )\r
\r
/*\r
* vApplicationMallocFailedHook() will only be called if\r
*/\r
void main(void)\r
{\r
-xTaskHandle xCreatedTask;\r
+TaskHandle_t xCreatedTask;\r
\r
prvSetupHardware();\r
\r
\r
static void prvCheckTask( void *pvParameter )\r
{\r
-portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\r
\r
/* Just to remove compiler warning. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* Just to remove compiler warnings. This function will only actually\r
get called if configCHECK_FOR_STACK_OVERFLOW is set to a non zero value.\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
+#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
/*-----------------------------------------------------------*/\r
\r
/* The semaphore used by the ISR to wake the uIP task. */\r
-xSemaphoreHandle xEMACSemaphore = NULL;\r
+SemaphoreHandle_t xEMACSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
#include "net/uip.h"\r
\r
/* The time to wait between attempts to obtain a free buffer. */\r
-#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )\r
+#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )\r
\r
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving\r
up on attempting to obtain a free buffer all together. */\r
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )\r
\r
/* The time to wait for the Tx descriptor to become free. */\r
-#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )\r
+#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )\r
\r
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to\r
become free. */\r
EDMAC.EDMR.BIT.SWR = 1; \r
\r
/* Crude wait for reset to complete. */\r
- vTaskDelay( 500 / portTICK_RATE_MS ); \r
+ vTaskDelay( 500 / portTICK_PERIOD_MS ); \r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
unsigned long ul = EDMAC.EESR.LONG;\r
long lHigherPriorityTaskWoken = pdFALSE;\r
-extern xSemaphoreHandle xEMACSemaphore;\r
+extern SemaphoreHandle_t xEMACSemaphore;\r
static long ulTxEndInts = 0;\r
\r
/* Has a Tx end occurred? */\r
peripheral clock. */\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 150000000UL )\r
#define configPERIPHERAL_CLOCK_HZ ( ( unsigned long ) configCPU_CLOCK_HZ / 2UL )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000UL )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000UL )\r
#define configMAX_PRIORITIES ( 6 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 35U * 1024U ) )\r
static const unsigned long ulSemaphoreGiveRate_ms = 10UL;\r
\r
/* The semaphore used to synchronise the interrupt with the task. */\r
-static xSemaphoreHandle xHighFrequencyTimerSemaphore = NULL;\r
+static SemaphoreHandle_t xHighFrequencyTimerSemaphore = NULL;\r
\r
/* Holds the count of the number of times the task is unblocked by the timer. */\r
static volatile unsigned long ulHighFrequencyTaskIterations = 0UL;\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD_MS ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD_MS ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD_MS ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD_MS ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )\r
\r
/* Constant used by the standard timer test functions. The timers created by\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD_MS;\r
-portTickType xLastExecutionTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD_MS;\r
+TickType_t xLastExecutionTime;\r
\r
/* Just to stop compiler warnings. */\r
( void ) pvParameters;\r
but instead to load the kernel and interrupt mechanisms in order to test the\r
FreeRTOS port. Using a FIFO, DMA, circular buffer, etc. architecture will\r
to improve efficiency. */\r
-static xQueueHandle xSerialTransmitQueue = NULL;\r
-static xQueueHandle xSerialReceiveQueue = NULL;\r
+static QueueHandle_t xSerialTransmitQueue = NULL;\r
+static QueueHandle_t xSerialReceiveQueue = NULL;\r
static volatile portBASE_TYPE xTransmitStatus = 0UL;\r
\r
/*-----------------------------------------------------------*/\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Just to remove compiler warnings about unused parameters. */\r
( void )pxPort;\r
}\r
/*---------------------------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdPASS;\r
\r
\r
/* The maximum time to block waiting to obtain the xTxBufferMutex to become\r
available. */\r
-#define lwipappsMAX_TIME_TO_WAIT_FOR_TX_BUFFER_MS ( 100 / portTICK_RATE_MS )\r
+#define lwipappsMAX_TIME_TO_WAIT_FOR_TX_BUFFER_MS ( 100 / portTICK_PERIOD_MS )\r
\r
/* Definitions of the various SSI callback functions within the pccSSITags\r
array. If pccSSITags is updated, then these definitions must also be updated. */\r
};\r
\r
/* Semaphore used to guard the Tx buffer. */\r
-static xSemaphoreHandle xTxBufferMutex = NULL;\r
+static SemaphoreHandle_t xTxBufferMutex = NULL;\r
\r
/* The Tx buffer itself. This is used to hold the text generated by the\r
execution of command line commands, and (hopefully) the execution of\r
\r
/* The period at which the check timer will expire, in ms, provided no errors\r
have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )\r
\r
/* Check timer callback function. */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
\r
/* Defined in lwIPApps.c. */\r
extern void lwIPAppsInit( void *pvArguments );\r
\r
/* The check timer. This uses prvCheckTimerCallback() as its callback\r
function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+static TimerHandle_t xCheckTimer = NULL;\r
\r
/* Structure that defines the "run-time-stats" command line command. */\r
static const xCommandLineInput xRunTimeStats =\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
/* The parameter is not used in this case. */\r
( void ) xTimer;\r
of times the loop that takes/gives the recursive mutex executes. */\r
#define recmuMAX_COUNT ( 2 )\r
#define recmuSHORT_DELAY ( 20 )\r
-#define recmuNO_DELAY ( ( portTickType ) 0 )\r
-#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 )\r
+#define recmuNO_DELAY ( ( TickType_t ) 0 )\r
+#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 )\r
\r
/* The three tasks as described at the top of this file. */\r
static void prvRecursiveMutexControllingTask( void *pvParameters );\r
static void prvRecursiveMutexPollingTask( void *pvParameters );\r
\r
/* The mutex used by the demo. */\r
-static xSemaphoreHandle xMutex;\r
+static SemaphoreHandle_t xMutex;\r
\r
/* Variables used to detect and latch errors. */\r
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;\r
\r
/* Handles of the two higher priority tasks, required so they can be resumed \r
(unsuspended). */\r
-static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;\r
+static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;\r
\r
/*-----------------------------------------------------------*/\r
\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );\r
\r
\r
if( xMutex != NULL )\r
\r
/* Software timer related configuration options. */\r
#define configUSE_TIMERS 1\r
-#define configTIMER_TASK_PRIORITY 2\r
+#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
#define configTIMER_QUEUE_LENGTH 20\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )\r
\r
#define INCLUDE_pcTaskGetTaskName 1\r
#define INCLUDE_eTaskGetState 1\r
#define INCLUDE_xSemaphoreGetMutexHolder 1\r
-#define INCLUDE_xTimerPendFunctionCallFromISR 1\r
+#define INCLUDE_xTimerPendFunctionCall 1\r
\r
/* It is a good idea to define configASSERT() while developing. configASSERT()\r
uses the same semantics as the standard C assert() macro. */\r
/*******************************************************************************\r
- * Tracealyzer v2.4.1 Recorder Library\r
+ * Tracealyzer v2.6.0 Recorder Library\r
* Percepio AB, www.percepio.com\r
*\r
* trcConfig.h\r
#ifndef TRCCONFIG_H\r
#define TRCCONFIG_H\r
\r
-#include <stdint.h>\r
-\r
/*******************************************************************************\r
* CONFIGURATION RELATED TO CAPACITY AND ALLOCATION \r
******************************************************************************/\r
* vTracePrintF may use multiple records depending on the number of data args.\r
******************************************************************************/\r
\r
-#define EVENT_BUFFER_SIZE 100000 /* Adjust wrt. to available RAM */\r
+#define EVENT_BUFFER_SIZE 10000 /* Adjust wrt. to available RAM */\r
\r
\r
/*******************************************************************************\r
* stores User Events labels and names of deleted tasks, queues, or other kernel\r
* objects. Note that the names of active objects not stored here but in the \r
* Object Table. Thus, if you don't use User Events or delete any kernel \r
- * objects you set this to zero (0) to minimize RAM usage.\r
+ * objects you set this to a very low value, e.g. 4, but not zero (0) since \r
+ * this causes a declaration of a zero-sized array, for which the C compiler\r
+ * behavior is not standardized and may cause misaligned data.\r
******************************************************************************/\r
#define SYMBOL_TABLE_SIZE 5000\r
\r
+#if (SYMBOL_TABLE_SIZE == 0)\r
+#error "SYMBOL_TABLE_SIZE may not be zero!"\r
+#endif\r
+\r
/*******************************************************************************\r
* USE_SEPARATE_USER_EVENT_BUFFER\r
*\r
* check the actual usage in Tracealyzer. This is shown by selecting\r
* View -> Trace Details -> Resource Usage -> Object Table\r
* \r
- * NOTE 2: Remember to account for all tasks created by the kernel, such as the \r
- * IDLE task, timer task, and any tasks created by other 3rd party \r
- * software components, such as communication stacks. The recorder also has an \r
- * optional monitor task to account for, if this is used.\r
+ * NOTE 2: Remember to account for all tasks and other objects created by \r
+ * the kernel, such as the IDLE task, any timer tasks, and any tasks created \r
+ * by other 3rd party software components, such as communication stacks.\r
* Moreover, one task slot is used to indicate "(startup)", i.e., a fictive \r
* task that represent the time before the scheduler starts. \r
* NTask should thus be at least 2-3 slots larger than your application task count.\r
#define NQueue 60\r
#define NSemaphore 60\r
#define NMutex 60\r
+#define NTimer 200\r
+#define NEventGroup 60\r
\r
/* Maximum object name length for each class (includes zero termination) */\r
#define NameLenTask 15\r
#define NameLenQueue 15\r
#define NameLenSemaphore 15\r
#define NameLenMutex 15\r
+#define NameLenTimer 15\r
+#define NameLenEventGroup 15\r
\r
/******************************************************************************\r
* TRACE_DESCRIPTION\r
* much faster than a printf and can therefore be used in timing critical code.\r
* See vTraceUserEvent() and vTracePrintF() in trcUser.h\r
* \r
- * Note that Tracealyzer Standard Edition or Professional Edition is required\r
- * for User Events, they are not displayed in Tracealyzer Free Edition.\r
+ * Note that User Events are not displayed in FreeRTOS+Trace Free Edition.\r
*****************************************************************************/\r
#define INCLUDE_USER_EVENTS 1\r
\r
* traced kernel objects are deleted at runtime. If no deletes are made, this \r
* can be set to 0 in order to exclude the delete-handling code.\r
*****************************************************************************/\r
-#define INCLUDE_OBJECT_DELETE 0\r
+#define INCLUDE_OBJECT_DELETE 1\r
\r
/******************************************************************************\r
* CONFIGURATION RELATED TO BEHAVIOR\r
#define TRACE_PROGRESS_MONITOR_TASK_PERIOD 1000\r
#endif\r
\r
+\r
/******************************************************************************\r
- * TEAM_LICENSE_CODE\r
+ * USE_16BIT_OBJECT_HANDLES\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ * Default is 0.\r
+ *\r
+ * If set to 0 (zero), the recorder uses 8-bit handles to identify kernel \r
+ * objects such as tasks and queues. This limits the supported number of\r
+ * concurrently active objects to 255 of each type (object class).\r
*\r
- * Macro which defines a string - the team license code.\r
- * If no team license is available, this should be an empty string "".\r
- * This should be maximum 32 chars, including zero-termination.\r
+ * If set to 1 (one), the recorder uses 16-bit handles to identify kernel \r
+ * objects such as tasks and queues. This limits the supported number of\r
+ * concurrent objects to 65535 of each type (object class). However, since the\r
+ * object property table is limited to 64 KB, the practical limit is about\r
+ * 3000 objects in total. \r
+ * \r
+ * NOTE: An object with a high ID (> 255) will generate an extra event \r
+ * (= 4 byte) in the event buffer. \r
+ * \r
+ * NOTE: Some internal tables in the recorder gets larger when using 16-bit \r
+ * handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object\r
+ *, i.e., task, queue, semaphore, mutex, etc.\r
*****************************************************************************/\r
-#define TEAM_LICENSE_CODE ""\r
+#define USE_16BIT_OBJECT_HANDLES 0\r
+\r
+/****** Port Name ******************** Code ** Official ** OS Platform ******\r
+* PORT_APPLICATION_DEFINED -2 - - \r
+* PORT_NOT_SET -1 - - \r
+* PORT_HWIndependent 0 Yes Any \r
+* PORT_Win32 1 Yes FreeRTOS Win32\r
+* PORT_Atmel_AT91SAM7 2 No Any \r
+* PORT_Atmel_UC3A0 3 No Any \r
+* PORT_ARM_CortexM 4 Yes Any \r
+* PORT_Renesas_RX600 5 Yes Any \r
+* PORT_Microchip_dsPIC_AND_PIC24 6 Yes Any \r
+* PORT_TEXAS_INSTRUMENTS_TMS570 7 No Any \r
+* PORT_TEXAS_INSTRUMENTS_MSP430 8 No Any \r
+* PORT_MICROCHIP_PIC32 9 No Any \r
+* PORT_XILINX_PPC405 10 No FreeRTOS \r
+* PORT_XILINX_PPC440 11 No FreeRTOS \r
+* PORT_XILINX_MICROBLAZE 12 No Any \r
+* PORT_NXP_LPC210X 13 No Any \r
+*****************************************************************************/\r
+#define SELECTED_PORT PORT_Win32\r
+\r
+#if (SELECTED_PORT == PORT_NOT_SET)\r
+#error "You need to define SELECTED_PORT here!"\r
+#endif\r
+\r
+/******************************************************************************\r
+* USE_PRIMASK_CS (for Cortex M devices only)\r
+*\r
+* An integer constant that selects between two options for the critical\r
+* sections of the recorder library.\r
+ *\r
+* 0: The default FreeRTOS critical section (BASEPRI) - default setting\r
+* 1: Always disable ALL interrupts (using PRIMASK)\r
+ *\r
+* Option 0 uses the standard FreeRTOS macros for critical sections.\r
+* However, on Cortex-M devices they only disable interrupts with priorities \r
+* below a certain configurable level, while higher priority ISRs remain active.\r
+* Such high-priority ISRs may not use the recorder functions in this mode.\r
+*\r
+* Option 1 allows you to safely call the recorder from any ISR, independent of \r
+* the interrupt priority. This mode may however cause higher IRQ latencies\r
+* (some microseconds) since ALL configurable interrupts are disabled during \r
+* the recorder's critical sections in this mode, using the PRIMASK register.\r
+ ******************************************************************************/\r
+#define USE_PRIMASK_CS 0\r
+\r
\r
#endif\r
\r
+++ /dev/null
-/******************************************************************************* \r
- * Tracealyzer v2.4.1 Recorder Library\r
- * Percepio AB, www.percepio.com\r
- *\r
- * trcHardwarePort.h\r
- *\r
- * Contains together with trcHardwarePort.c all hardware portability issues of \r
- * the trace recorder library.\r
- *\r
- * Terms of Use\r
- * This software is copyright Percepio AB. The recorder library is free for\r
- * use together with Percepio products. You may distribute the recorder library\r
- * in its original form, including modifications in trcPort.c and trcPort.h\r
- * given that these modification are clearly marked as your own modifications\r
- * and documented in the initial comment section of these source files. \r
- * This software is the intellectual property of Percepio AB and may not be \r
- * sold or in other ways commercially redistributed without explicit written \r
- * permission by Percepio AB.\r
- *\r
- * Disclaimer \r
- * The trace tool and recorder library is being delivered to you AS IS and \r
- * Percepio AB makes no warranty as to its use or performance. Percepio AB does \r
- * not and cannot warrant the performance or results you may obtain by using the \r
- * software or documentation. Percepio AB make no warranties, express or \r
- * implied, as to noninfringement of third party rights, merchantability, or \r
- * fitness for any particular purpose. In no event will Percepio AB, its \r
- * technology partners, or distributors be liable to you for any consequential, \r
- * incidental or special damages, including any lost profits or lost savings, \r
- * even if a representative of Percepio AB has been advised of the possibility \r
- * of such damages, or for any claim by any third party. Some jurisdictions do \r
- * not allow the exclusion or limitation of incidental, consequential or special \r
- * damages, or the exclusion of implied warranties or limitations on how long an \r
- * implied warranty may last, so the above limitations may not apply to you.\r
- *\r
- * Copyright Percepio AB, 2013.\r
- * www.percepio.com\r
- ******************************************************************************/\r
-\r
-#ifndef TRCPORT_H\r
-#define TRCPORT_H\r
-\r
-#include "trcKernelPort.h"\r
-\r
-/* If Win32 port */\r
-#ifdef WIN32\r
-\r
- #undef _WIN32_WINNT\r
- #define _WIN32_WINNT 0x0600\r
-\r
- /* Standard includes. */\r
- #include <stdio.h>\r
- #include <windows.h>\r
- #include <direct.h>\r
-\r
-/*******************************************************************************\r
- * The Win32 port by default saves the trace to file and then kills the\r
- * program when the recorder is stopped, to facilitate quick, simple tests\r
- * of the recorder.\r
- ******************************************************************************/\r
- #define WIN32_PORT_SAVE_WHEN_STOPPED 1\r
- #define WIN32_PORT_EXIT_WHEN_STOPPED 1\r
-\r
-#endif\r
-\r
-#define DIRECTION_INCREMENTING 1\r
-#define DIRECTION_DECREMENTING 2\r
-\r
-/******************************************************************************\r
- * Supported ports\r
- * \r
- * PORT_HWIndependent\r
- * A hardware independent fallback option for event timestamping. Provides low \r
- * resolution timestamps based on the OS tick.\r
- * This may be used on the Win32 port, but may also be used on embedded hardware \r
- * platforms. All time durations will be truncated to the OS tick frequency, \r
- * typically 1 KHz. This means that a task or ISR that executes in less than \r
- * 1 ms get an execution time of zero.\r
- *\r
- * PORT_Win32\r
- * "Accurate" timestamping based on the Windows performance counter. Note that\r
- * this gives the host machine time.\r
- *\r
- * Officially supported hardware timer ports:\r
- * - PORT_Atmel_AT91SAM7\r
- * - PORT_Atmel_UC3A0\r
- * - PORT_ARM_CortexM \r
- * - PORT_Renesas_RX600\r
- * - PORT_Microchip_dsPIC_AND_PIC24\r
- *\r
- * We also provide several "unofficial" hardware-specific ports. There have \r
- * been developed by external contributors, and have not yet been verified \r
- * by Percepio AB. Let us know if you have problems getting these to work.\r
- * \r
- * Unofficial hardware specific ports provided are:\r
- * - PORT_TEXAS_INSTRUMENTS_TMS570\r
- * - PORT_TEXAS_INSTRUMENTS_MSP430\r
- * - PORT_MICROCHIP_PIC32\r
- * - PORT_XILINX_PPC405\r
- * - PORT_XILINX_PPC440\r
- * - PORT_XILINX_MICROBLAZE\r
- * - PORT_NXP_LPC210X\r
- *\r
- *****************************************************************************/\r
-\r
-#define PORT_NOT_SET -1\r
-\r
-/*** Officially supported hardware timer ports *******************************/\r
-#define PORT_HWIndependent 0\r
-#define PORT_Win32 1\r
-#define PORT_Atmel_AT91SAM7 2\r
-#define PORT_Atmel_UC3A0 3\r
-#define PORT_ARM_CortexM 4\r
-#define PORT_Renesas_RX600 5\r
-#define PORT_Microchip_dsPIC_AND_PIC24 6\r
-\r
-/*** Unofficial ports, provided by external developers, not yet verified *****/\r
-#define PORT_TEXAS_INSTRUMENTS_TMS570 7\r
-#define PORT_TEXAS_INSTRUMENTS_MSP430 8\r
-#define PORT_MICROCHIP_PIC32 9\r
-#define PORT_XILINX_PPC405 10\r
-#define PORT_XILINX_PPC440 11\r
-#define PORT_XILINX_MICROBLAZE 12\r
-#define PORT_NXP_LPC210X 13\r
-\r
-/*** Select your port here! **************************************************/\r
-#define SELECTED_PORT PORT_Win32\r
-/*****************************************************************************/\r
-\r
-#if (SELECTED_PORT == PORT_NOT_SET) \r
-#error "You need to define SELECTED_PORT here!"\r
-#endif\r
-\r
-/*******************************************************************************\r
- * IRQ_PRIORITY_ORDER\r
- *\r
- * Macro which should be defined as an integer of 0 or 1.\r
- *\r
- * This should be 0 if lower IRQ priority values implies higher priority \r
- * levels, such as on ARM Cortex M. If the opposite scheme is used, i.e., \r
- * if higher IRQ priority values means higher priority, this should be 1.\r
- *\r
- * This setting is not critical. It is used only to sort and colorize the \r
- * interrupts in priority order, in case you record interrupts using\r
- * the vTraceStoreISRBegin and vTraceStoreISREnd routines.\r
- *\r
- * We provide this setting for some hardware architectures below:\r
- * - ARM Cortex M: 0 (lower IRQ priority values are more significant)\r
- * - Atmel AT91SAM7x: 1 (higher IRQ priority values are more significant)\r
- * - Atmel AVR32: 1 (higher IRQ priority values are more significant)\r
- * - Renesas RX600: 1 (higher IRQ priority values are more significant)\r
- * - Microchip PIC24: 0 (lower IRQ priority values are more significant)\r
- * - Microchip dsPIC: 0 (lower IRQ priority values are more significant)\r
- * - TI TMS570: 0 (lower IRQ priority values are more significant)\r
- * - Freescale HCS08: 0 (lower IRQ priority values are more significant)\r
- * - Freescale HCS12: 0 (lower IRQ priority values are more significant)\r
- * - PowerPC 405: 0 (lower IRQ priority values are more significant)\r
- * - PowerPC 440: 0 (lower IRQ priority values are more significant)\r
- * - Freescale ColdFire: 1 (higher IRQ priority values are more significant)\r
- * - NXP LPC210x: 0 (lower IRQ priority values are more significant)\r
- * - MicroBlaze: 0 (lower IRQ priority values are more significant)\r
- *\r
- * If your chip is not on the above list, and you perhaps know this detail by \r
- * heart, please inform us by e-mail to support@percepio.com.\r
- *\r
- ******************************************************************************\r
- *\r
- * HWTC Macros \r
- *\r
- * These four HWTC macros provides a hardware isolation layer representing a \r
- * generic hardware timer/counter used for driving the operating system tick, \r
- * such as the SysTick feature of ARM Cortex M3/M4, or the PIT of the Atmel \r
- * AT91SAM7X.\r
- *\r
- * HWTC_COUNT: The current value of the counter. This is expected to be reset \r
- * a each tick interrupt. Thus, when the tick handler starts, the counter has \r
- * already wrapped.\r
- *\r
- * HWTC_COUNT_DIRECTION: Should be one of:\r
- * - DIRECTION_INCREMENTING - for hardware timer/counters of incrementing type\r
- * such as the PIT on Atmel AT91SAM7X.\r
- * When the counter value reach HWTC_PERIOD, it is reset to zero and the\r
- * interrupt is signaled.\r
- * - DIRECTION_DECREMENTING - for hardware timer/counters of decrementing type\r
- * such as the SysTick on ARM Cortex M3/M4 chips.\r
- * When the counter value reach 0, it is reset to HWTC_PERIOD and the\r
- * interrupt is signaled.\r
- *\r
- * HWTC_PERIOD: The number of increments or decrements of HWTC_COUNT between\r
- * two tick interrupts. This should preferably be mapped to the reload\r
- * register of the hardware timer, to make it more portable between chips in the \r
- * same family. The macro should in most cases be (reload register + 1).\r
- *\r
- * HWTC_DIVISOR: If the timer frequency is very high, like on the Cortex M chips\r
- * (where the SysTick runs at the core clock frequency), the "differential \r
- * timestamping" used in the recorder will more frequently insert extra XTS \r
- * events to store the timestamps, which increases the event buffer usage. \r
- * In such cases, to reduce the number of XTS events and thereby get longer \r
- * traces, you use HWTC_DIVISOR to scale down the timestamps and frequency.\r
- * Assuming a OS tick rate of 1 KHz, it is suggested to keep the effective timer\r
- * frequency below 65 MHz to avoid an excessive amount of XTS events. Thus, a\r
- * Cortex M chip running at 72 MHZ should use a HWTC_DIVISOR of 2, while a \r
- * faster chip require a higher HWTC_DIVISOR value. \r
- *\r
- * The HWTC macros and vTracePortGetTimeStamp is the main porting issue\r
- * or the trace recorder library. Typically you should not need to change\r
- * the code of vTracePortGetTimeStamp if using the HWTC macros.\r
- *\r
- ******************************************************************************/\r
-\r
-#if (SELECTED_PORT == PORT_Win32)\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (ulGetRunTimeCounterValue())\r
- #define HWTC_PERIOD 0\r
- #define HWTC_DIVISOR 1\r
- \r
- #define IRQ_PRIORITY_ORDER 1 // Please update according to your hardware...\r
-\r
-#elif (SELECTED_PORT == PORT_HWIndependent)\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT 0\r
- #define HWTC_PERIOD 1\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // Please update according to your hardware...\r
-\r
-#elif (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
-\r
- /* HWTC_PERIOD is hardcoded for AT91SAM7X256-EK Board (48 MHz)\r
- A more generic solution is to get the period from pxPIT->PITC_PIMR */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (AT91C_BASE_PITC->PITC_PIIR & 0xFFFFF)\r
- #define HWTC_PERIOD 2995 \r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Atmel_UC3A0) \r
- \r
- /* For Atmel AVR32 (AT32UC3A) */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT sysreg_read(AVR32_COUNT)\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_ARM_CortexM)\r
-\r
- /* For all chips using ARM Cortex M cores */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT (*((uint32_t*)0xE000E018))\r
- #define HWTC_PERIOD ((*(uint32_t*)0xE000E014) + 1)\r
- #define HWTC_DIVISOR 2\r
- \r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Renesas_RX600) \r
-\r
- #include "iodefine.h"\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (CMT0.CMCNT)\r
- #define HWTC_PERIOD ((((TRACE_PERIPHERAL_CLOCK_HZ/TRACE_TICK_RATE_HZ)-1)/8))\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Microchip_dsPIC_AND_PIC24) \r
-\r
- /* For Microchip PIC24 and dsPIC (16 bit) */\r
-\r
- /* Note: The trace library was originally designed for 32-bit MCUs, and is slower\r
- than intended on 16-bit MCUs. Storing an event on a PIC24 takes about 70 µs. \r
- In comparison, 32-bit MCUs are often 10-20 times faster. If recording overhead \r
- becomes a problem on PIC24, use the filters to exclude less interesting tasks \r
- or system calls. */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (TMR1)\r
- #define HWTC_PERIOD (PR1+1)\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_NXP_LPC210X)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
- \r
- /* Tested with LPC2106, but should work with most LPC21XX chips. */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT *((uint32_t *)0xE0004008 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ ) \r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_TMS570)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define RTIFRC0 *((uint32_t *)0xFFFFFC10)\r
- #define RTICOMP0 *((uint32_t *)0xFFFFFC50)\r
- #define RTIUDCP0 *((uint32_t *)0xFFFFFC54)\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (RTIFRC0 - (RTICOMP0 - RTIUDCP0))\r
- #define HWTC_PERIOD (RTIUDCP0)\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_MSP430)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (TA0R)\r
- #define HWTC_PERIOD TRACE_CPU_CLOCKS_PER_TICK \r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_MICROCHIP_PIC32)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (ReadTimer1()) /* Should be available in BSP */\r
- #define HWTC_PERIOD (ReadPeriod1()+1) /* Should be available in BSP */\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_XILINX_PPC405) \r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT mfspr( 0x3db)\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_XILINX_PPC440) \r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- /* This should work with most PowerPC chips */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT mfspr( 0x016 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
- \r
-#elif (SELECTED_PORT == PORT_XILINX_MICROBLAZE)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- /* This should work with most Microblaze configurations.\r
- * It uses the AXI Timer 0 - the tick interrupt source.\r
- * If an AXI Timer 0 peripheral is available on your hardware platform, no modifications are required.\r
- */\r
- #include "xtmrctr_l.h"\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT XTmrCtr_GetTimerCounterReg( XPAR_TMRCTR_0_BASEADDR, 0 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 16\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT != PORT_NOT_SET)\r
-\r
- #error "SELECTED_PORT had unsupported value!"\r
- #define SELECTED_PORT PORT_NOT_SET\r
-\r
-#endif\r
-\r
-#if (SELECTED_PORT != PORT_NOT_SET)\r
- \r
- #ifndef HWTC_COUNT_DIRECTION\r
- #error "HWTC_COUNT_DIRECTION is not set!"\r
- #endif \r
- \r
- #ifndef HWTC_COUNT\r
- #error "HWTC_COUNT is not set!" \r
- #endif \r
- \r
- #ifndef HWTC_PERIOD\r
- #error "HWTC_PERIOD is not set!"\r
- #endif \r
- \r
- #ifndef HWTC_DIVISOR\r
- #error "HWTC_DIVISOR is not set!" \r
- #endif \r
- \r
- #ifndef IRQ_PRIORITY_ORDER\r
- #error "IRQ_PRIORITY_ORDER is not set!"\r
- #elif (IRQ_PRIORITY_ORDER != 0) && (IRQ_PRIORITY_ORDER != 1)\r
- #error "IRQ_PRIORITY_ORDER has bad value!"\r
- #endif \r
- \r
- #if (HWTC_DIVISOR < 1)\r
- #error "HWTC_DIVISOR must be a non-zero positive value!"\r
- #endif \r
-\r
-#endif\r
-/*******************************************************************************\r
- * vTraceConsoleMessage\r
- *\r
- * A wrapper for your system-specific console "printf" console output function.\r
- * This needs to be correctly defined to see status reports from the trace \r
- * status monitor task (this is defined in trcUser.c).\r
- ******************************************************************************/ \r
-#if (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
-/* Port specific includes */\r
-#include "console.h"\r
-#endif\r
-\r
-#define vTraceConsoleMessage(x)\r
-\r
-/*******************************************************************************\r
- * vTracePortGetTimeStamp\r
- *\r
- * Returns the current time based on the HWTC macros which provide a hardware\r
- * isolation layer towards the hardware timer/counter.\r
- *\r
- * The HWTC macros and vTracePortGetTimeStamp is the main porting issue\r
- * or the trace recorder library. Typically you should not need to change\r
- * the code of vTracePortGetTimeStamp if using the HWTC macros.\r
- *\r
- ******************************************************************************/\r
-void vTracePortGetTimeStamp(uint32_t *puiTimestamp);\r
-\r
-/*******************************************************************************\r
- * vTracePortEnd\r
- * \r
- * This function is called when the recorder is stopped due to full buffer.\r
- * Mainly intended to show a message in the console.\r
- * This is used by the Win32 port to store the trace to a file. The file path is\r
- * set using vTracePortSetFileName.\r
- ******************************************************************************/\r
-void vTracePortEnd(void);\r
-\r
-#if (INCLUDE_SAVE_TO_FILE == 1)\r
-\r
-/*******************************************************************************\r
- * vTracePortSetOutFile\r
- *\r
- * Sets the filename/path used in vTracePortSave.\r
- * This is set in a separate function, since the Win32 port calls vTracePortSave\r
- * in vTracePortEnd if WIN32_PORT_SAVE_WHEN_STOPPED is set.\r
- ******************************************************************************/\r
-void vTracePortSetOutFile(char* path);\r
-\r
-/******************************************************************************\r
- * vTracePortSave\r
- *\r
- * Saves the trace to a file on a target-side file system. The path is set in a \r
- * separate function, vTracePortSetOutFile, since the Win32 port may call\r
- * vTracePortSave in vTracePortEnd, if using WIN32_PORT_SAVE_WHEN_STOPPED.\r
- ******************************************************************************/\r
-void vTracePortSave(void);\r
-\r
-#else\r
-\r
-#define vTraceConsoleMessage(x)\r
-#define vTracePortSetOutFile(path)\r
-#define vTracePortSave(void)\r
-\r
-#endif\r
-\r
-#endif\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*\r
function, because it is the responsibility of the idle task to clean up\r
memory allocated by the kernel to any task that has since been deleted. */\r
\r
- /* The trace can be stopped with any key press. */\r
- if( _kbhit() != pdFALSE )\r
- {\r
- if( xTraceRunning == pdTRUE )\r
+ /* Uncomment the following code to allow the trace to be stopped with any \r
+ key press. The code is commented out by default as the kbhit() function\r
+ interferes with the run time behaviour. */\r
+ /* \r
+ if( _kbhit() != pdFALSE )\r
{\r
- vTraceStop();\r
- prvSaveTraceFile();\r
- xTraceRunning = pdFALSE;\r
+ if( xTraceRunning == pdTRUE )\r
+ {\r
+ vTraceStop();\r
+ prvSaveTraceFile();\r
+ xTraceRunning = pdFALSE;\r
+ }\r
}\r
- }\r
+ */\r
\r
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )\r
{\r
static portBASE_TYPE xPrinted = pdFALSE;\r
+volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;\r
\r
/* Parameters are not used. */\r
( void ) ulLine;\r
( void ) pcFileName;\r
\r
- taskDISABLE_INTERRUPTS();\r
-\r
- /* Stop the trace recording. */\r
- if( xPrinted == pdFALSE )\r
+ taskENTER_CRITICAL();\r
{\r
- xPrinted = pdTRUE;\r
- if( xTraceRunning == pdTRUE )\r
+ /* Stop the trace recording. */\r
+ if( xPrinted == pdFALSE )\r
+ {\r
+ xPrinted = pdTRUE;\r
+ if( xTraceRunning == pdTRUE )\r
+ {\r
+ vTraceStop();\r
+ prvSaveTraceFile();\r
+ }\r
+ }\r
+\r
+ /* You can step out of this function to debug the assertion by using\r
+ the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero\r
+ value. */\r
+ while( ulSetToNonZeroInDebuggerToContinue == 0 )\r
{\r
- vTraceStop();\r
- prvSaveTraceFile();\r
+ __asm{ NOP };\r
+ __asm{ NOP };\r
}\r
}\r
- for( ;; );\r
+ taskEXIT_CRITICAL();\r
}\r
/*-----------------------------------------------------------*/\r
\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove compiler warning in the case that configASSERT() is not\r
#include "EventGroupsDemo.h"\r
\r
/* Priorities at which the tasks are created. */\r
-#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
+#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
#define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
-#define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
*/\r
static void prvDemonstrateTaskStateAndHandleGetFunctions( void );\r
\r
+/*\r
+ * Called from the idle task hook function to demonstrate the use of \r
+ * xTimerPendFunctionCall() as xTimerPendFunctionCall() is not demonstrated by\r
+ * any of the standard demo tasks.\r
+ */\r
+static void prvDemonstratePendingFunctionCall( void );\r
+\r
+/*\r
+ * The function that is pended by prvDemonstratePendingFunctionCall().\r
+ */\r
+static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 );\r
+\r
/*\r
* A task to demonstrate the use of the xQueueSpacesAvailable() function.\r
*/\r
\r
/* This semaphore is created purely to test using the vSemaphoreDelete() and\r
semaphore tracing API functions. It has no other purpose. */\r
-static xSemaphoreHandle xMutexToDelete = NULL;\r
+static SemaphoreHandle_t xMutexToDelete = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
-const portTickType xCycleFrequency = 2500 / portTICK_RATE_MS;\r
+TickType_t xNextWakeTime;\r
+const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS;\r
\r
/* Just to remove compiler warning. */\r
( void ) pvParameters;\r
\r
/* These three functions are only meant for use by trace code, and not for\r
direct use from application code, hence their prototypes are not in queue.h. */\r
-extern void vQueueSetQueueNumber( xQueueHandle pxQueue, unsigned portBASE_TYPE uxQueueNumber );\r
-extern unsigned portBASE_TYPE uxQueueGetQueueNumber( xQueueHandle pxQueue );\r
-extern uint8_t ucQueueGetQueueType( xQueueHandle pxQueue );\r
-extern void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle );\r
-extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask );\r
+extern void vQueueSetQueueNumber( QueueHandle_t pxQueue, unsigned portBASE_TYPE uxQueueNumber );\r
+extern unsigned portBASE_TYPE uxQueueGetQueueNumber( QueueHandle_t pxQueue );\r
+extern uint8_t ucQueueGetQueueType( QueueHandle_t pxQueue );\r
+extern void vTaskSetTaskNumber( TaskHandle_t xTask, unsigned portBASE_TYPE uxHandle );\r
+extern unsigned portBASE_TYPE uxTaskGetTaskNumber( TaskHandle_t xTask );\r
\r
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are\r
tasks waiting to be terminated by the idle task. */\r
the standard demo tasks. */\r
prvDemonstrateTaskStateAndHandleGetFunctions();\r
\r
+ /* Demonstrate the use of xTimerPendFunctionCall(), which is not\r
+ demonstrated by any of the standard demo tasks. */\r
+ prvDemonstratePendingFunctionCall();\r
+\r
/* If xMutexToDelete has not already been deleted, then delete it now.\r
This is done purely to demonstrate the use of, and test, the\r
vSemaphoreDelete() macro. Care must be taken not to delete a semaphore\r
}\r
/*-----------------------------------------------------------*/\r
\r
+static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 )\r
+{\r
+static uint32_t ulLastParameter1 = 1000UL, ulLastParameter2 = 0UL;\r
+uint32_t ulParameter1;\r
+\r
+ ulParameter1 = ( uint32_t ) pvParameter1;\r
+\r
+ /* Ensure the parameters are as expected. */\r
+ configASSERT( ulParameter1 == ( ulLastParameter1 + 1 ) );\r
+ configASSERT( ulParameter2 == ( ulLastParameter2 + 1 ) );\r
+\r
+ /* Remember the parameters for the next time the function is called. */\r
+ ulLastParameter1 = ulParameter1;\r
+ ulLastParameter2 = ulParameter2;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvDemonstratePendingFunctionCall( void )\r
+{\r
+static uint32_t ulParameter1 = 1000UL, ulParameter2 = 0UL;\r
+const TickType_t xDontBlock = 0; /* This is called from the idle task so must *not* attempt to block. */\r
+\r
+ /* prvPendedFunction() just expects the parameters to be incremented by one\r
+ each time it is called. */\r
+ ulParameter1++;\r
+ ulParameter2++;\r
+\r
+ /* Pend the function call, sending the parameters. */\r
+ xTimerPendFunctionCall( prvPendedFunction, ( void * ) ulParameter1, ulParameter2, xDontBlock );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
static void prvDemonstrateTaskStateAndHandleGetFunctions( void )\r
{\r
-xTaskHandle xIdleTaskHandle, xTimerTaskHandle;\r
+TaskHandle_t xIdleTaskHandle, xTimerTaskHandle;\r
const unsigned char ucConstTaskNumber = 0x55U;\r
-signed char *pcTaskName;\r
+char *pcTaskName;\r
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;\r
-xTaskHandle xTestTask;\r
+TaskHandle_t xTestTask;\r
\r
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and\r
xTaskGetIdleTaskHandle() functions. Also try using the function that sets\r
\r
static void prvDemoQueueSpaceFunctions( void *pvParameters )\r
{\r
-xQueueHandle xQueue = NULL;\r
+QueueHandle_t xQueue = NULL;\r
const unsigned portBASE_TYPE uxQueueLength = 10;\r
unsigned portBASE_TYPE uxReturn, x;\r
\r
of times the loop that takes/gives the recursive mutex executes. */\r
#define recmuMAX_COUNT ( 2 )\r
#define recmuSHORT_DELAY ( 20 )\r
-#define recmuNO_DELAY ( ( portTickType ) 0 )\r
-#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 )\r
+#define recmuNO_DELAY ( ( TickType_t ) 0 )\r
+#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 )\r
\r
/* The three tasks as described at the top of this file. */\r
static void prvRecursiveMutexControllingTask( void *pvParameters );\r
static void prvRecursiveMutexPollingTask( void *pvParameters );\r
\r
/* The mutex used by the demo. */\r
-static xSemaphoreHandle xMutex;\r
+static SemaphoreHandle_t xMutex;\r
\r
/* Variables used to detect and latch errors. */\r
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;\r
\r
/* Handles of the two higher priority tasks, required so they can be resumed \r
(unsuspended). */\r
-static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;\r
+static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;\r
\r
/*-----------------------------------------------------------*/\r
\r
is not being used. The call to vQueueAddToRegistry() will be removed\r
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
defined to be less than 1. */\r
- vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" );\r
+ vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );\r
\r
\r
if( xMutex != NULL )\r
within this file. */\r
void vApplicationMallocFailedHook( void );\r
void vApplicationIdleHook( void );\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
/*\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
( void ) pcTaskName;\r
( void ) pxTask;\r
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* The rate at which data is sent to the queue. The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )\r
\r
/* The number of items the queue can hold. This is 1 as the receive task\r
will remove items as they are added, meaning the send task should always find\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove compiler warning in the case that configASSERT() is not\r
\r
/* This semaphore is created purely to test using the vSemaphoreDelete() and\r
semaphore tracing API functions. It has no other purpose. */\r
-static xSemaphoreHandle xMutexToDelete = NULL;\r
+static SemaphoreHandle_t xMutexToDelete = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
-const portTickType xCycleFrequency = 2500 / portTICK_RATE_MS;\r
+TickType_t xNextWakeTime;\r
+const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS;\r
\r
/* Just to remove compiler warning. */\r
( void ) pvParameters;\r
\r
/* These three functions are only meant for use by trace code, and not for\r
direct use from application code, hence their prototypes are not in queue.h. */\r
-extern void vQueueSetQueueNumber( xQueueHandle pxQueue, unsigned portBASE_TYPE uxQueueNumber );\r
-extern unsigned portBASE_TYPE uxQueueGetQueueNumber( xQueueHandle pxQueue );\r
-extern uint8_t ucQueueGetQueueType( xQueueHandle pxQueue );\r
-extern void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle );\r
-extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask );\r
+extern void vQueueSetQueueNumber( QueueHandle_t pxQueue, unsigned portBASE_TYPE uxQueueNumber );\r
+extern unsigned portBASE_TYPE uxQueueGetQueueNumber( QueueHandle_t pxQueue );\r
+extern uint8_t ucQueueGetQueueType( QueueHandle_t pxQueue );\r
+extern void vTaskSetTaskNumber( TaskHandle_t xTask, unsigned portBASE_TYPE uxHandle );\r
+extern unsigned portBASE_TYPE uxTaskGetTaskNumber( TaskHandle_t xTask );\r
\r
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are\r
tasks waiting to be terminated by the idle task. */\r
\r
static void prvDemonstrateTaskStateAndHandleGetFunctions( void )\r
{\r
-xTaskHandle xIdleTaskHandle, xTimerTaskHandle;\r
+TaskHandle_t xIdleTaskHandle, xTimerTaskHandle;\r
const unsigned char ucConstTaskNumber = 0x55U;\r
char *pcTaskName;\r
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;\r
-xTaskHandle xTestTask;\r
+TaskHandle_t xTestTask;\r
\r
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and\r
xTaskGetIdleTaskHandle() functions. Also try using the function that sets\r
\r
static void prvDemoQueueSpaceFunctions( void *pvParameters )\r
{\r
-xQueueHandle xQueue = NULL;\r
+QueueHandle_t xQueue = NULL;\r
const unsigned portBASE_TYPE uxQueueLength = 10;\r
unsigned portBASE_TYPE uxReturn, x;\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 23 * 1024 ) )\r
#include "tcp.h"\r
\r
/* Misc constants. */\r
-#define tcpPOLL_DELAY ( ( portTickType ) 12 / portTICK_RATE_MS )\r
-#define tcpCONNECTION_DELAY ( ( portTickType ) 8 / portTICK_RATE_MS )\r
+#define tcpPOLL_DELAY ( ( TickType_t ) 12 / portTICK_PERIOD_MS )\r
+#define tcpCONNECTION_DELAY ( ( TickType_t ) 8 / portTICK_PERIOD_MS )\r
/*-----------------------------------------------------------*/\r
\r
/*\r
#define tcpEINT0_VIC_ENABLE ( ( unsigned long ) 0x0020 )\r
\r
/* Various delays used in the driver. */\r
-#define tcpRESET_DELAY ( ( portTickType ) 16 / portTICK_RATE_MS )\r
-#define tcpINIT_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
-#define tcpLONG_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
-#define tcpSHORT_DELAY ( ( portTickType ) 5 / portTICK_RATE_MS )\r
-#define tcpCONNECTION_WAIT_DELAY ( ( portTickType ) 100 / portTICK_RATE_MS )\r
-#define tcpNO_DELAY ( ( portTickType ) 0 )\r
+#define tcpRESET_DELAY ( ( TickType_t ) 16 / portTICK_PERIOD_MS )\r
+#define tcpINIT_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
+#define tcpLONG_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
+#define tcpSHORT_DELAY ( ( TickType_t ) 5 / portTICK_PERIOD_MS )\r
+#define tcpCONNECTION_WAIT_DELAY ( ( TickType_t ) 100 / portTICK_PERIOD_MS )\r
+#define tcpNO_DELAY ( ( TickType_t ) 0 )\r
\r
/* Length of the data to read for various register reads. */\r
#define tcpSTATUS_READ_LEN ( ( unsigned long ) 1 )\r
const unsigned char const ucDataDisableISR[] = { i2cCHANNEL_0_ISR_DISABLE };\r
const unsigned char const ucDataClearInterrupt[] = { i2cCLEAR_ALL_INTERRUPTS };\r
\r
-static xSemaphoreHandle xMessageComplete = NULL;\r
-xQueueHandle xTCPISRQueue = NULL;\r
+static SemaphoreHandle_t xMessageComplete = NULL;\r
+QueueHandle_t xTCPISRQueue = NULL;\r
\r
/* Dynamically generate and send an html page. */\r
static void prvSendSamplePage( void );\r
*/\r
void vEINT0_ISR_Handler( void )\r
{\r
-extern xQueueHandle xTCPISRQueue;\r
+extern QueueHandle_t xTCPISRQueue;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Just wake the TCP task so it knows an ISR has occurred. */\r
#define i2cI2C_VIC_ENABLE ( ( unsigned long ) 0x0020 )\r
\r
/* Misc constants. */\r
-#define i2cNO_BLOCK ( ( portTickType ) 0 )\r
+#define i2cNO_BLOCK ( ( TickType_t ) 0 )\r
#define i2cQUEUE_LENGTH ( ( unsigned char ) 5 )\r
#define i2cEXTRA_MESSAGES ( ( unsigned char ) 2 )\r
#define i2cREAD_TX_LEN ( ( unsigned long ) 2 )\r
static xI2CMessage xTxMessages[ i2cQUEUE_LENGTH + i2cEXTRA_MESSAGES ];\r
\r
/* Function in the ARM part of the code used to create the queues. */\r
-extern void vI2CISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxTxMessages, unsigned long **ppulBusFree );\r
+extern void vI2CISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxTxMessages, unsigned long **ppulBusFree );\r
\r
/* Index to the next free message in the xTxMessages array. */\r
unsigned long ulNextFreeMessage = ( unsigned long ) 0;\r
\r
/* Queue of messages that are waiting transmission. */\r
-static xQueueHandle xMessagesForTx;\r
+static QueueHandle_t xMessagesForTx;\r
\r
/* Flag to indicate the state of the I2C ISR state machine. */\r
static unsigned long *pulBusFree;\r
\r
/*-----------------------------------------------------------*/\r
-void i2cMessage( const unsigned char * const pucMessage, long lMessageLength, unsigned char ucSlaveAddress, unsigned short usBufferAddress, unsigned long ulDirection, xSemaphoreHandle xMessageCompleteSemaphore, portTickType xBlockTime )\r
+void i2cMessage( const unsigned char * const pucMessage, long lMessageLength, unsigned char ucSlaveAddress, unsigned short usBufferAddress, unsigned long ulDirection, SemaphoreHandle_t xMessageCompleteSemaphore, TickType_t xBlockTime )\r
{\r
extern volatile xI2CMessage *pxCurrentMessage;\r
xI2CMessage *pxNextFreeMessage;\r
unsigned char ucSlaveAddress; /*< The slave address of the WIZnet on the I2C bus. */\r
unsigned char ucBufferAddressLowByte; /*< The address within the WIZnet device to which data should be read from / written to. */\r
unsigned char ucBufferAddressHighByte; /*< As above, high byte. */\r
- xSemaphoreHandle xMessageCompleteSemaphore; /*< Contains a reference to a semaphore if the application tasks wants notifying when the message has been transacted. */\r
+ SemaphoreHandle_t xMessageCompleteSemaphore; /*< Contains a reference to a semaphore if the application tasks wants notifying when the message has been transacted. */\r
unsigned char *pucBuffer; /*< Pointer to the buffer from where data will be read for transmission, or into which received data will be placed. */\r
} xI2CMessage;\r
\r
* become available should one not be available \r
* immediately.\r
*/\r
-void i2cMessage( const unsigned char * const pucMessage, long lMessageLength, unsigned char ucSlaveAddress, unsigned short usBufferAddress, unsigned long ulDirection, xSemaphoreHandle xMessageCompleteSemaphore, portTickType xBlockTime );\r
+void i2cMessage( const unsigned char * const pucMessage, long lMessageLength, unsigned char ucSlaveAddress, unsigned short usBufferAddress, unsigned long ulDirection, SemaphoreHandle_t xMessageCompleteSemaphore, TickType_t xBlockTime );\r
\r
#endif\r
\r
volatile xI2CMessage *pxCurrentMessage = NULL; \r
\r
/* The queue of messages waiting to be transmitted. */\r
-static xQueueHandle xMessagesForTx;\r
+static QueueHandle_t xMessagesForTx;\r
\r
/* Flag used to indicate whether or not the ISR is amid sending a message. */\r
unsigned long ulBusFree = ( unsigned long ) pdTRUE;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vI2CISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxTxMessages, unsigned long **ppulBusFree )\r
+void vI2CISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxTxMessages, unsigned long **ppulBusFree )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
xMessagesForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( xI2CMessage * ) );\r
\r
static void prvErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelay = mainNO_ERROR_DELAY;\r
+TickType_t xDelay = mainNO_ERROR_DELAY;\r
\r
/* The parameters are not used. */\r
( void ) pvParameters;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) /* This can be made smaller if required. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 20 * 1024 ) ) \r
\r
/* The semaphore used by the Ethernet ISR to signal that the task should wake\r
and process whatever caused the interrupt. */\r
-xSemaphoreHandle xTCPSemaphore = NULL;\r
+SemaphoreHandle_t xTCPSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
void vHTTPTask( void * pvParameters )\r
#include "comtest.h"\r
\r
/* How often should the "check" task execute? */\r
-#define mainCHECK_DELAY ( 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY ( 3000 / portTICK_PERIOD_MS )\r
\r
/* Priorities allocated to the various tasks. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define serCLEAR_ALL_STATUS_BITS ( ( unsigned short ) 0x00 )\r
#define serINTERRUPT_PRIORITY ( ( unsigned short ) 0x01 ) /*< Just below the scheduler priority. */\r
\r
-#define serDONT_BLOCK ( ( portTickType ) 0 )\r
+#define serDONT_BLOCK ( ( TickType_t ) 0 )\r
\r
typedef enum\r
{ \r
unsigned short usIRQVector;\r
\r
/* Queues used for communications with com test task. */\r
- xQueueHandle xRxedChars; \r
- xQueueHandle xCharsForTx;\r
+ QueueHandle_t xRxedChars; \r
+ QueueHandle_t xCharsForTx;\r
\r
/* This semaphore does nothing useful except test a feature of the\r
scheduler. */\r
- xSemaphoreHandle xTestSem;\r
+ SemaphoreHandle_t xTestSem;\r
\r
} xComPort;\r
\r
/* These prototypes are repeated here so we don't have to include the serial header. This allows\r
the xComPortHandle structure details to be private to this file. */\r
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime );\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime );\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime );\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime );\r
void vSerialClose( xComPortHandle xPort );\r
short sSerialWaitForSemaphore( xComPortHandle xPort );\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer, note that this routine is only \r
called having checked that the is (at least) one to get */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime )\r
+portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime )\r
{\r
if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
{\r
\r
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort )\r
{\r
-const portTickType xBlockTime = ( portTickType ) 0xffff;\r
+const TickType_t xBlockTime = ( TickType_t ) 0xffff;\r
\r
/* This function does nothing interesting, but test the \r
semaphore from ISR mechanism. */\r
portBASE_TYPE prvProcessISR( void )\r
{\r
unsigned char status;\r
-extern xSemaphoreHandle xTCPSemaphore;\r
+extern SemaphoreHandle_t xTCPSemaphore;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
#ifdef I2CHIP_WINDOW\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 ) /* Fosc / 2 */\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( 105 )\r
\r
/* Brief delay to permit the LCD to catch up with commands. */\r
#define lcdVERY_SHORT_DELAY ( 1 )\r
-#define lcdSHORT_DELAY ( 4 / portTICK_RATE_MS )\r
-#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS )\r
+#define lcdSHORT_DELAY ( 4 / portTICK_PERIOD_MS )\r
+#define lcdLONG_DELAY ( 15 / portTICK_PERIOD_MS )\r
\r
/* LCD commands. */\r
#define lcdCLEAR ( 0x01 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+QueueHandle_t xLCDQueue;\r
\r
static void prvLCDCommand( char cCommand );\r
static void prvLCDData( char cChar );\r
\r
/*-----------------------------------------------------------*/\r
\r
-xQueueHandle xStartLCDTask( void )\r
+QueueHandle_t xStartLCDTask( void )\r
{\r
/* Create the queue used by the LCD task. Messages for display on the LCD\r
are received via this queue. */\r
\r
/* Create the task that will control the LCD. Returned is a handle to the queue\r
on which messages to get written to the LCD should be written. */\r
-xQueueHandle xStartLCDTask( void );\r
+QueueHandle_t xStartLCDTask( void );\r
\r
typedef struct\r
{\r
/* The minimum amount of time the message should remain on the LCD without\r
being overwritten. */\r
- portTickType xMinDisplayTime;\r
+ TickType_t xMinDisplayTime;\r
\r
/* A pointer to the string to be displayed. */\r
char *pcMessage;\r
#define mainCHECK_TAKS_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )\r
\r
/* The execution period of the check task. */\r
-#define mainCHECK_TASK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainCHECK_TASK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
\r
/* The number of flash co-routines to create. */\r
#define mainNUM_FLASH_COROUTINES ( 5 )\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
static void vCheckTask( void *pvParameters )\r
{\r
/* Used to wake the task at the correct frequency. */\r
-portTickType xLastExecutionTime;\r
+TickType_t xLastExecutionTime;\r
\r
/* The maximum jitter time measured by the fast interrupt test. */\r
extern unsigned short usMaxJitter ;\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
\r
static portBASE_TYPE xTxHasEnded;\r
/*-----------------------------------------------------------*/\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
\r
#ifdef FREERTOS_USED\r
/* The semaphore used by the MACB ISR to wake the MACB task. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
#else\r
static volatile Bool DataToRead = FALSE;\r
#endif\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( 48000000 ) /* Hz clk gen */\r
#define configPBA_CLOCK_HZ ( 24000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 8 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )\r
/* configTOTAL_HEAP_SIZE is not used when heap_3.c is used. */\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL (xQueueHandle)0\r
-#define SYS_SEM_NULL (xSemaphoreHandle)0\r
+#define SYS_MBOX_NULL (QueueHandle_t)0\r
+#define SYS_SEM_NULL (SemaphoreHandle_t)0\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
#endif /* __SYS_RTXC_H__ */\r
\r
low_level_output(struct netif *netif, struct pbuf *p)\r
{\r
struct pbuf *q;\r
-static xSemaphoreHandle xTxSemaphore = NULL;\r
+static SemaphoreHandle_t xTxSemaphore = NULL;\r
err_t xReturn = ERR_OK;\r
\r
/* Parameter not used. */\r
struct pbuf *p = NULL;\r
struct pbuf *q;\r
u16_t len = 0;\r
-static xSemaphoreHandle xRxSemaphore = NULL;\r
+static SemaphoreHandle_t xRxSemaphore = NULL;\r
\r
/* Parameter not used. */\r
( void ) netif;\r
struct timeoutlist\r
{\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
};\r
\r
static struct timeoutlist timeoutlist[SYS_THREAD_MAX];\r
sys_mbox_t\r
sys_mbox_new(void)\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );\r
\r
void\r
sys_mbox_post(sys_mbox_t mbox, void *data)\r
{\r
- xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );\r
+ xQueueSend( mbox, &data, ( TickType_t ) ( archPOST_BLOCK_TIME_MS / portTICK_PERIOD_MS ) );\r
}\r
\r
\r
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)\r
{\r
void *dummyptr;\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_sem_t\r
sys_sem_new(u8_t count)\r
{\r
- xSemaphoreHandle xSemaphore = NULL;\r
+ SemaphoreHandle_t xSemaphore = NULL;\r
\r
portENTER_CRITICAL();\r
vSemaphoreCreateBinary( xSemaphore );\r
u32_t\r
sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)\r
{\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_arch_timeouts(void)\r
{\r
int i;\r
-xTaskHandle pid;\r
+TaskHandle_t pid;\r
struct timeoutlist *tl;\r
\r
pid = xTaskGetCurrentTaskHandle( );\r
*/\r
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio)\r
{\r
-xTaskHandle CreatedTask;\r
+TaskHandle_t CreatedTask;\r
int result = pdFAIL;\r
static int iCall = 0;\r
\r
\r
/* Constants to setup and access the USART. */\r
#define serINVALID_COMPORT_HANDLER ( ( xComPortHandle ) 0 )\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
#define serHANDLE ( ( xComPortHandle ) 1 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Forward declaration. */\r
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength,\r
- xQueueHandle *pxRxedChars,\r
- xQueueHandle *pxCharsForTx );\r
+ QueueHandle_t *pxRxedChars,\r
+ QueueHandle_t *pxCharsForTx );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
volatile avr32_usart_t *usart0 = &AVR32_USART0;\r
\r
/*\r
* Create the rx and tx queues.\r
*/\r
-static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )\r
+static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
#define emacMAX_WAIT_CYCLES ( ( portBASE_TYPE ) ( configTICK_RATE_HZ / 40 ) )\r
\r
/* The time to block waiting for input. */\r
-#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 )\r
+#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 )\r
\r
/* Peripheral setup for the EMAC. */\r
#define emacPERIPHERAL_A_SETUP ( ( unsigned long ) AT91C_PB2_ETX0 ) | \\r
#define emacINTERRUPT_LEVEL ( 5 )\r
#define emacNO_DELAY ( 0 )\r
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )\r
-#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )\r
+#define emacPHY_INIT_DELAY ( 5000 / portTICK_PERIOD_MS )\r
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )\r
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )\r
\r
\r
\r
/* The semaphore used by the EMAC ISR to wake the EMAC task. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/* Holds the index to the next buffer from which data will be read. */\r
static volatile unsigned long ulNextRxBuffer = 0;\r
/*-----------------------------------------------------------*/\r
\r
/* See the header file for descriptions of public functions. */\r
-xSemaphoreHandle xEMACInit( void )\r
+SemaphoreHandle_t xEMACInit( void )\r
{\r
/* Code supplied by Atmel -------------------------------*/\r
\r
* is used by the EMAC ISR to indicate that Rx packets have been received.\r
* If the initialisation fails then NULL is returned.\r
*/\r
-xSemaphoreHandle xEMACInit( void );\r
+SemaphoreHandle_t xEMACInit( void );\r
\r
/*\r
* Send ulLength bytes from pcFrom. This copies the buffer to one of the\r
* files as the driver is compiled to THUMB, and the ISR to ARM. This function\r
* simply passes the semaphore used to communicate between the two.\r
*/\r
-void vPassEMACSemaphore( xSemaphoreHandle xCreatedSemaphore );\r
+void vPassEMACSemaphore( SemaphoreHandle_t xCreatedSemaphore );\r
\r
/* \r
* Called by the Tx interrupt, this function traverses the buffers used to\r
\r
/* The semaphore used to signal the arrival of new data to the interface\r
task. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/* The interrupt entry point is naked so we can control the context saving. */\r
void vEMACISR_Wrapper( void ) __attribute__((naked));\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vPassEMACSemaphore( xSemaphoreHandle xCreatedSemaphore )\r
+void vPassEMACSemaphore( SemaphoreHandle_t xCreatedSemaphore )\r
{\r
/* Simply store the semaphore that should be used by the ISR. */\r
xSemaphore = xCreatedSemaphore;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 110 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 22000 )\r
#include "USB-CDC.h"\r
#include "descriptors.h"\r
\r
-#define usbNO_BLOCK ( ( portTickType ) 0 )\r
+#define usbNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Reset all endpoints */\r
static void prvResetEndPoints( void );\r
static xCONTROL_MESSAGE pxControlRx;\r
\r
/* Queue holding pointers to pending messages */\r
-xQueueHandle xUSBInterruptQueue; \r
+QueueHandle_t xUSBInterruptQueue; \r
\r
/* Queues used to hold received characters, and characters waiting to be\r
transmitted. Rx queue must be larger than FIFO size. */\r
-static xQueueHandle xRxCDC; \r
-static xQueueHandle xTxCDC; \r
+static QueueHandle_t xRxCDC; \r
+static QueueHandle_t xTxCDC; \r
\r
/* Line coding - 115,200 baud, N-8-1 */\r
static const unsigned char pxLineCoding[] = { 0x00, 0xC2, 0x01, 0x00, 0x00, 0x00, 0x08 };\r
vDetachUSBInterface();\r
portEXIT_CRITICAL();\r
\r
- vTaskDelay( portTICK_RATE_MS * 60 );\r
+ vTaskDelay( portTICK_PERIOD_MS * 60 );\r
\r
/* Init USB interface */\r
portENTER_CRITICAL();\r
\r
/* Messages and queue used to communicate between the ISR and the USB task. */\r
static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];\r
-extern xQueueHandle xUSBInterruptQueue;\r
+extern QueueHandle_t xUSBInterruptQueue;\r
/*-----------------------------------------------------------*/\r
\r
/* The ISR can cause a context switch so is declared naked. */\r
#define usbMAX_CONTROL_MESSAGE_SIZE ( 128 )\r
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )\r
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR\r
-#define usbSHORTEST_DELAY ( ( portTickType ) 1 )\r
-#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
-#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )\r
+#define usbSHORTEST_DELAY ( ( TickType_t ) 1 )\r
+#define usbINIT_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS )\r
+#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS )\r
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )\r
#define usbDATA_INC ( ( char ) 5 )\r
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )\r
#include "queue.h"\r
#include "semphr.h"\r
\r
-#define SYS_MBOX_NULL (xQueueHandle)0\r
-#define SYS_SEM_NULL (xSemaphoreHandle)0\r
+#define SYS_MBOX_NULL (QueueHandle_t)0\r
+#define SYS_SEM_NULL (SemaphoreHandle_t)0\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
-typedef xTaskHandle sys_thread_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
+typedef TaskHandle_t sys_thread_t;\r
\r
#endif /* __SYS_RTXC_H__ */\r
\r
struct timeoutlist\r
{\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
};\r
\r
/* This is the number of threads that can be started with sys_thread_new() */\r
sys_mbox_t\r
sys_mbox_new(void)\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );\r
\r
void\r
sys_mbox_post(sys_mbox_t mbox, void *data)\r
{\r
- xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );\r
+ xQueueSend( mbox, &data, ( TickType_t ) ( archPOST_BLOCK_TIME_MS / portTICK_PERIOD_MS ) );\r
}\r
\r
\r
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)\r
{\r
void *dummyptr;\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_sem_t\r
sys_sem_new(u8_t count)\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
portENTER_CRITICAL();\r
vSemaphoreCreateBinary( xSemaphore );\r
u32_t\r
sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)\r
{\r
-portTickType StartTime, EndTime, Elapsed;\r
+TickType_t StartTime, EndTime, Elapsed;\r
\r
StartTime = xTaskGetTickCount();\r
\r
sys_arch_timeouts(void)\r
{\r
int i;\r
-xTaskHandle pid;\r
+TaskHandle_t pid;\r
struct timeoutlist *tl;\r
\r
pid = xTaskGetCurrentTaskHandle( );\r
*/\r
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio)\r
{\r
-xTaskHandle CreatedTask;\r
+TaskHandle_t CreatedTask;\r
int result;\r
static int iCall = 0;\r
\r
static err_t low_level_output( struct netif *netif, struct pbuf *p )\r
{\r
struct pbuf *q;\r
-static xSemaphoreHandle xTxSemaphore = NULL;\r
+static SemaphoreHandle_t xTxSemaphore = NULL;\r
err_t xReturn = ERR_OK;\r
\r
/* Parameter not used. */\r
{\r
struct pbuf *p = NULL, *q;\r
u16_t len = 0;\r
-static xSemaphoreHandle xRxSemaphore = NULL;\r
+static SemaphoreHandle_t xRxSemaphore = NULL;\r
\r
/* Parameter not used. */\r
( void ) netif;\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The rate at which the idle hook sends data to the USB port. */\r
-#define mainUSB_TX_FREQUENCY ( 100 / portTICK_RATE_MS )\r
+#define mainUSB_TX_FREQUENCY ( 100 / portTICK_PERIOD_MS )\r
\r
/* The string that is transmitted down the USB port. */\r
#define mainFIRST_TX_CHAR 'a'\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* The parameters are not used. */\r
( void ) pvParameters;\r
\r
void vApplicationIdleHook( void )\r
{\r
-static portTickType xLastTx = 0;\r
+static TickType_t xLastTx = 0;\r
char cTxByte;\r
\r
/* The idle hook simply sends a string of characters to the USB port.\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configMAX_TASK_NAME_LEN ( 16 )\r
#define STACK_DEFAULT ( 1024 )\r
\r
/* Interval in which tasks are checked. */\r
-#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS )\r
+#define mainCHECK_PERIOD ( ( TickType_t ) 2000 / portTICK_PERIOD_MS )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )\r
portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
unsigned long ulMemCheckTaskRunningCount;\r
- xTaskHandle xCreatedTask;\r
+ TaskHandle_t xCreatedTask;\r
\r
/* The parameters are not used in this function. */\r
( void )pvParameters;\r
#include "semphr.h"\r
\r
/* ------------------------ Defines --------------------------------------- */\r
-#define SYS_MBOX_NULL ( xQueueHandle )0\r
+#define SYS_MBOX_NULL ( QueueHandle_t )0\r
#define SYS_THREAD_NULL NULL\r
-#define SYS_SEM_NULL ( xSemaphoreHandle )0\r
+#define SYS_SEM_NULL ( SemaphoreHandle_t )0\r
#define SIO_FD_NULL ( sio_fd_t )NULL\r
\r
/* ------------------------ Type definitions ------------------------------ */\r
\r
\r
-typedef xSemaphoreHandle sys_sem_t;\r
-typedef xQueueHandle sys_mbox_t;\r
+typedef SemaphoreHandle_t sys_sem_t;\r
+typedef QueueHandle_t sys_mbox_t;\r
typedef void *sys_thread_t;\r
\r
/* ------------------------ Prototypes ------------------------------------ */\r
/* This is the number of threads that can be started with sys_thead_new() */\r
#define SYS_MBOX_SIZE ( 16 )\r
#define MS_TO_TICKS( ms ) \\r
- ( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS )\r
+ ( TickType_t )( ( TickType_t ) ( ms ) / portTICK_PERIOD_MS )\r
#define TICKS_TO_MS( ticks ) \\r
- ( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )\r
+ ( unsigned long )( ( TickType_t ) ( ticks ) * portTICK_PERIOD_MS )\r
#define THREAD_STACK_SIZE ( 1024 )\r
#define THREAD_NAME "lwIP"\r
\r
#define THREAD_INIT( tcb ) \\r
do { \\r
tcb->next = NULL; \\r
- tcb->pid = ( xTaskHandle )0; \\r
+ tcb->pid = ( TaskHandle_t )0; \\r
tcb->timeouts.next = NULL; \\r
} while( 0 )\r
\r
{\r
struct sys_tcb *next;\r
struct sys_timeouts timeouts;\r
- xTaskHandle pid;\r
+ TaskHandle_t pid;\r
} sys_tcb_t;\r
\r
/* ------------------------ Prototypes ------------------------------------ */\r
{\r
sys_tcb_t *current = tasks, *prev;\r
sys_tcb_t *toremove = hdl;\r
- xTaskHandle pid = ( xTaskHandle ) 0;\r
+ TaskHandle_t pid = ( TaskHandle_t ) 0;\r
\r
LWIP_ASSERT( "sys_arch_thread_remove: assertion hdl != NULL failed!", hdl != NULL );\r
\r
* resources.\r
*/\r
vPortExitCritical( );\r
- if( pid != ( xTaskHandle ) 0 )\r
+ if( pid != ( TaskHandle_t ) 0 )\r
{\r
vTaskDelete( pid );\r
/* not reached. */\r
sys_arch_thread_current( void )\r
{\r
sys_tcb_t *p = tasks;\r
- xTaskHandle pid = xTaskGetCurrentTaskHandle( );\r
+ TaskHandle_t pid = xTaskGetCurrentTaskHandle( );\r
\r
vPortEnterCritical( );\r
while( ( p != NULL ) && ( p->pid != pid ) )\r
sys_sem_t\r
sys_sem_new( u8_t count )\r
{\r
- xSemaphoreHandle xSemaphore;\r
+ SemaphoreHandle_t xSemaphore;\r
\r
vSemaphoreCreateBinary( xSemaphore );\r
if( xSemaphore != SYS_SEM_NULL )\r
sys_arch_sem_wait( sys_sem_t sem, u32_t timeout )\r
{\r
portBASE_TYPE xStatus;\r
- portTickType xTicksStart, xTicksEnd, xTicksElapsed;\r
+ TickType_t xTicksStart, xTicksEnd, xTicksElapsed;\r
u32_t timespent;\r
\r
LWIP_ASSERT( "sys_arch_sem_wait: sem != SYS_SEM_NULL", sem != SYS_SEM_NULL );\r
sys_mbox_t\r
sys_mbox_new( void )\r
{\r
- xQueueHandle mbox;\r
+ QueueHandle_t mbox;\r
\r
mbox = xQueueCreate( SYS_MBOX_SIZE, sizeof( void * ) );\r
if( mbox != SYS_MBOX_NULL )\r
{\r
void *ret_msg;\r
portBASE_TYPE xStatus;\r
- portTickType xTicksStart, xTicksEnd, xTicksElapsed;\r
+ TickType_t xTicksStart, xTicksEnd, xTicksElapsed;\r
u32_t timespent;\r
\r
LWIP_ASSERT( "sys_arch_mbox_fetch: mbox != SYS_MBOX_NULL", mbox != SYS_MBOX_NULL );\r
u32_t\r
sys_jiffies( void )\r
{\r
- portTickType xTicks = xTaskGetTickCount( );\r
+ TickType_t xTicks = xTaskGetTickCount( );\r
\r
return ( u32_t )TICKS_TO_MS( xTicks );\r
}\r
typedef struct\r
{\r
portBASE_TYPE xInitialized;\r
- xQueueHandle xRXChars;\r
- xQueueHandle xTXChars;\r
+ QueueHandle_t xRXChars;\r
+ QueueHandle_t xTXChars;\r
} xComPortIF_t;\r
\r
static xComPortIF_t xComPortIF[ COM_NIFACE ];\r
\r
signed portBASE_TYPE\r
xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar,\r
- portTickType xBlockTime )\r
+ TickType_t xBlockTime )\r
{\r
int i;\r
portBASE_TYPE xResult = pdFALSE;\r
\r
signed portBASE_TYPE\r
xSerialPutChar( xComPortHandle pxPort, signed char cOutChar,\r
- portTickType xBlockTime )\r
+ TickType_t xBlockTime )\r
{\r
int i;\r
portBASE_TYPE xResult = pdFALSE;\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 7995392 ) /* Clock setup from main.c in the demo application. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 50 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1800 ) )\r
toggles an LED every three seconds. If an error is discovered in any task the\r
rate is increased to 500 milliseconds. [in this case the '*' characters on the\r
LCD represent LED's]*/\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The constants used in the calculation. */\r
#define intgCONST1 ( ( long ) 123 )\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
\r
/* Cycle for ever, delaying then checking all the other tasks are still\r
operating without error. */\r
#define serTX_AND_RX ( ( unsigned char ) 0x03 )\r
\r
/* Misc. constants. */\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Enable the UART Tx interrupt. */\r
#define vInterruptOn() IFG2 |= UTXIFG1\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars; \r
+static QueueHandle_t xRxedChars; \r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xCharsForTx; \r
\r
static volatile short sTHREEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 7995392 ) /* Clock setup from main.c in the demo application. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 50 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1800 ) )\r
toggles an LED every three seconds. If an error is discovered in any task the\r
rate is increased to 500 milliseconds. [in this case the '*' characters on the \r
LCD represent LED's]*/\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* \r
* The function that implements the Check task. See the comments at the head\r
static void vErrorChecks( void *pvParameters )\r
{\r
static volatile unsigned long ulDummyVariable = 3UL;\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
\r
/* Cycle for ever, delaying then checking all the other tasks are still\r
operating without error. */\r
#define serTX_AND_RX ( ( unsigned char ) 0x03 )\r
\r
/* Misc. constants. */\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Enable the UART Tx interrupt. */\r
#define vInterruptOn() IFG2 |= UTXIFG1\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars; \r
+static QueueHandle_t xRxedChars; \r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xCharsForTx; \r
\r
static volatile short sTHREEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define configUSE_IDLE_HOOK 1\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 7995392 ) /* Clock setup from main.c in the demo application. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 4 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 50 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1700 ) )\r
toggles an LED every three seconds. If an error is discovered in any task the\r
rate is increased to 500 milliseconds. [in this case the '*' characters on the\r
LCD represent LED's]*/\r
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The constants used in the calculation. */\r
#define intgCONST1 ( ( long ) 123 )\r
\r
static portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
\r
/* Cycle for ever, delaying then checking all the other tasks are still\r
operating without error. */\r
#define serTX_AND_RX ( ( unsigned char ) 0x03 )\r
\r
/* Misc. constants. */\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
\r
/* Enable the UART Tx interrupt. */\r
#define vInterruptOn() IFG2 |= UTXIFG1\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
+static QueueHandle_t xRxedChars;\r
\r
/* The queue used to hold characters waiting transmission. */\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xCharsForTx;\r
\r
static volatile short sTHREEmpty;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#define emacINTERRUPT_LEVEL ( 5 )\r
#define emacNO_DELAY ( 0 )\r
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )\r
-#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )\r
+#define emacPHY_INIT_DELAY ( 5000 / portTICK_PERIOD_MS )\r
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )\r
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )\r
\r
const unsigned char ucIPAddress[ 4 ] = { UIP_IPADDR0, UIP_IPADDR1, UIP_IPADDR2, UIP_IPADDR3 };\r
\r
/* The semaphore used by the EMAC ISR to wake the EMAC task. */\r
-static xSemaphoreHandle xSemaphore = NULL;\r
+static SemaphoreHandle_t xSemaphore = NULL;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xSemaphoreHandle xEMACInit( void )\r
+SemaphoreHandle_t xEMACInit( void )\r
{\r
/* Code supplied by Atmel (modified) --------------------*/\r
\r
* is used by the EMAC ISR to indicate that Rx packets have been received.\r
* If the initialisation fails then NULL is returned.\r
*/\r
-xSemaphoreHandle xEMACInit( void );\r
+SemaphoreHandle_t xEMACInit( void );\r
\r
/*\r
* Send the current uIP buffer. This copies the uIP buffer to one of the\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 22000 )\r
\r
/* The rate at which the on board LED will toggle when there is/is not an\r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
\r
/* The LED used by the check task to indicate the system status. */\r
#define mainCHECK_LED ( 3 )\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xLastWakeTime;\r
\r
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()\r
functions correctly. */\r
{\r
/* The semaphore used by the EMAC ISR to indicate that an Rx frame is ready\r
for processing. */\r
-xSemaphoreHandle xSemaphore = NULL;\r
+SemaphoreHandle_t xSemaphore = NULL;\r
portBASE_TYPE xARPTimer;\r
unsigned portBASE_TYPE uxPriority;\r
-static volatile portTickType xStartTime, xCurrentTime;\r
+static volatile TickType_t xStartTime, xCurrentTime;\r
\r
/* Initialize the uIP TCP/IP stack. */\r
uip_init();\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\r
#define configMAX_PRIORITIES ( 5 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
\r
/* The rate at which the on board LED will toggle when there is/is not an \r
error. */\r
-#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )\r
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 )\r
#define mainYELLOW_LED ( 1 << 11 )\r
\r
\r
static void vErrorChecks( void *pvParameters )\r
{\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
\r
/* Cycle for ever, delaying then checking all the other tasks are still\r
operating without error. If an error is detected then the delay period\r
static const struct uip_eth_addr ethaddr = {{0x00,0x00,0xe2,0x58,0xb6,0x6b}};\r
\r
#define BUF ((struct uip_eth_hdr *)&uip_buf[0])\r
-#define uipSHORT_DELAY ( ( portTickType ) 2 / portTICK_RATE_MS )\r
+#define uipSHORT_DELAY ( ( TickType_t ) 2 / portTICK_PERIOD_MS )\r
\r
#ifndef NULL\r
#define NULL (void *)0\r
#endif /* NULL */\r
\r
-static volatile portTickType start, current;\r
+static volatile TickType_t start, current;\r
\r
#define RT_CLOCK_SECOND ( configTICK_RATE_HZ / 2 )\r
\r