diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h index 0788e3044c..9c58b7976d 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h @@ -89,7 +89,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 66000000 ) /* = 66.000MHz clk gen */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c index c312484a2d..77b7327a78 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c @@ -136,8 +136,8 @@ /* The rate at which the on board LED will toggle when there is/is not an error. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 ) /* Constants used by the vMemCheckTask() task. */ @@ -229,9 +229,9 @@ int main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; unsigned long ulMemCheckTaskRunningCount; -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; /* Just to stop compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c index f65af8748f..4c2cae23bc 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c @@ -91,16 +91,16 @@ /* Constants to setup and access the UART. */ #define portUSART0_AIC_CHANNEL ( ( unsigned long ) 2 ) -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -108,7 +108,7 @@ static xQueueHandle xCharsForTx; * The queues are created in serialISR.c as they are used from the ISR. * Obtain references to the queues and THRE Empty flag. */ -extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx ); +extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx ); /*-----------------------------------------------------------*/ @@ -197,7 +197,7 @@ extern void ( vUART_ISR_Wrapper )( void ); } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; @@ -236,7 +236,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { ( void ) pxPort; diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c index a981d744d5..7e3eb6e892 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c @@ -100,8 +100,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -114,7 +114,7 @@ from the wrapper to ensure the correct stack frame is set up. */ void vUART_ISR_Handler( void ) __attribute__ ((noinline)); /*-----------------------------------------------------------*/ -void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx ) +void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx ) { /* Create the queues used to hold Rx and Tx characters. */ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h index bdec146829..1b0c3c7481 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 ) diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c index 96c7b65ed4..35faee2baa 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c @@ -168,9 +168,9 @@ little odd. */ #define usbMAX_TX_MESSAGE_SIZE ( 128 ) #define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff ) #define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR -#define usbSHORTEST_DELAY ( ( portTickType ) 1 ) -#define usbINIT_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) -#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS ) +#define usbSHORTEST_DELAY ( ( TickType_t ) 1 ) +#define usbINIT_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) +#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS ) #define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f ) #define usbDATA_INC ( ( char ) 5 ) #define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 ) @@ -542,7 +542,7 @@ static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ]; static xTX_MESSAGE pxCharsForTx; /* Queue used to pass messages between the ISR and the task. */ -static xQueueHandle xUSBInterruptQueue; +static QueueHandle_t xUSBInterruptQueue; /* ISR entry has to be written in the asm file as we want a context switch to occur from within the ISR. See the port documentation on the FreeRTOS.org diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c index 87b81f8199..5eef851bdd 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c @@ -118,8 +118,8 @@ #define mainUSB_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* Constants required by the 'Check' task. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( 3 ) /* Constants for the ComTest tasks. */ @@ -212,7 +212,7 @@ static void prvSetupHardware( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; /* The parameters are not used in this task. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c index d835777e24..3ebc9b2fdc 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c @@ -88,17 +88,17 @@ #define vInterruptOff() AT91F_US_DisableIt( serCOM0, AT91C_US_TXRDY ) /* Misc constants. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serNO_TIMEGUARD ( ( unsigned long ) 0 ) #define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 ) /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -160,7 +160,7 @@ extern void ( vUART_ISR )( void ); } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -202,7 +202,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h index 7bec8c8e3f..cbf9824832 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c index 514f5452e4..32c277b365 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c @@ -151,9 +151,9 @@ little odd. */ #define usbYDOWN ( 4 ) #define usbMAX_COORD ( 120 ) #define usbMAX_TX_MESSAGE_SIZE ( 128 ) -#define usbSHORTEST_DELAY ( ( portTickType ) 1 ) -#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS ) -#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS ) +#define usbSHORTEST_DELAY ( ( TickType_t ) 1 ) +#define usbINIT_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) +#define usbSHORT_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS ) #define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f ) #define usbDATA_INC ( ( char ) 5 ) #define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 ) @@ -522,7 +522,7 @@ static eDRIVER_STATE eDriverState = eNOTHING; static xTX_MESSAGE pxCharsForTx; /* Queue used to pass messages between the ISR and the task. */ -xQueueHandle xUSBInterruptQueue; +QueueHandle_t xUSBInterruptQueue; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c index 8e5203ad67..362dc1ac9a 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c @@ -109,7 +109,7 @@ void vUSB_ISR_Handler( void ) __attribute__((noinline)); static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ]; /* Queue used to pass messages between the ISR and the task. */ -extern xQueueHandle xUSBInterruptQueue; +extern QueueHandle_t xUSBInterruptQueue; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c index 62ddc193e7..e64ce3719c 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c @@ -203,11 +203,11 @@ static unsigned long ulCallCount = 0, ulErrorFound = pdFALSE; /* The rate at which LED D4 will toggle if an error has been found in one or more of the standard demo tasks. */ -const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS; +const unsigned long ulErrorFlashRate = 500 / portTICK_PERIOD_MS; /* The rate at which LED D4 will toggle if no errors have been found in any of the standard demo tasks. */ -const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS; +const unsigned long ulNoErrorCheckRate = 5000 / portTICK_PERIOD_MS; ulCallCount++; diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c index 5d42f09643..712c5984fa 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c @@ -74,11 +74,11 @@ void vEMACISR_Wrapper( void ) __attribute__((naked)); function to ensure the stack frame is correctly set up. */ void vEMACISR_Handler( void ) __attribute__((noinline)); -static xSemaphoreHandle xEMACSemaphore; +static SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ -void vPassEMACSemaphore( xSemaphoreHandle xSemaphore ) +void vPassEMACSemaphore( SemaphoreHandle_t xSemaphore ) { xEMACSemaphore = xSemaphore; } diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c index ce15f8420f..4ce797b413 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c @@ -109,7 +109,7 @@ one not be immediately available when trying to transmit a frame. */ #define emacINTERRUPT_LEVEL ( 5 ) #define emacNO_DELAY ( 0 ) #define emacTOTAL_FRAME_HEADER_SIZE ( 54 ) -#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS ) +#define emacPHY_INIT_DELAY ( 5000 / portTICK_PERIOD_MS ) #define emacRESET_KEY ( ( unsigned long ) 0xA5000000 ) #define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) ) @@ -191,11 +191,11 @@ const char cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC const unsigned char ucIPAddress[ 4 ] = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 }; /* The semaphore used by the EMAC ISR to wake the EMAC task. */ -static xSemaphoreHandle xSemaphore = NULL; +static SemaphoreHandle_t xSemaphore = NULL; /*-----------------------------------------------------------*/ -xSemaphoreHandle xEMACInit( void ) +SemaphoreHandle_t xEMACInit( void ) { /* Code supplied by Atmel -------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h index 3c3c15e8d9..3fef7a23ae 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h @@ -72,7 +72,7 @@ * is used by the EMAC ISR to indicate that Rx packets have been received. * If the initialisation fails then NULL is returned. */ -xSemaphoreHandle xEMACInit( void ); +SemaphoreHandle_t xEMACInit( void ); /* * Send the current uIP buffer. This copies the uIP buffer to one of the diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c index 4f2d2a8bbb..818c7e68c3 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c @@ -54,13 +54,13 @@ #include "partest.h" /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) /* The semaphore used by the ISR to wake the uIP task. */ -static xSemaphoreHandle xEMACSemaphore; +static SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h index 96cdbb29c5..a416993941 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c index 14ac2729cf..cdec740ed6 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c @@ -167,8 +167,8 @@ /* The rate at which the on board LED will toggle when there is/is not an error. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 ) /* Constants used by the vMemCheckTask() task. */ @@ -253,9 +253,9 @@ int main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; unsigned long ulMemCheckTaskRunningCount; -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; /* The parameters are not used in this function. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c index 25663d8908..00144d5ba7 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c @@ -120,16 +120,16 @@ #define serUART0_VIC_ENABLE ( ( unsigned long ) 0x0020 ) #define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 ) -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -140,7 +140,7 @@ static volatile long *plTHREEmpty; * The queues are created in serialISR.c as they are used from the ISR. * Obtain references to the queues and THRE Empty flag. */ -extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag ); +extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag ); /*-----------------------------------------------------------*/ @@ -200,7 +200,7 @@ extern void ( vUART_ISR_Wrapper )( void ); } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; @@ -239,7 +239,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c index fe665bcbbb..84f16b8c5c 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c @@ -98,8 +98,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static volatile long lTHREEmpty; /*-----------------------------------------------------------*/ @@ -108,7 +108,7 @@ static volatile long lTHREEmpty; * The queues are created in serialISR.c as they are used from the ISR. * Obtain references to the queues and THRE Empty flag. */ -void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag ); +void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag ); /* UART0 interrupt service routine entry point. */ void vUART_ISR_Wrapper( void ) __attribute__ ((naked)); @@ -117,8 +117,8 @@ void vUART_ISR_Wrapper( void ) __attribute__ ((naked)); void vUART_ISR_Handler( void ) __attribute__ ((noinline)); /*-----------------------------------------------------------*/ -void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, - xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag ) +void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, + QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag ) { /* Create the queues used to hold Rx and Tx characters. */ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h index ff599204ea..3d47676120 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 ) diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c index ddeddd544d..ce4a6d983d 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c @@ -117,8 +117,8 @@ #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* Constants required by the 'Check' task. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( 7 ) /* Constants for the ComTest tasks. */ @@ -244,7 +244,7 @@ static void prvSetupHardware( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; /* The parameters are not used in this task. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c index f4859f8e5a..3354cdf989 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c @@ -105,16 +105,16 @@ #define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f ) /* Misc. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static volatile long lTHREEmpty = pdFALSE; /*-----------------------------------------------------------*/ @@ -187,7 +187,7 @@ extern void ( vSerialISREntry) ( void ); } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; @@ -226,7 +226,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h index 0ca70d137d..dc33d95222 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 13 * 1024 ) diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c index a8612fa1b8..8b5b541f4d 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c @@ -133,8 +133,8 @@ indicate whether an error has been detected or not. If the LED toggles every 3 seconds then no errors have been detected. If the rate increases to 500ms then an error has been detected in at least one of the demo application tasks. */ #define mainCHECK_LED ( 7 ) -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ @@ -201,7 +201,7 @@ int main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; /* Parameters are not used. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c index b46a47d91e..90f3f5f566 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c @@ -100,9 +100,9 @@ #define serU1VIC_ENABLE ( ( unsigned long ) 0x0020 ) /* Misc. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /* Constant to access the VIC. */ #define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 ) @@ -131,8 +131,8 @@ void vUART_ISRHandler( void ); /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Communication flag between the interrupt service routine and serial API. */ static volatile long lTHREEmpty; @@ -197,7 +197,7 @@ xComPortHandle xReturn = serHANDLE; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; @@ -236,7 +236,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h index 079ac91046..c144a12583 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h @@ -96,7 +96,7 @@ /* In this case configCPU_CLOCK_HZ is actually set to the pclk frequency, not the CPU frequency. */ #define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c index 1da61e00e6..f3d797b26b 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c @@ -125,12 +125,12 @@ /* Demo application definitions. */ #define mainQUEUE_SIZE ( 3 ) -#define mainLED_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) -#define mainERROR_LED_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS ) -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainLED_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) +#define mainERROR_LED_DELAY ( ( TickType_t ) 50 / portTICK_PERIOD_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainLIST_BUFFER_SIZE 2048 #define mainNO_DELAY ( 0 ) -#define mainSHORT_DELAY ( 150 / portTICK_RATE_MS ) +#define mainSHORT_DELAY ( 150 / portTICK_PERIOD_MS ) /* Task priorities. */ #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -144,15 +144,15 @@ /* The semaphore used to wake the button task from within the external interrupt handler. */ -xSemaphoreHandle xButtonSemaphore; +SemaphoreHandle_t xButtonSemaphore; /* The queue that is used to send message to vPrintTask for display in the terminal output window. */ -xQueueHandle xPrintQueue; +QueueHandle_t xPrintQueue; /* The rate at which the LED will toggle. The toggle rate increases if an error is detected in any task. */ -static portTickType xLED_Delay = mainLED_DELAY; +static TickType_t xLED_Delay = mainLED_DELAY; /*-----------------------------------------------------------*/ /* @@ -261,7 +261,7 @@ static void vLEDTask( void *pvParameters ) static void vCheckTask( void *pvParameters ) { portBASE_TYPE xErrorOccurred = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; const char * const pcPassMessage = "PASS\n"; const char * const pcFailMessage = "FAIL\n"; @@ -402,7 +402,7 @@ extern void (vButtonISRWrapper) ( void ); } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* Check pcTaskName for the name of the offending task, or pxCurrentTCB if pcTaskName has itself been corrupted. */ diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c index 0efb235dcb..d25dc6645a 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c @@ -79,7 +79,7 @@ void vButtonHandler( void ) __attribute__ ((noinline)); void vButtonHandler( void ) { -extern xSemaphoreHandle xButtonSemaphore; +extern SemaphoreHandle_t xButtonSemaphore; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; xSemaphoreGiveFromISR( xButtonSemaphore, &xHigherPriorityTaskWoken ); diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/threads.js b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/threads.js index 3c23f1b231..0a052c2f02 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/threads.js +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/threads.js @@ -49,7 +49,7 @@ function add_list(list, state) for (i = 0; i < list.uxNumberOfItems; i++) { - item = Debug.evaluate("*(xListItem *)" + index); + item = Debug.evaluate("*(ListItem_t *)" + index); task = item ? item.pvOwner : 0; diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h index 3f9090c80c..56453917a3 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -95,7 +95,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 104 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c index ad0d4e529c..d723b37d80 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c @@ -105,7 +105,7 @@ /* Demo application definitions. */ #define mainQUEUE_SIZE ( 3 ) -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 6 ) /* Task priorities. */ @@ -152,7 +152,7 @@ static void vLCDTask( void *pvParameters ); static void prvSetupHardware( void ); /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c index 6d7b553108..8140babcd2 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c @@ -8,7 +8,7 @@ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); /* The handler that does the actual work. */ void vEMAC_ISR_Handler( void ) __attribute__((noinline)); -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; void vEMAC_ISR_Handler( void ) diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/emac.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/emac.c index 98db4f2655..294cfb1458 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/emac.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/emac.c @@ -23,7 +23,7 @@ #include "emac.h" /* The semaphore used to wake the uIP task when data arives. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; static unsigned short *rptr; static unsigned short *tptr; diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c index 488177ac1b..f97daccb20 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c @@ -127,7 +127,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ @@ -285,7 +285,7 @@ void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLeng { char *c, *pcText; static char cMessageForDisplay[ 32 ]; -extern xQueueHandle xLCDQueue; +extern QueueHandle_t xLCDQueue; xLCDMessage xLCDMessage; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h index 9cfbc93fb0..2ed7996d4e 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h @@ -97,7 +97,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 57600000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) ) diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c index cd9944b263..7071e6618e 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c @@ -85,7 +85,7 @@ /* Demo application definitions. */ #define mainQUEUE_SIZE ( 3 ) -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 ) /* Task priorities. */ @@ -124,7 +124,7 @@ extern void vuIP_Task( void *pvParameters ); static void vLCDTask( void *pvParameters ); /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -170,7 +170,7 @@ int main (void) static void vCheckTask( void *pvParameters ) { portBASE_TYPE xErrorOccurred = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; unsigned portBASE_TYPE uxColumn = 0; xLCDMessage xMessage; diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/EMAC_ISR.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/EMAC_ISR.c index 10a6e5bcc8..7d8620fe8c 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/EMAC_ISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/EMAC_ISR.c @@ -9,7 +9,7 @@ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); separate to the wrapper to ensure the correct stack frame is set up. */ void vEMAC_ISR_Handler( void ) __attribute__((noinline)); -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; void vEMAC_ISR_Handler( void ) { diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/emac.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/emac.c index 1b134fd7f9..a5a4644746 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/emac.c @@ -23,7 +23,7 @@ #include "emac.h" /* The semaphore used to wake the uIP task when data arives. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; static unsigned short *rptr; static unsigned short *tptr; diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c index 0a93b786c4..8657459eb7 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c @@ -127,7 +127,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ @@ -296,7 +296,7 @@ void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLeng { char *c, *pcText; static char cMessageForDisplay[ 32 ]; -extern xQueueHandle xLCDQueue; +extern QueueHandle_t xLCDQueue; xLCDMessage xLCDMessage; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h index b017b21f75..bdc5d1f1a2 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 20480 ) diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c index 478ac6401b..d7764b1bb8 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c @@ -116,8 +116,8 @@ #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* Constants required by the 'Check' task. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( 4 ) /* Constants for the ComTest tasks. */ @@ -200,8 +200,8 @@ static void prvSetupHardware( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; -portTickType xLastWakeTime; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xLastWakeTime; /* The parameters are not used in this task. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c index 902de03ce9..9fbf402db8 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c @@ -82,8 +82,8 @@ #define UART0_Rx_Pin ( 0x0001<< 8 ) #define UART0_Tx_Pin ( 0x0001<< 9 ) -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /* Macros to turn on and off the Tx empty interrupt. */ #define serINTERRUPT_ON() UART0->IER |= UART_TxHalfEmpty @@ -93,8 +93,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -155,7 +155,7 @@ xComPortHandle xReturn; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -197,7 +197,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h index d64c1f05f0..9f8d916714 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* Timer clock. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 12800 ) diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c index 3c98baf5e2..921fc2b316 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c @@ -168,7 +168,7 @@ static void vPrintTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to communicate with the LCD print task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -206,7 +206,7 @@ int main( void ) static void vCheckTask( void *pvParameters ) { static unsigned long ulErrorDetected = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; unsigned char *ucErrorMessage = ( unsigned char * )" FAIL"; unsigned char *ucSuccessMessage = ( unsigned char * )" PASS"; unsigned portBASE_TYPE uxColumn = mainMAX_WRITE_COLUMN; diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c index c23f4b2405..43db30dd19 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c @@ -89,15 +89,15 @@ /* Demo application includes. */ #include "serial.h" -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static volatile portBASE_TYPE xQueueEmpty = pdTRUE; @@ -105,7 +105,7 @@ static volatile portBASE_TYPE xQueueEmpty = pdTRUE; /* The interrupt service routine - called from the assembly entry point. */ void vSerialISR( void ); -void vConfigureQueues( xQueueHandle xQForRx, xQueueHandle xQForTx, volatile portBASE_TYPE *pxEmptyFlag ); +void vConfigureQueues( QueueHandle_t xQForRx, QueueHandle_t xQForTx, volatile portBASE_TYPE *pxEmptyFlag ); /*-----------------------------------------------------------*/ @@ -181,7 +181,7 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -223,7 +223,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c index 17c6ac8eba..3c61f420f2 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c @@ -78,11 +78,11 @@ #include "FreeRTOS.h" #include "queue.h" -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static portBASE_TYPE volatile *pxQueueEmpty; -void vConfigureQueues( xQueueHandle xQForRx, xQueueHandle xQForTx, portBASE_TYPE volatile *pxEmptyFlag ) +void vConfigureQueues( QueueHandle_t xQForRx, QueueHandle_t xQForTx, portBASE_TYPE volatile *pxEmptyFlag ) { xRxedChars = xQForRx; xCharsForTx = xQForTx; diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h index 8a6dd7183e..e31ef2d3b9 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* Timer clock. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 12800 ) diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c index a59ba97faa..6899893cc3 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c @@ -168,7 +168,7 @@ static void vPrintTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to communicate with the LCD print task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -205,7 +205,7 @@ void main( void ) static void vCheckTask( void *pvParameters ) { static unsigned long ulErrorDetected = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; unsigned char *cErrorMessage = " FAIL"; unsigned char *cSuccessMessage = " PASS"; unsigned portBASE_TYPE uxColumn = mainMAX_WRITE_COLUMN; diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c index e33a0fa7cf..a7c1bcf42c 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c @@ -80,15 +80,15 @@ /* Demo application includes. */ #include "serial.h" -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static volatile portBASE_TYPE xQueueEmpty = pdTRUE; @@ -168,7 +168,7 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -210,7 +210,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h index 76f228555b..df013aeeed 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) BOARD_MCK ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 190 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c index 73b1481277..5f6f588813 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c @@ -111,8 +111,8 @@ #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY ) /* The period of the check task both in and out of the presense of an error. */ -#define mainNO_ERROR_PERIOD ( 5000 / portTICK_RATE_MS ) -#define mainERROR_PERIOD ( 500 / portTICK_RATE_MS ); +#define mainNO_ERROR_PERIOD ( 5000 / portTICK_PERIOD_MS ) +#define mainERROR_PERIOD ( 500 / portTICK_PERIOD_MS ); /* Constants used by the ComTest task. */ #define mainCOM_TEST_BAUD_RATE ( 38400 ) @@ -167,7 +167,7 @@ int main() static void prvCheckTask( void * pvParameters ) { -portTickType xNextWakeTime, xPeriod = mainNO_ERROR_PERIOD; +TickType_t xNextWakeTime, xPeriod = mainNO_ERROR_PERIOD; static volatile unsigned long ulErrorCode = 0UL; /* Just to remove the compiler warning. */ diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c index 7a7fff6455..5519639c06 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c @@ -93,17 +93,17 @@ #define vInterruptOff() serCOM0->US_IDR = AT91C_US_TXRDY /* Misc constants. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serNO_TIMEGUARD ( ( unsigned long ) 0 ) #define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 ) /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -157,7 +157,7 @@ xComPortHandle xReturn = serHANDLE; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -199,7 +199,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Just to remove compiler warning. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h index 8bbf6f7bd7..fb61cbeaef 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h @@ -92,7 +92,7 @@ #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 96000000 ) #define configCPU_PERIPH_HZ ( ( unsigned long ) 48000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 52000 ) diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/Library/source/91x_enet.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/Library/source/91x_enet.c index 8dc5cae289..5c2f310787 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/Library/source/91x_enet.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/Library/source/91x_enet.c @@ -400,12 +400,12 @@ void ENET_Init () ENET_MIIWriteReg(0x0,MAC_MII_REG_XCR, 0x8000); /* Delay to assure PHY reset */ - vTaskDelay( 3000 / portTICK_RATE_MS ); + vTaskDelay( 3000 / portTICK_PERIOD_MS ); /* initialize the opearting mode */ while( ENET_SetOperatingMode() == pdFAIL ) { - vTaskDelay( 3000 / portTICK_RATE_MS ); + vTaskDelay( 3000 / portTICK_PERIOD_MS ); } /*set MAC physical*/ diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c index 0fb46cd506..dfafee01a2 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/api/sys_arch.c @@ -45,7 +45,7 @@ struct timeoutlist { struct sys_timeouts timeouts; - xTaskHandle pid; + TaskHandle_t pid; }; /* This is the number of threads that can be started with sys_thread_new() */ @@ -62,7 +62,7 @@ static sys_arch_state_t s_sys_arch_state; sys_mbox_t sys_mbox_new(void) { - xQueueHandle mbox; + QueueHandle_t mbox; mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) ); @@ -92,7 +92,7 @@ sys_mbox_free(sys_mbox_t mbox) void sys_mbox_post(sys_mbox_t mbox, void *data) { - xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) ); + xQueueSend( mbox, &data, ( TickType_t ) ( archPOST_BLOCK_TIME_MS / portTICK_PERIOD_MS ) ); } @@ -115,7 +115,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data) u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout) { void *dummyptr; -portTickType StartTime, EndTime, Elapsed; +TickType_t StartTime, EndTime, Elapsed; StartTime = xTaskGetTickCount(); @@ -164,7 +164,7 @@ portTickType StartTime, EndTime, Elapsed; sys_sem_t sys_sem_new(u8_t count) { - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; portENTER_CRITICAL(); vSemaphoreCreateBinary( xSemaphore ); @@ -203,7 +203,7 @@ sys_sem_new(u8_t count) u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout) { -portTickType StartTime, EndTime, Elapsed; +TickType_t StartTime, EndTime, Elapsed; StartTime = xTaskGetTickCount(); @@ -296,7 +296,7 @@ struct sys_timeouts * sys_arch_timeouts(void) { int i; -xTaskHandle pid; +TaskHandle_t pid; struct timeoutlist *tl; pid = xTaskGetCurrentTaskHandle( ); @@ -326,7 +326,7 @@ struct timeoutlist *tl; */ sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio) { -xTaskHandle CreatedTask; +TaskHandle_t CreatedTask; int result; result = xTaskCreate(thread, s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask ); diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/arch/sys_arch.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/arch/sys_arch.h index 78670d2ccb..890ac76059 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/arch/sys_arch.h +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/arch/sys_arch.h @@ -37,13 +37,13 @@ #include "queue.h" #include "semphr.h" -#define SYS_MBOX_NULL (xQueueHandle)0 -#define SYS_SEM_NULL (xSemaphoreHandle)0 +#define SYS_MBOX_NULL (QueueHandle_t)0 +#define SYS_SEM_NULL (SemaphoreHandle_t)0 #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE -typedef xSemaphoreHandle sys_sem_t; -typedef xQueueHandle sys_mbox_t; -typedef xTaskHandle sys_thread_t; +typedef SemaphoreHandle_t sys_sem_t; +typedef QueueHandle_t sys_mbox_t; +typedef TaskHandle_t sys_thread_t; typedef struct _sys_arch_state_t { diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h index 2ed123e2e4..99c00258cf 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h @@ -77,7 +77,7 @@ #define webHTTP_PORT ( 80 ) /* Delay on close error. */ -#define webSHORT_DELAY ( 10 / portTICK_RATE_MS ) +#define webSHORT_DELAY ( 10 / portTICK_PERIOD_MS ) /* The IP address being used. */ #define emacIPADDR0 172 diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c index 5dbd0452c0..900749d97e 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/netif/ethernetif.c @@ -58,7 +58,7 @@ #define IFNAME1 'm' /* The time to block waiting for input. */ -#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 ) +#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 ) /* Interrupt status bit definition. */ #define DMI_RX_CURRENT_DONE 0x8000 @@ -68,7 +68,7 @@ extern u8 TxBuff[1520]; static u8_t s_rxBuff[1520]; /* The semaphore used by the ISR to wake the lwIP task. */ -static xSemaphoreHandle s_xSemaphore = NULL; +static SemaphoreHandle_t s_xSemaphore = NULL; struct ethernetif { struct eth_addr *ethaddr; @@ -146,7 +146,7 @@ static void low_level_init(struct netif *netif) static err_t low_level_output(struct netif *netif, struct pbuf *p) { - static xSemaphoreHandle xTxSemaphore = NULL; + static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; u32_t l = 0; @@ -199,7 +199,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) static struct pbuf * low_level_input(struct netif *netif) { - static xSemaphoreHandle xRxSemaphore = NULL; + static SemaphoreHandle_t xRxSemaphore = NULL; struct pbuf *p, *q; u16_t len, l; diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c index 8ced8145f2..6f413a9ec3 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c @@ -143,9 +143,9 @@ #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY ) /* Delays used by the various tasks defined in this file. */ -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainSTRING_WRITE_DELAY ( 500 / portTICK_RATE_MS ) -#define mainLCD_DELAY ( 20 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainSTRING_WRITE_DELAY ( 500 / portTICK_PERIOD_MS ) +#define mainLCD_DELAY ( 20 / portTICK_PERIOD_MS ) /* Constants for the ComTest tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 ) @@ -205,7 +205,7 @@ static void prvLCDMessageTask( void * pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to pass messages to the LCD task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /* Error status flag. */ static unsigned long ulErrorFlags = 0; @@ -314,7 +314,7 @@ static void vErrorChecks( void *pvParameters ) static char cCheckVal[ mainMAX_FLAG_STRING_LEN ]; char *pcFlagString; xLCDMessage xMessageToSend; -portTickType xLastWakeTime; +TickType_t xLastWakeTime; char *pcStringsToDisplay[] = { "Check status flag" }; @@ -406,7 +406,7 @@ static void prvCheckOtherTasksAreStillRunning( void ) static void prvLCDMessageTask( void * pvParameters ) { -xQueueHandle *pxLCDQueue; +QueueHandle_t *pxLCDQueue; xLCDMessage xMessageToSend; portBASE_TYPE xIndex = 0; @@ -423,7 +423,7 @@ char *pcStringsToDisplay[] = { /* To test the parameter passing mechanism, the queue on which messages are posted is passed in as a parameter even though it is available as a file scope variable anyway. */ - pxLCDQueue = ( xQueueHandle * ) pvParameters; + pxLCDQueue = ( QueueHandle_t * ) pvParameters; for( ;; ) { @@ -452,14 +452,14 @@ char *pcStringsToDisplay[] = { void prvLCDTask( void * pvParameters ) { -xQueueHandle *pxLCDQueue; +QueueHandle_t *pxLCDQueue; xLCDMessage xReceivedMessage; char *pcString; /* To test the parameter passing mechanism, the queue on which messages are received is passed in as a parameter even though it is available as a file scope variable anyway. */ - pxLCDQueue = ( xQueueHandle * ) pvParameters; + pxLCDQueue = ( QueueHandle_t * ) pvParameters; LCD_Init(); diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c index 59710a0889..9e219d2374 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c @@ -80,9 +80,9 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) -#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) +#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS ) /* Interrupt and status bit definitions. */ #define mainTXRIS 0x20 @@ -92,11 +92,11 @@ /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /* The semaphore used to wake a task waiting for space to become available in the FIFO. */ -static xSemaphoreHandle xTxFIFOSemaphore; +static SemaphoreHandle_t xTxFIFOSemaphore; /*-----------------------------------------------------------*/ @@ -198,7 +198,7 @@ GPIO_InitTypeDef GPIO_InitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -240,7 +240,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c index 6852a9946a..ef2d4a55b9 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c @@ -119,7 +119,7 @@ #define uipDMI_RX_CURRENT_DONE 0x8000 /* If no buffers are available, then wait this long before looking again. */ -#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_RATE_MS ) +#define uipBUFFER_WAIT_DELAY ( 10 / portTICK_PERIOD_MS ) #define uipBUFFER_WAIT_ATTEMPTS ( 10 ) /* Standard constant. */ @@ -151,7 +151,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xSemaphore = NULL; +SemaphoreHandle_t xSemaphore = NULL; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/AVR32_UC3/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR32_UC3/FreeRTOSConfig.h index 8eac227558..830bcf65ba 100644 --- a/FreeRTOS/Demo/AVR32_UC3/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/AVR32_UC3/FreeRTOSConfig.h @@ -63,7 +63,7 @@ #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( FOSC0 ) /* Hz clk gen */ #define configPBA_CLOCK_HZ ( FOSC0 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 8 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* configTOTAL_HEAP_SIZE is not used when heap_3.c is used. */ diff --git a/FreeRTOS/Demo/AVR32_UC3/main.c b/FreeRTOS/Demo/AVR32_UC3/main.c index e11e7453ec..fb8324521b 100644 --- a/FreeRTOS/Demo/AVR32_UC3/main.c +++ b/FreeRTOS/Demo/AVR32_UC3/main.c @@ -148,11 +148,11 @@ #define mainERROR_LED ( 7 ) //! The period between executions of the check task. -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) //! If an error is detected in a task, the vErrorChecks task will enter in an //! infinite loop flashing the LED at this rate. -#define mainERROR_FLASH_RATE ( (portTickType) 500 / portTICK_RATE_MS ) +#define mainERROR_FLASH_RATE ( (TickType_t) 500 / portTICK_PERIOD_MS ) /*! \name Constants used by the vMemCheckTask() task. */ @@ -246,7 +246,7 @@ static void vErrorChecks( void *pvParameters ) { static volatile unsigned long ulDummyVariable = 3UL; unsigned long ulMemCheckTaskRunningCount; -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; portBASE_TYPE bSuicidalTask = 0; /* The parameters are not used. Prevent compiler warnings. */ diff --git a/FreeRTOS/Demo/AVR32_UC3/serial/serial.c b/FreeRTOS/Demo/AVR32_UC3/serial/serial.c index 77c89180bf..4f872a6a9a 100644 --- a/FreeRTOS/Demo/AVR32_UC3/serial/serial.c +++ b/FreeRTOS/Demo/AVR32_UC3/serial/serial.c @@ -59,23 +59,23 @@ /* Constants to setup and access the USART. */ #define serINVALID_COMPORT_HANDLER ( ( xComPortHandle ) 0 ) -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ /* Forward declaration. */ static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, - xQueueHandle *pxRxedChars, - xQueueHandle *pxCharsForTx ); + QueueHandle_t *pxRxedChars, + QueueHandle_t *pxCharsForTx ); /*-----------------------------------------------------------*/ @@ -290,7 +290,7 @@ int cd; /* USART Clock Divider. */ } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; @@ -328,7 +328,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { volatile avr32_usart_t *usart = serialPORT_USART; @@ -359,7 +359,7 @@ void vSerialClose( xComPortHandle xPort ) /* * Create the rx and tx queues. */ -static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx ) +static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx ) { /* Create the queues used to hold Rx and Tx characters. */ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h index 33f4ecc5f7..f11eb93e8b 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h @@ -86,7 +86,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 ) #define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) ) diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c index a12b2e26ea..0050f089a9 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c @@ -101,7 +101,7 @@ Changes from V1.2.5 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. Changes from V2.2.0 @@ -160,7 +160,7 @@ again. */ #define mainCHECK_TASK_LED ( 7 ) /* The period between executions of the check task. */ -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) /* An address in the EEPROM used to count resets. This is used to check that the demo application is not unexpectedly resetting. */ diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c index 9e11f837d9..72f6e2c925 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c @@ -85,8 +85,8 @@ #define serUCSRC_SELECT ( ( unsigned char ) 0x80 ) #define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 ) -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; #define vInterruptOn() \ { \ @@ -147,7 +147,7 @@ unsigned char ucByte; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -162,7 +162,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Return false if after the block time there is no room on the Tx queue. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h index 1bcd3e71b0..653487c32d 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 ) #define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) ) diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c index c9a0528b0c..212bd7be68 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c @@ -101,7 +101,7 @@ Changes from V1.2.5 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. Changes from V2.6.1 @@ -157,7 +157,7 @@ again. */ #define mainCHECK_TASK_LED ( 7 ) /* The period between executions of the check task. */ -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) /* An address in the EEPROM used to count resets. This is used to check that the demo application is not unexpectedly resetting. */ diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c index 53760e4ab7..c96d7a9fe3 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c @@ -73,7 +73,7 @@ Changes from V1.2.3 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. + xQueueReceiveFromISR() used in place of xQueueReceive() within the ISR. Changes from V2.6.0 @@ -105,8 +105,8 @@ Changes from V2.6.0 #define serUCSRC_SELECT ( ( unsigned char ) 0x80 ) #define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 ) -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; #define vInterruptOn() \ { \ @@ -167,7 +167,7 @@ unsigned char ucByte; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -185,7 +185,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h index dd0fc1f532..7b9b8c028a 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h @@ -94,7 +94,7 @@ assembly files that include this header file. */ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemFrequency ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/I2C/i2c.h b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/I2C/i2c.h index c26b476d61..6c80cf343d 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/I2C/i2c.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/I2C/i2c.h @@ -331,7 +331,7 @@ typedef struct mss_i2c_instance mss_i2c_slave_wr_handler_t slave_write_handler; /* Used to get access to and wait for completion of an I2C transaction. */ - xSemaphoreHandle xI2CCompleteSemaphore; + SemaphoreHandle_t xI2CCompleteSemaphore; } mss_i2c_instance_t; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c index cd3cfae11a..e3e9af187b 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c @@ -129,8 +129,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -160,16 +160,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* Maintains the current LED output state. */ static volatile unsigned long ulGPIOState = 0UL; @@ -195,7 +195,7 @@ int main(void) if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -214,7 +214,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -256,7 +256,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -355,7 +355,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c index 7b2d73d2a6..bf7bfeb87d 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c @@ -174,8 +174,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -212,19 +212,19 @@ stack than most of the other tasks. */ /* The period at which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the OLED timer will expire. Each time it expires, it's callback function updates the OLED text. */ -#define mainOLED_PERIOD_MS ( 75UL / portTICK_RATE_MS ) +#define mainOLED_PERIOD_MS ( 75UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS ) +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS ) /* The LED will remain on until the button has not been pushed for a full 5000ms. */ -#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* A zero block time. */ #define mainDONT_BLOCK ( 0UL ) @@ -245,12 +245,12 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch the red LED * off. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * This is not a 'standard' partest function, so the prototype is not in @@ -273,15 +273,15 @@ static void prvOLEDTask( void * pvParameters); /*-----------------------------------------------------------*/ /* The queue used by both application specific demo tasks defined in this file. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses prvLEDTimerCallback() as it's callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* The check timer. This uses prvCheckTimerCallback() as it's callback function. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* The status message that is displayed at the bottom of the "task stats" web page, which is served by the uIP task. This will report any errors picked up @@ -357,7 +357,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { /* Check the standard demo tasks are running without error. Latch the latest reported error in the pcStatusMessage character pointer. */ @@ -420,7 +420,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -457,7 +457,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* The timer command queue will have been filled when the timer test tasks @@ -512,7 +512,7 @@ static void prvOLEDTask( void * pvParameters) { static struct oled_data xOLEDData; static unsigned char ucOffset1 = 0, ucOffset2 = 5; -static portTickType xLastScrollTime = 0UL; +static TickType_t xLastScrollTime = 0UL; /* Initialise the display. */ OLED_init(); @@ -580,7 +580,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c index 47b51233e3..3f4058e687 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c @@ -106,7 +106,7 @@ driver to the uIP stack. */ #define uipDONT_BLOCK 0UL /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -136,7 +136,7 @@ static void prvEMACEventListener( unsigned long ulISREvents ); * The callback function that is assigned to both the periodic timer and the * ARP timer. */ -static void prvUIPTimerCallback( xTimerHandle xTimer ); +static void prvUIPTimerCallback( TimerHandle_t xTimer ); /* * Initialise the MAC hardware. @@ -158,7 +158,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The queue used to send TCP/IP events to the uIP stack. */ -xQueueHandle xEMACEventQueue = NULL; +QueueHandle_t xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ @@ -286,7 +286,7 @@ struct uip_eth_addr xAddr; static void prvInitialise_uIP( void ) { uip_ipaddr_t xIPAddr; -xTimerHandle xARPTimer, xPeriodicTimer; +TimerHandle_t xARPTimer, xPeriodicTimer; uip_init(); uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); @@ -301,14 +301,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; /* Create and start the uIP timers. */ xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ - ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); xPeriodicTimer = xTimerCreate( "PeriodicTimer", - ( 500UL / portTICK_RATE_MS ), + ( 500UL / portTICK_PERIOD_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, prvUIPTimerCallback @@ -370,7 +370,7 @@ void vEMACWrite( void ) { const long lMaxAttempts = 10; long lAttempt; -const portTickType xShortDelay = ( 5 / portTICK_RATE_MS ); +const TickType_t xShortDelay = ( 5 / portTICK_PERIOD_MS ); /* Try to send data to the Ethernet. Keep trying for a while if data cannot be sent immediately. Note that this will actually cause the data to be sent @@ -390,7 +390,7 @@ const portTickType xShortDelay = ( 5 / portTICK_RATE_MS ); } /*-----------------------------------------------------------*/ -static void prvUIPTimerCallback( xTimerHandle xTimer ) +static void prvUIPTimerCallback( TimerHandle_t xTimer ) { static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h index 09460f576a..4b466b6484 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h @@ -97,7 +97,7 @@ extern uint32_t SystemFrequency; #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemFrequency ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers/I2C/i2c.h b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers/I2C/i2c.h index c26b476d61..6c80cf343d 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers/I2C/i2c.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers/I2C/i2c.h @@ -331,7 +331,7 @@ typedef struct mss_i2c_instance mss_i2c_slave_wr_handler_t slave_write_handler; /* Used to get access to and wait for completion of an I2C transaction. */ - xSemaphoreHandle xI2CCompleteSemaphore; + SemaphoreHandle_t xI2CCompleteSemaphore; } mss_i2c_instance_t; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c index da00d17831..d061f22693 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c @@ -129,8 +129,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -160,16 +160,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* Maintains the current LED output state. */ static volatile unsigned long ulGPIOState = 0UL; @@ -195,7 +195,7 @@ int main(void) if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -214,7 +214,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -256,7 +256,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -355,7 +355,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c index 09a527babf..a83da7aa17 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c @@ -174,8 +174,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -212,19 +212,19 @@ stack than most of the other tasks. */ /* The period at which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the OLED timer will expire. Each time it expires, it's callback function updates the OLED text. */ -#define mainOLED_PERIOD_MS ( 75UL / portTICK_RATE_MS ) +#define mainOLED_PERIOD_MS ( 75UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS ) +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS ) /* The LED will remain on until the button has not been pushed for a full 5000ms. */ -#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* A zero block time. */ #define mainDONT_BLOCK ( 0UL ) @@ -245,12 +245,12 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch the red LED * off. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * This is not a 'standard' partest function, so the prototype is not in @@ -273,15 +273,15 @@ static void prvOLEDTask( void * pvParameters); /*-----------------------------------------------------------*/ /* The queue used by both application specific demo tasks defined in this file. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses prvLEDTimerCallback() as it's callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* The check timer. This uses prvCheckTimerCallback() as it's callback function. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* The status message that is displayed at the bottom of the "task stats" web page, which is served by the uIP task. This will report any errors picked up @@ -357,7 +357,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { /* Check the standard demo tasks are running without error. Latch the latest reported error in the pcStatusMessage character pointer. */ @@ -420,7 +420,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -457,7 +457,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* The timer command queue will have been filled when the timer test tasks @@ -512,7 +512,7 @@ static void prvOLEDTask( void * pvParameters) { static struct oled_data xOLEDData; static unsigned char ucOffset1 = 0, ucOffset2 = 5; -static portTickType xLastScrollTime = 0UL; +static TickType_t xLastScrollTime = 0UL; /* Initialise the display. */ OLED_init(); @@ -580,7 +580,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c index a405d0218d..541a1178a8 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c @@ -106,7 +106,7 @@ driver to the uIP stack. */ #define uipDONT_BLOCK 0UL /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -136,7 +136,7 @@ static void prvEMACEventListener( unsigned long ulISREvents ); * The callback function that is assigned to both the periodic timer and the * ARP timer. */ -static void prvUIPTimerCallback( xTimerHandle xTimer ); +static void prvUIPTimerCallback( TimerHandle_t xTimer ); /* * Initialise the MAC hardware. @@ -158,7 +158,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The queue used to send TCP/IP events to the uIP stack. */ -xQueueHandle xEMACEventQueue = NULL; +QueueHandle_t xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ @@ -286,7 +286,7 @@ struct uip_eth_addr xAddr; static void prvInitialise_uIP( void ) { uip_ipaddr_t xIPAddr; -xTimerHandle xARPTimer, xPeriodicTimer; +TimerHandle_t xARPTimer, xPeriodicTimer; uip_init(); uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); @@ -301,14 +301,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; /* Create and start the uIP timers. */ xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ - ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); xPeriodicTimer = xTimerCreate( "PeriodicTimer", - ( 500UL / portTICK_RATE_MS ), + ( 500UL / portTICK_PERIOD_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, prvUIPTimerCallback @@ -370,7 +370,7 @@ void vEMACWrite( void ) { const long lMaxAttempts = 10; long lAttempt; -const portTickType xShortDelay = ( 5 / portTICK_RATE_MS ); +const TickType_t xShortDelay = ( 5 / portTICK_PERIOD_MS ); /* Try to send data to the Ethernet. Keep trying for a while if data cannot be sent immediately. Note that this will actually cause the data to be sent @@ -390,7 +390,7 @@ const portTickType xShortDelay = ( 5 / portTICK_RATE_MS ); } /*-----------------------------------------------------------*/ -static void prvUIPTimerCallback( xTimerHandle xTimer ) +static void prvUIPTimerCallback( TimerHandle_t xTimer ) { static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c index 80af07f352..3cc1a562c6 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -141,7 +141,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -181,7 +181,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Remove compiler warning about unused parameter. */ diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h index 1263aca2ff..0b78a05db5 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h @@ -108,7 +108,7 @@ #define configCPU_CLOCK_HZ 100000000UL #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_TICKLESS_IDLE 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configPERIPHERAL_CLOCK_HZ ( 33333000UL ) #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c index dff842fdb5..d876e783df 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c @@ -72,7 +72,7 @@ #define cmdMAX_INPUT_SIZE 50 /* The maximum time in ticks to wait for the UART access mutex. */ -#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS ) +#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c index 6f141e87e0..4638460f25 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c @@ -189,13 +189,13 @@ the COM test tasks, so just set both to invalid values. */ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS ) /* Parameters that are passed into the register check tasks solely for the purpose of ensuring parameters are passed into tasks correctly. */ @@ -346,8 +346,8 @@ void main_full( void ) static void prvCheckTask( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; -portTickType xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; +TickType_t xLastExecutionTime; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; unsigned long ulErrorFound = pdFALSE; @@ -411,7 +411,7 @@ unsigned long ulErrorFound = pdFALSE; ulErrorFound = pdTRUE; } - if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS ) + if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS ) { ulErrorFound = pdTRUE; } diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c index d21cc144ff..151fbc2807 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c @@ -95,8 +95,8 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ @@ -107,8 +107,8 @@ static void prvTXI_Handler( uint32_t ulUnusedParameter ); /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -157,7 +157,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -193,7 +193,7 @@ char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c index ec44110b66..ef98f9f698 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c @@ -119,7 +119,7 @@ static void prvSetupHardware( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /* @@ -175,7 +175,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c index 4837cbc470..a41168dff8 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -141,7 +141,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -181,7 +181,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Remove compiler warning about unused parameter. */ diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h index 06e049af8d..e16c049b3a 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h @@ -110,7 +110,7 @@ #define configCPU_CLOCK_HZ 100000000UL #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_TICKLESS_IDLE 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configPERIPHERAL_CLOCK_HZ ( 33333000UL ) #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c index a6d353fc77..490b638880 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c @@ -293,8 +293,8 @@ void main_full( void ) static void prvCheckTask( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; -portTickType xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; +TickType_t xLastExecutionTime; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; unsigned long ulErrorFound = pdFALSE; @@ -363,7 +363,7 @@ unsigned long ulErrorFound = pdFALSE; ulErrorFound = pdTRUE; } - if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS ) + if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS ) { ulErrorFound = pdTRUE; } diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c index 8a270316f6..01461edba8 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c @@ -178,7 +178,7 @@ XUartPs_Config *pxConfig; } /*-----------------------------------------------------------*/ -BaseType_t xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +BaseType_t xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { BaseType_t xReturn; @@ -213,7 +213,7 @@ const TickType_t xMaxWait = 200UL / portTICK_PERIOD_MS; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Only a single port is supported. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c index 079ba99538..8a4ff180b1 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c @@ -1,343 +1,343 @@ -/* - 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 - -/* 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; -} - - +/* + 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 + +/* 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( TaskHandle_t 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( TaskHandle_t 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; +} + + diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/AT91Lib/components/hx8347/hx8347.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/AT91Lib/components/hx8347/hx8347.c index 6c99d52c06..61d44cbcc6 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/AT91Lib/components/hx8347/hx8347.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/AT91Lib/components/hx8347/hx8347.c @@ -158,7 +158,7 @@ typedef volatile unsigned short REG16; // External delay 1 ms function #include "FreeRTOS.h" #include "task.h" -#define Delay(ms) vTaskDelay(ms/portTICK_RATE_MS) +#define Delay(ms) vTaskDelay(ms/portTICK_PERIOD_MS) //------------------------------------------------------------------------------ // Global functions diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h index 552d70aed5..46caf2daf8 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c index 3e6a8cf5d6..67d8f1167a 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c @@ -123,7 +123,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook). */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The LCD task uses the sprintf function so requires a little more stack too. */ #define mainLCD_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 ) @@ -163,7 +163,7 @@ static void prvLCDTask( void *pvParameters ); * Hook functions that can get called by the kernel. The 'check' functionality * is implemented within the tick hook. */ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); /* * The tick hook function as described in the comments at the top of this file. @@ -177,7 +177,7 @@ void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -280,7 +280,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pxTask; ( void ) pcTaskName; diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c index d907f66bf5..a27dce261d 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c @@ -91,17 +91,17 @@ #define vInterruptOff() BOARD_USART_BASE->US_IDR = AT91C_US_TXRDY /* Misc constants. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serNO_TIMEGUARD ( ( unsigned long ) 0 ) #define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 ) /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -161,7 +161,7 @@ const Pin xUSART_Pins[] = { BOARD_PIN_USART_RXD, BOARD_PIN_USART_TXD }; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -203,7 +203,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c index 0489086632..36417bf953 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -112,16 +112,16 @@ /* The Tx task will transmit the sequence of characters at a pseudo random interval. This is the maximum and minimum block time between sends. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 ) -#define comOFFSET_TIME ( ( portTickType ) 3 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 ) +#define comOFFSET_TIME ( ( TickType_t ) 3 ) /* We should find that each character can be queued for Tx immediately and we don't have to block to send. */ -#define comNO_BLOCK ( ( portTickType ) 0 ) +#define comNO_BLOCK ( ( TickType_t ) 0 ) /* The Rx task will block on the Rx queue for a long period. */ -#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff ) +#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff ) /* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */ #define comFIRST_BYTE ( 'A' ) @@ -158,15 +158,15 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vComTxTask, pvParameters ) { signed char cByteToSend; -portTickType xTimeToWait; +TickType_t xTimeToWait; /* Just to stop compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index a6848d8c92..7f79e9dd3a 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -127,8 +127,8 @@ typedef enum xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ); -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ); -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ); +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ); +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); void vSerialClose( xComPortHandle xPort ); diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h index e9d0fed54a..8076b27392 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h @@ -93,7 +93,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c index 9226187ef9..f977bebdab 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c @@ -112,7 +112,7 @@ extern void main_full( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ @@ -191,7 +191,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c index a84d2e4f10..23615bd62b 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c @@ -119,8 +119,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -149,7 +149,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -186,7 +186,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c index 3c9b36b5bd..6bee2604d8 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c @@ -140,13 +140,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The standard demo flash timers can be used to flash any number of LEDs. In this case, because only three LEDs are available, and one is in use by the @@ -169,13 +169,13 @@ for the comtest, so the LED number is deliberately out of range. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -223,7 +223,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c index a02c7b787a..72ae439cca 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c @@ -90,8 +90,8 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serPMC_USART_ID ( BOARD_ID_USART ) /* The USART supported by this file. */ @@ -104,8 +104,8 @@ /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -169,7 +169,7 @@ const sam_usart_opt_t xUSARTSettings = } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -211,7 +211,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c index 0489086632..36417bf953 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -112,16 +112,16 @@ /* The Tx task will transmit the sequence of characters at a pseudo random interval. This is the maximum and minimum block time between sends. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 ) -#define comOFFSET_TIME ( ( portTickType ) 3 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 ) +#define comOFFSET_TIME ( ( TickType_t ) 3 ) /* We should find that each character can be queued for Tx immediately and we don't have to block to send. */ -#define comNO_BLOCK ( ( portTickType ) 0 ) +#define comNO_BLOCK ( ( TickType_t ) 0 ) /* The Rx task will block on the Rx queue for a long period. */ -#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff ) +#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff ) /* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */ #define comFIRST_BYTE ( 'A' ) @@ -158,15 +158,15 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vComTxTask, pvParameters ) { signed char cByteToSend; -portTickType xTimeToWait; +TickType_t xTimeToWait; /* Just to stop compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index a6848d8c92..7f79e9dd3a 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -127,8 +127,8 @@ typedef enum xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ); -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ); -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ); +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ); +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); void vSerialClose( xComPortHandle xPort ); diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h index e9d0fed54a..8076b27392 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h @@ -93,7 +93,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c index 9226187ef9..f977bebdab 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c @@ -112,7 +112,7 @@ extern void main_full( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ @@ -191,7 +191,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c index a84d2e4f10..23615bd62b 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c @@ -119,8 +119,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -149,7 +149,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -186,7 +186,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c index 3c9b36b5bd..6bee2604d8 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c @@ -140,13 +140,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The standard demo flash timers can be used to flash any number of LEDs. In this case, because only three LEDs are available, and one is in use by the @@ -169,13 +169,13 @@ for the comtest, so the LED number is deliberately out of range. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -223,7 +223,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c index b8fb9ec384..13c4bbf175 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c @@ -90,8 +90,8 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serPMC_USART_ID ( BOARD_ID_USART ) /* The USART supported by this file. */ @@ -104,8 +104,8 @@ /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -169,7 +169,7 @@ const sam_usart_opt_t xUSARTSettings = } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -211,7 +211,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 5093f5d55e..98ca35ac50 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c index 53e2ac62d2..5cca55e05e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c @@ -77,8 +77,8 @@ CY_ISR_PROTO( vUartRxISR ); CY_ISR_PROTO( vUartTxISR ); /*---------------------------------------------------------------------------*/ -static xQueueHandle xSerialTxQueue = NULL; -static xQueueHandle xSerialRxQueue = NULL; +static QueueHandle_t xSerialTxQueue = NULL; +static QueueHandle_t xSerialRxQueue = NULL; /*---------------------------------------------------------------------------*/ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) @@ -122,7 +122,7 @@ unsigned short usIndex = 0; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; @@ -135,7 +135,7 @@ portBASE_TYPE xReturn = pdFALSE; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c index 5d317e048a..b61bc8c38b 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c @@ -94,7 +94,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainCOM_LED ( 3 ) /* The number of nano seconds between each processor clock. */ @@ -221,7 +221,7 @@ extern cyisraddress CyRamVectors[]; void vCheckTask( void *pvParameters ) { unsigned long ulRow = 0; -portTickType xDelay = 0; +TickType_t xDelay = 0; unsigned short usErrorCode = 0; unsigned long ulIteration = 0; extern unsigned short usMaxJitter; @@ -325,7 +325,7 @@ extern unsigned short usMaxJitter; } /*---------------------------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* The stack space has been execeeded for a task, considering allocating more. */ taskDISABLE_INTERRUPTS(); diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 5093f5d55e..98ca35ac50 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c index 53e2ac62d2..5cca55e05e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c @@ -77,8 +77,8 @@ CY_ISR_PROTO( vUartRxISR ); CY_ISR_PROTO( vUartTxISR ); /*---------------------------------------------------------------------------*/ -static xQueueHandle xSerialTxQueue = NULL; -static xQueueHandle xSerialRxQueue = NULL; +static QueueHandle_t xSerialTxQueue = NULL; +static QueueHandle_t xSerialRxQueue = NULL; /*---------------------------------------------------------------------------*/ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) @@ -122,7 +122,7 @@ unsigned short usIndex = 0; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; @@ -135,7 +135,7 @@ portBASE_TYPE xReturn = pdFALSE; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c index 5d317e048a..b61bc8c38b 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c @@ -94,7 +94,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainCOM_LED ( 3 ) /* The number of nano seconds between each processor clock. */ @@ -221,7 +221,7 @@ extern cyisraddress CyRamVectors[]; void vCheckTask( void *pvParameters ) { unsigned long ulRow = 0; -portTickType xDelay = 0; +TickType_t xDelay = 0; unsigned short usErrorCode = 0; unsigned long ulIteration = 0; extern unsigned short usMaxJitter; @@ -325,7 +325,7 @@ extern unsigned short usMaxJitter; } /*---------------------------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* The stack space has been execeeded for a task, considering allocating more. */ taskDISABLE_INTERRUPTS(); diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 5093f5d55e..98ca35ac50 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) BCLK__BUS_CLK__HZ ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c index 53e2ac62d2..5cca55e05e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c @@ -77,8 +77,8 @@ CY_ISR_PROTO( vUartRxISR ); CY_ISR_PROTO( vUartTxISR ); /*---------------------------------------------------------------------------*/ -static xQueueHandle xSerialTxQueue = NULL; -static xQueueHandle xSerialRxQueue = NULL; +static QueueHandle_t xSerialTxQueue = NULL; +static QueueHandle_t xSerialRxQueue = NULL; /*---------------------------------------------------------------------------*/ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) @@ -122,7 +122,7 @@ unsigned short usIndex = 0; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; @@ -135,7 +135,7 @@ portBASE_TYPE xReturn = pdFALSE; } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c index 5d317e048a..b61bc8c38b 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c @@ -94,7 +94,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) #define mainCOM_LED ( 3 ) /* The number of nano seconds between each processor clock. */ @@ -221,7 +221,7 @@ extern cyisraddress CyRamVectors[]; void vCheckTask( void *pvParameters ) { unsigned long ulRow = 0; -portTickType xDelay = 0; +TickType_t xDelay = 0; unsigned short usErrorCode = 0; unsigned long ulIteration = 0; extern unsigned short usMaxJitter; @@ -325,7 +325,7 @@ extern unsigned short usMaxJitter; } /*---------------------------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* The stack space has been execeeded for a task, considering allocating more. */ taskDISABLE_INTERRUPTS(); diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h index b3ef182ff5..910c6da80a 100644 --- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( 14000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcd/lcdcontroller.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcd/lcdcontroller.c index 4243484e24..347e986a3e 100644 --- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcd/lcdcontroller.c +++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcd/lcdcontroller.c @@ -535,7 +535,7 @@ void LCD_ScrollText(LCD_TypeDef *lcd, char *scrolltext) { memcpy(buffer, scrolltext + i, 7); LCD_Write(lcd, buffer); - vTaskDelay(100/portTICK_RATE_MS); + vTaskDelay(100/portTICK_PERIOD_MS); } } diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c index 14772d306b..231d6848da 100644 --- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c +++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c @@ -70,9 +70,9 @@ /* Demo includes. */ #include "lcdtest.h" -#define lcdSHORT_DELAY ( 60 / portTICK_RATE_MS ) -#define lcdQUARTER_SECOND ( 250 / portTICK_RATE_MS ) -#define lcdONE_SECOND ( 1000 / portTICK_RATE_MS ) +#define lcdSHORT_DELAY ( 60 / portTICK_PERIOD_MS ) +#define lcdQUARTER_SECOND ( 250 / portTICK_PERIOD_MS ) +#define lcdONE_SECOND ( 1000 / portTICK_PERIOD_MS ) void vLCDTask( void *pvParameters ) { diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c index 8be5bb4f70..987f79ca1d 100644 --- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c +++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c @@ -70,7 +70,7 @@ /* Demo app includes. */ #include "ledtest.h" -#define lLEDOnE_SECOND ( 1000UL / portTICK_RATE_MS ) +#define lLEDOnE_SECOND ( 1000UL / portTICK_PERIOD_MS ) void vLEDTask( void *pvParameters ) { diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c index 4eb0280146..89e72d95c6 100644 --- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c @@ -122,12 +122,12 @@ #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) /* A period of two seconds, adjusted to use the tick frequency. */ -#define mainTWO_SECONDS ( 2000 / portTICK_RATE_MS ) +#define mainTWO_SECONDS ( 2000 / portTICK_PERIOD_MS ) /* The length of the delay between each cycle of the check task when an error has / has not been detected. */ -#define mainNO_ERROR_CHECK_FREQUENCY ( 5000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_FREQUENCY ( 200 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_FREQUENCY ( 5000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_FREQUENCY ( 200 / portTICK_PERIOD_MS ) /* The LED that is toggled by the check task. The rate of the toggle indicates whether or not an error has been found, as defined by the @@ -194,7 +194,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will be called if a task overflows its stack, if configCHECK_FOR_STACK_OVERFLOW != 0. It might be that the function @@ -207,7 +207,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) static void prvCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime, xFrequency = mainNO_ERROR_CHECK_FREQUENCY; +TickType_t xLastExecutionTime, xFrequency = mainNO_ERROR_CHECK_FREQUENCY; long lCount; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h index 238338a101..0d0be92823 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 96000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c index e34e45e21f..d1e7e8b5eb 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c @@ -196,22 +196,22 @@ stack than most of the other tasks. */ /* The period at which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The LED that is turned on by pressing SW2 remains on until the button has not been pushed for a full 5000ms. */ -#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* The period at which the two simple LED flash timers will execute their callback functions. */ -#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) -#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_RATE_MS ) +#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) +#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0UL ) @@ -237,19 +237,19 @@ static void prvCreateDemoSpecificTimers( void ); * The LED/button timer callback function. This does nothing but switch an LED * off. */ -static void prvButtonLEDTimerCallback( xTimerHandle xTimer ); +static void prvButtonLEDTimerCallback( TimerHandle_t xTimer ); /* * The callback function used by both simple LED flash timers. Both timers use * the same callback, so the function parameter is used to determine which LED * should be flashed (effectively to determine which timer has expired). */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Contains the implementation of the web server. @@ -260,15 +260,15 @@ extern void vuIP_Task( void *pvParameters ); /* The LED/Button software timer. This uses prvButtonLEDTimerCallback() as it's callback function. */ -static xTimerHandle xLEDButtonTimer = NULL; +static TimerHandle_t xLEDButtonTimer = NULL; /* The check timer. This uses prvCheckTimerCallback() as its callback function. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* LED timers - these simply flash LEDs, each using a different frequency. Both use the same prvLEDTimerCallback() callback function. */ -static xTimerHandle xLED1Timer = NULL, xLED2Timer = NULL; +static TimerHandle_t xLED1Timer = NULL, xLED2Timer = NULL; /* If an error is detected in a standard demo task, then pcStatusMessage will be set to point to a string that identifies the offending task. This is just @@ -324,7 +324,7 @@ void main( void ) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; @@ -411,7 +411,7 @@ static long lChangedTimerPeriodAlready = pdFALSE; } /*-----------------------------------------------------------*/ -static void prvButtonLEDTimerCallback( xTimerHandle xTimer ) +static void prvButtonLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -419,7 +419,7 @@ static void prvButtonLEDTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { unsigned long ulLED; @@ -535,7 +535,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c index 17353df33f..1864b6c585 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c @@ -128,12 +128,12 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The LED will remain on until the button has not been pushed for a full 5000ms. */ -#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -171,16 +171,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void prvButtonLEDTimerCallback( xTimerHandle xTimer ); +static void prvButtonLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses prvButtonLEDTimerCallback() as its callback function. */ -static xTimerHandle xButtonLEDTimer = NULL; +static TimerHandle_t xButtonLEDTimer = NULL; /*-----------------------------------------------------------*/ @@ -222,7 +222,7 @@ void main( void ) } /*-----------------------------------------------------------*/ -static void prvButtonLEDTimerCallback( xTimerHandle xTimer ) +static void prvButtonLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -259,7 +259,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -340,7 +340,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c index 3309602d25..a9516cc803 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c @@ -122,7 +122,7 @@ static void prvInitialise_uIP( void ); * The callback function that is assigned to both the periodic timer and the * ARP timer. */ -static void prvUIPTimerCallback( xTimerHandle xTimer ); +static void prvUIPTimerCallback( TimerHandle_t xTimer ); /* * Port functions required by the uIP stack. @@ -132,7 +132,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The queue used to send TCP/IP events to the uIP stack. */ -xQueueHandle xEMACEventQueue = NULL; +QueueHandle_t xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ @@ -259,7 +259,7 @@ struct uip_eth_addr xAddr; static void prvInitialise_uIP( void ) { uip_ipaddr_t xIPAddr; -xTimerHandle xARPTimer, xPeriodicTimer; +TimerHandle_t xARPTimer, xPeriodicTimer; uip_init(); uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); @@ -274,14 +274,14 @@ xTimerHandle xARPTimer, xPeriodicTimer; /* Create and start the uIP timers. */ xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ - ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */ pdTRUE, /* Autor-reload. */ ( void * ) uipARP_TIMER, prvUIPTimerCallback ); xPeriodicTimer = xTimerCreate( "PeriodicTimer", - ( 500UL / portTICK_RATE_MS ), + ( 500UL / portTICK_PERIOD_MS ), pdTRUE, /* Autor-reload. */ ( void * ) uipPERIODIC_TIMER, prvUIPTimerCallback @@ -299,7 +299,7 @@ xTimerHandle xARPTimer, xPeriodicTimer; } /*-----------------------------------------------------------*/ -static void prvUIPTimerCallback( xTimerHandle xTimer ) +static void prvUIPTimerCallback( TimerHandle_t xTimer ) { static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c index 17faf17b34..4befd8d99d 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c @@ -78,7 +78,7 @@ #include "net/uip.h" /* The time to wait between attempts to obtain a free buffer. */ -#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS ) +#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS ) /* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving up on attempting to obtain a free buffer all together. */ @@ -95,7 +95,7 @@ more than two. */ #define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS ) /* The time to wait for the Tx descriptor to become free. */ -#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS ) +#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS ) /* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to become free. */ @@ -105,7 +105,7 @@ become free. */ #define emacTX_INTERRUPT_NO ( 76 ) #define emacRX_INTERRUPT_NO ( 77 ) #define emacERROR_INTERRUPT_NO ( 78 ) -#define emacLINK_DELAY ( 500 / portTICK_RATE_MS ) +#define emacLINK_DELAY ( 500 / portTICK_PERIOD_MS ) #define emacPHY_STATUS ( 0x1F ) #define emacPHY_DUPLEX_STATUS ( 4 << 2 ) #define emacPHY_SPEED_STATUS ( 1 << 2 ) @@ -555,7 +555,7 @@ void vEMAC_RxISRHandler( void ) { const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; long lHigherPriorityTaskWoken = pdFALSE; -extern xQueueHandle xEMACEventQueue; +extern QueueHandle_t xEMACEventQueue; /* Clear the interrupt. */ ENET_EIR = ENET_EIR_RXF_MASK; diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h index 04e93be5b2..4599461c2c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c index ab50844e7e..fbcc02509c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c @@ -119,10 +119,10 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -140,9 +140,9 @@ string on UART 0. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define mainOFFSET_TIME ( ( portTickType ) 3 ) +#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define mainOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -244,7 +244,7 @@ static char cNextChar; /* The queue used to transmit characters from the interrupt to the Comms Rx task. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /*-----------------------------------------------------------*/ @@ -430,7 +430,7 @@ static char cRxedChar, cExpectedChar; static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h index b58c698f74..76f328af45 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c index 79f4623332..84307e1cd6 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c @@ -119,10 +119,10 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -144,9 +144,9 @@ string on UART 0. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define mainOFFSET_TIME ( ( portTickType ) 3 ) +#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define mainOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -248,7 +248,7 @@ static char cNextChar; /* The queue used to transmit characters from the interrupt to the Comms Rx task. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /*-----------------------------------------------------------*/ @@ -438,7 +438,7 @@ portBASE_TYPE xResult; static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h index cbe69990f4..beec118f55 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c index ab50844e7e..fbcc02509c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c @@ -119,10 +119,10 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -140,9 +140,9 @@ string on UART 0. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define mainOFFSET_TIME ( ( portTickType ) 3 ) +#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define mainOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -244,7 +244,7 @@ static char cNextChar; /* The queue used to transmit characters from the interrupt to the Comms Rx task. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /*-----------------------------------------------------------*/ @@ -430,7 +430,7 @@ static char cRxedChar, cExpectedChar; static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h index cbe69990f4..beec118f55 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c index 5f1ae02fbd..45857cb5e2 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c @@ -119,10 +119,10 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -140,9 +140,9 @@ string on UART 0. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define mainOFFSET_TIME ( ( portTickType ) 3 ) +#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define mainOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -244,7 +244,7 @@ static char cNextChar; /* The queue used to transmit characters from the interrupt to the Comms Rx task. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /*-----------------------------------------------------------*/ @@ -431,7 +431,7 @@ static char cRxedChar, cExpectedChar; static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h index 030a4a94e4..aeebc22108 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c index e40ddce946..15e0c7da3c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c @@ -119,10 +119,10 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -144,9 +144,9 @@ string on UART 0. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define mainOFFSET_TIME ( ( portTickType ) 3 ) +#define mainMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define mainMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define mainOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -248,7 +248,7 @@ static char cNextChar; /* The queue used to transmit characters from the interrupt to the Comms Rx task. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /*-----------------------------------------------------------*/ @@ -439,7 +439,7 @@ portBASE_TYPE xResult; static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h index 4c277f061e..e79bff6313 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c index e90cab030c..0668a983b4 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c @@ -131,10 +131,10 @@ static volatile portBASE_TYPE uxDelay = 250; /* The queue used to communicate between the I2C interrupt and the I2C co-routine. */ -static xQueueHandle xADCQueue; +static QueueHandle_t xADCQueue; /* The queue used to synchronise the flash co-routines. */ -static xQueueHandle xDelayQueue; +static QueueHandle_t xDelayQueue; /* * Sets up the PLL, I2C and GPIO used by the demo. @@ -156,7 +156,7 @@ unsigned portBASE_TYPE uxCoRoutine; /* Create the queue used to communicate between the ISR and I2C co-routine. This can only ever contain one value. */ - xADCQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( portTickType ) ); + xADCQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( TickType_t ) ); /* Create the queue used to synchronise the flash co-routines. The queue is used to trigger three tasks, but is for synchronisation only and does @@ -207,7 +207,7 @@ static void prvSetupHardware( void ) static void vI2CCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xADCResult; +TickType_t xADCResult; static portBASE_TYPE xResult = 0, xMilliSecs, xLED; crSTART( xHandle ); @@ -225,7 +225,7 @@ static portBASE_TYPE xResult = 0, xMilliSecs, xLED; /* Scale the result to give a useful range of values for a visual demo. */ xADCResult >>= 2; - xMilliSecs = xADCResult / portTICK_RATE_MS; + xMilliSecs = xADCResult / portTICK_PERIOD_MS; /* The delay is split between the four co-routines so they remain in synch. */ @@ -275,7 +275,7 @@ portBASE_TYPE xResult, xNothing; void vI2C_ISR(void) { -static portTickType xReading; +static TickType_t xReading; /* Clear the interrupt. */ I2CMasterIntClear( I2C_MASTER_BASE ); diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h index 0e2cde9c90..ed48e3e676 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3000 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c index fe22b845d3..b63bbffcbb 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c @@ -108,9 +108,9 @@ can be generated. */ /* The time between transmissions of the string on UART 0. This is pseudo random in order to generate a bit or randomness to when the interrupts occur.*/ -#define commsMIN_TX_DELAY ( 40 / portTICK_RATE_MS ) -#define commsMAX_TX_DELAY ( ( portTickType ) 0x7f ) -#define commsOFFSET_TIME ( ( portTickType ) 3 ) +#define commsMIN_TX_DELAY ( 40 / portTICK_PERIOD_MS ) +#define commsMAX_TX_DELAY ( ( TickType_t ) 0x7f ) +#define commsOFFSET_TIME ( ( TickType_t ) 3 ) /* The time the Comms Rx task should wait to receive a character. This should be slightly longer than the time between transmissions. If we do not receive @@ -122,7 +122,7 @@ the timing of the transmission. */ static unsigned portBASE_TYPE uxCommsErrorStatus = pdPASS; /* The queue used to pass characters out of the ISR. */ -static xQueueHandle xCommsQueue; +static QueueHandle_t xCommsQueue; /* The next character to transmit. */ static char cNextChar; @@ -158,7 +158,7 @@ void vSerialInit( void ) void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex ) { -portTickType xDelayPeriod; +TickType_t xDelayPeriod; static unsigned long *pulRandomBytes = commsFIRST_PROGRAM_BYTES; /* Co-routine MUST start with a call to crSTART. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c index e25a8e8b99..e5dfeca5c7 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c @@ -134,12 +134,12 @@ #include "DriverLib.h" /* The time to delay between writing each character to the LCD. */ -#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS ) +#define mainCHAR_WRITE_DELAY ( 2 / portTICK_PERIOD_MS ) /* The time to delay between writing each string to the LCD. */ -#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS ) +#define mainSTRING_WRITE_DELAY ( 400 / portTICK_PERIOD_MS ) -#define mainADC_DELAY ( 200 / portTICK_RATE_MS ) +#define mainADC_DELAY ( 200 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_CO_ROUTINES ( 5 ) @@ -227,7 +227,7 @@ defined within this file. */ unsigned portBASE_TYPE uxErrorStatus = pdPASS; /* The queue used to transmit messages to the LCD task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -278,14 +278,14 @@ char *pcStringsToDisplay[] = { "" }; -xQueueHandle *pxLCDQueue; +QueueHandle_t *pxLCDQueue; xLCDMessage xMessageToSend; portBASE_TYPE xIndex = 0; /* To test the parameter passing mechanism, the queue on which messages are posted is passed in as a parameter even though it is available as a file scope variable anyway. */ - pxLCDQueue = ( xQueueHandle * ) pvParameters; + pxLCDQueue = ( QueueHandle_t * ) pvParameters; for( ;; ) { @@ -318,7 +318,7 @@ portBASE_TYPE xIndex = 0; void prvLCDTask( void * pvParameters ) { unsigned portBASE_TYPE uxIndex; -xQueueHandle *pxLCDQueue; +QueueHandle_t *pxLCDQueue; xLCDMessage xReceivedMessage; char *pcString; const unsigned char ucCFGData[] = { @@ -335,7 +335,7 @@ const unsigned char ucCFGData[] = { /* To test the parameter passing mechanism, the queue on which messages are received is passed in as a parameter even though it is available as a file scope variable anyway. */ - pxLCDQueue = ( xQueueHandle * ) pvParameters; + pxLCDQueue = ( QueueHandle_t * ) pvParameters; /* Configure the LCD. */ uxIndex = 0; diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h index e3437fe7a0..821e1dc633 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c index d83a9586fc..a9d2ec5574 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c @@ -119,7 +119,7 @@ #include "BlockQ.h" /* Delay between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* UART configuration - note this does not use the FIFO so is not very efficient. */ @@ -137,8 +137,8 @@ efficient. */ /* Misc. */ #define mainQUEUE_SIZE ( 3 ) -#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS ) -#define mainNO_DELAY ( ( portTickType ) 0 ) +#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS ) +#define mainNO_DELAY ( ( TickType_t ) 0 ) /* * Configure the processor and peripherals for this demo. */ @@ -166,10 +166,10 @@ static volatile char *pcNextChar; /* The semaphore used to wake the button handler task from within the GPIO interrupt handler. */ -xSemaphoreHandle xButtonSemaphore; +SemaphoreHandle_t xButtonSemaphore; /* The queue used to send strings to the print task for display on the LCD. */ -xQueueHandle xPrintQueue; +QueueHandle_t xPrintQueue; /*-----------------------------------------------------------*/ @@ -210,7 +210,7 @@ int main( void ) static void vCheckTask( void *pvParameters ) { portBASE_TYPE xErrorOccurred = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; const char *pcPassMessage = "PASS"; const char *pcFailMessage = "FAIL"; diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h index 6d849724f9..82a0e19f16 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c index 2fe1121264..2398ff3427 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c @@ -119,7 +119,7 @@ #include "BlockQ.h" /* Delay between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* UART configuration - note this does not use the FIFO so is not very efficient. */ @@ -137,8 +137,8 @@ efficient. */ /* Misc. */ #define mainQUEUE_SIZE ( 3 ) -#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS ) -#define mainNO_DELAY ( ( portTickType ) 0 ) +#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS ) +#define mainNO_DELAY ( ( TickType_t ) 0 ) /* * Configure the processor and peripherals for this demo. */ @@ -166,10 +166,10 @@ static volatile char *pcNextChar; /* The semaphore used to wake the button handler task from within the GPIO interrupt handler. */ -xSemaphoreHandle xButtonSemaphore; +SemaphoreHandle_t xButtonSemaphore; /* The queue used to send strings to the print task for display on the LCD. */ -xQueueHandle xPrintQueue; +QueueHandle_t xPrintQueue; /*-----------------------------------------------------------*/ @@ -210,7 +210,7 @@ int main( void ) static void vCheckTask( void *pvParameters ) { portBASE_TYPE xErrorOccurred = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; const char *pcPassMessage = "PASS"; const char *pcFailMessage = "FAIL"; diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h index bc0d19d4b3..9f4901715c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7000 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c index 6cfa32accf..8ebc491649 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c @@ -119,7 +119,7 @@ #include "BlockQ.h" /* Delay between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* UART configuration - note this does not use the FIFO so is not very efficient. */ @@ -137,8 +137,8 @@ efficient. */ /* Misc. */ #define mainQUEUE_SIZE ( 3 ) -#define mainDEBOUNCE_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS ) -#define mainNO_DELAY ( ( portTickType ) 0 ) +#define mainDEBOUNCE_DELAY ( ( TickType_t ) 150 / portTICK_PERIOD_MS ) +#define mainNO_DELAY ( ( TickType_t ) 0 ) /* * Configure the processor and peripherals for this demo. */ @@ -166,10 +166,10 @@ static volatile char *pcNextChar; /* The semaphore used to wake the button handler task from within the GPIO interrupt handler. */ -xSemaphoreHandle xButtonSemaphore; +SemaphoreHandle_t xButtonSemaphore; /* The queue used to send strings to the print task for display on the LCD. */ -xQueueHandle xPrintQueue; +QueueHandle_t xPrintQueue; /* Newer library version. */ extern void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, unsigned long ulBaud, unsigned long ulConfig); @@ -212,7 +212,7 @@ int main( void ) static void vCheckTask( void *pvParameters ) { portBASE_TYPE xErrorOccurred = pdFALSE; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; const char *pcPassMessage = "PASS"; const char *pcFailMessage = "FAIL"; diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h index 1c957a53c6..597e4bd26b 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c index f31a051ade..5856102e72 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c @@ -148,7 +148,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Size of the stack allocated to the uIP task. */ #define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 ) @@ -219,7 +219,7 @@ void vApplicationIdleHook( void ) __attribute__((naked)); /*-----------------------------------------------------------*/ /* The queue used to send messages to the OLED task. */ -xQueueHandle xOLEDQueue; +QueueHandle_t xOLEDQueue; /* The welcome text. */ const char * const pcWelcomeMessage = " www.FreeRTOS.org"; @@ -451,7 +451,7 @@ void ( *vOLEDClear )( void ) = NULL; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { for( ;; ); } diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c index 09a0d63feb..099b519ade 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c @@ -96,12 +96,12 @@ void vMACHandleTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /* The semaphore used to wake the interrupt handler task. The peripheral is processed at the task level to prevent the need to read the entire FIFO from within the ISR itself. */ -xSemaphoreHandle xMACInterruptSemaphore = NULL; +SemaphoreHandle_t xMACInterruptSemaphore = NULL; /* The buffer used by the uIP stack. In this case the pointer is used to point to one of the Rx buffers. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c index 7d6149407d..fcf0b55337 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c @@ -128,7 +128,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ @@ -290,7 +290,7 @@ void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLeng { char *c, *pcText; static char cMessageForDisplay[ 32 ]; -extern xQueueHandle xOLEDQueue; +extern QueueHandle_t xOLEDQueue; xOLEDMessage xOLEDMessage; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h index a090947ddf..b49d277e0e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c index e6f98fc205..9546ac4ecd 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c @@ -155,7 +155,7 @@ and the TCP/IP stack together cannot be accommodated with the 32K size limit. */ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Size of the stack allocated to the uIP task. */ #define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 ) @@ -221,14 +221,14 @@ extern void vSetupHighFrequencyTimer( void ); /* * Hook functions that can get called by the kernel. */ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the OLED task. */ -xQueueHandle xOLEDQueue; +QueueHandle_t xOLEDQueue; /* The welcome text. */ const char * const pcWelcomeMessage = " www.FreeRTOS.org"; @@ -468,7 +468,7 @@ void ( *vOLEDClear )( void ) = NULL; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { ( void ) pxTask; ( void ) pcTaskName; diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c index 145efdbb79..ec34b92407 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c @@ -96,12 +96,12 @@ void vMACHandleTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /* The semaphore used to wake the interrupt handler task. The peripheral is processed at the task level to prevent the need to read the entire FIFO from within the ISR itself. */ -xSemaphoreHandle xMACInterruptSemaphore = NULL; +SemaphoreHandle_t xMACInterruptSemaphore = NULL; /* The buffer used by the uIP stack. In this case the pointer is used to point to one of the Rx buffers. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c index 8a187dd956..e1f3086b52 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c @@ -132,7 +132,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ @@ -301,7 +301,7 @@ void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLeng { char *c, *pcText; static char cMessageForDisplay[ 32 ]; -extern xQueueHandle xOLEDQueue; +extern QueueHandle_t xOLEDQueue; xOLEDMessage xOLEDMessage; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h index 455276d496..e9d87bb51f 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 50000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c index 85fe2e132f..fbbaa29b86 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c @@ -149,7 +149,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Size of the stack allocated to the uIP task. */ #define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 ) @@ -220,7 +220,7 @@ void vApplicationIdleHook( void ) __attribute__((naked)); /*-----------------------------------------------------------*/ /* The queue used to send messages to the OLED task. */ -xQueueHandle xOLEDQueue; +QueueHandle_t xOLEDQueue; /* The welcome text. */ const char * const pcWelcomeMessage = " www.FreeRTOS.org"; @@ -459,7 +459,7 @@ void ( *vOLEDClear )( void ) = NULL; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { for( ;; ); } diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c index c7a56204a0..29153e35ba 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c @@ -96,12 +96,12 @@ void vMACHandleTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /* The semaphore used to wake the interrupt handler task. The peripheral is processed at the task level to prevent the need to read the entire FIFO from within the ISR itself. */ -xSemaphoreHandle xMACInterruptSemaphore = NULL; +SemaphoreHandle_t xMACInterruptSemaphore = NULL; /* The buffer used by the uIP stack. In this case the pointer is used to point to one of the Rx buffers. */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c index 063673e41e..12d1c19e47 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c @@ -134,7 +134,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /*-----------------------------------------------------------*/ @@ -301,7 +301,7 @@ void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLeng { char *c, *pcText; static char cMessageForDisplay[ 32 ]; -extern xQueueHandle xOLEDQueue; +extern QueueHandle_t xOLEDQueue; xOLEDMessage xOLEDMessage; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h index 61db382323..fe39f4f125 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h @@ -91,7 +91,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/LPCUSB/USB_CDC.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/LPCUSB/USB_CDC.c index aa3f78febc..c88ff9a485 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/LPCUSB/USB_CDC.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/LPCUSB/USB_CDC.c @@ -58,7 +58,7 @@ #include "LPC17xx.h" -#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS ) +#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS ) #define usbBUFFER_LEN ( 20 ) #define INCREMENT_ECHO_BY 1 @@ -92,7 +92,7 @@ static TLineCoding LineCoding = {115200, 0, 0, 8}; static unsigned char abBulkBuf[64]; static unsigned char abClassReqData[8]; -static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL; +static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL; // forward declaration of interrupt handler void USBIntHandler(void); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c index 2350a2146b..664e65f71f 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c @@ -114,7 +114,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Task priorities. */ #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -363,7 +363,7 @@ void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will get called if a task overflows its stack. */ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c index e3a1a39f3b..a4d0f6fe92 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c @@ -74,7 +74,7 @@ #include "EthDev_LPC17xx.h" /* Time to wait between each inspection of the link status. */ -#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS ) +#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS ) /* Short delay used in several places during the initialisation process. */ #define emacSHORT_DELAY ( 2 ) @@ -86,7 +86,7 @@ #define emacPINSEL2_VALUE 0x50150105 /* If no buffers are available, then wait this long before looking again.... */ -#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS ) +#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS ) /* ...and don't look more than this many times. */ #define emacBUFFER_WAIT_ATTEMPTS ( 30 ) @@ -144,7 +144,7 @@ static unsigned short prvReadPHY( unsigned char ucPhyReg, long *plStatus ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /* Each ucBufferInUse index corresponds to a position in the pool of buffers. If the index contains a 1 then the buffer within pool is in use, if it diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c index a9fc6f3c1d..490f5bd439 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c @@ -86,7 +86,7 @@ /*-----------------------------------------------------------*/ /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -110,7 +110,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h index 9f928a7db9..512e786830 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LPCUSB/USB_CDC.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LPCUSB/USB_CDC.c index adc955ee46..19ef831223 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LPCUSB/USB_CDC.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LPCUSB/USB_CDC.c @@ -58,7 +58,7 @@ #include "LPC17xx.h" -#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS ) +#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS ) #define usbBUFFER_LEN ( 20 ) #define INCREMENT_ECHO_BY 1 @@ -92,7 +92,7 @@ static TLineCoding LineCoding = {115200, 0, 0, 8}; static unsigned char abBulkBuf[64]; static unsigned char abClassReqData[8]; -static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL; +static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL; // forward declaration of interrupt handler void USBIntHandler(void); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c index 4b19389ce1..4b095db946 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c @@ -107,7 +107,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook). */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Task priorities. */ #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -267,7 +267,7 @@ void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will get called if a task overflows its stack. */ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c index fc2a65ac64..522bdc92dc 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c @@ -74,7 +74,7 @@ #include "EthDev_LPC17xx.h" /* Time to wait between each inspection of the link status. */ -#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS ) +#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS ) /* Short delay used in several places during the initialisation process. */ #define emacSHORT_DELAY ( 2 ) @@ -86,7 +86,7 @@ #define emacPINSEL2_VALUE ( 0x50150105 ) /* If no buffers are available, then wait this long before looking again.... */ -#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS ) +#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS ) /* ...and don't look more than this many times. */ #define emacBUFFER_WAIT_ATTEMPTS ( 30 ) @@ -143,7 +143,7 @@ static unsigned short prvReadPHY( unsigned char ucPhyReg, long *plStatus ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /* Each ucBufferInUse index corresponds to a position in the pool of buffers. If the index contains a 1 then the buffer within pool is in use, if it diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c index f1c85030bf..2e7886612f 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c @@ -86,7 +86,7 @@ /*-----------------------------------------------------------*/ /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -110,7 +110,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h index 4cd9006172..9fe09d3580 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h @@ -81,7 +81,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LPCUSB/USB_CDC.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LPCUSB/USB_CDC.c index f27542d160..420c591946 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LPCUSB/USB_CDC.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LPCUSB/USB_CDC.c @@ -58,7 +58,7 @@ #include "LPC17xx.h" -#define usbMAX_SEND_BLOCK ( 20 / portTICK_RATE_MS ) +#define usbMAX_SEND_BLOCK ( 20 / portTICK_PERIOD_MS ) #define usbBUFFER_LEN ( 20 ) #define INCREMENT_ECHO_BY 1 @@ -92,7 +92,7 @@ static TLineCoding LineCoding = {115200, 0, 0, 8}; static unsigned char abBulkBuf[64]; static unsigned char abClassReqData[8]; -static xQueueHandle xRxedChars = NULL, xCharsForTx = NULL; +static QueueHandle_t xRxedChars = NULL, xCharsForTx = NULL; // forward declaration of interrupt handler void USBIntHandler(void); diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c index efee8ba62e..876b942b4b 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c @@ -107,10 +107,10 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook). */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The toggle rate for the LED. */ -#define mainLED_TOGGLE_RATE ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainLED_TOGGLE_RATE ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) /* Task priorities. */ #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -253,7 +253,7 @@ static unsigned long ulTicksSinceLastDisplay = 0; static void prvFlashTask( void *pvParameters ) { -portTickType xLastFlashTime; +TickType_t xLastFlashTime; /* We need to initialise xLastFlashTime prior to the first call to vTaskDelayUntil(). */ @@ -372,7 +372,7 @@ void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will get called if a task overflows its stack. */ diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c index 7dabda48b3..fc7a415b32 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c @@ -74,7 +74,7 @@ #include "EthDev_LPC17xx.h" /* Time to wait between each inspection of the link status. */ -#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_RATE_MS ) +#define emacWAIT_FOR_LINK_TO_ESTABLISH ( 500 / portTICK_PERIOD_MS ) /* Short delay used in several places during the initialisation process. */ #define emacSHORT_DELAY ( 2 ) @@ -87,7 +87,7 @@ #define emacDIV_44 ( 0x28 ) /* If no buffers are available, then wait this long before looking again.... */ -#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS ) +#define emacBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS ) /* ...and don't look more than this many times. */ #define emacBUFFER_WAIT_ATTEMPTS ( 30 ) @@ -144,7 +144,7 @@ static unsigned short prvReadPHY( unsigned char ucPhyReg, long *plStatus ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; /* Each ucBufferInUse index corresponds to a position in the pool of buffers. If the index contains a 1 then the buffer within pool is in use, if it diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c index f1c85030bf..2e7886612f 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c @@ -86,7 +86,7 @@ /*-----------------------------------------------------------*/ /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -110,7 +110,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +SemaphoreHandle_t xEMACSemaphore = NULL; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c index c3ce56b45f..4363a01235 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c @@ -84,7 +84,7 @@ #define cmdMAX_INPUT_SIZE 50 /* The maximum time in ticks to wait for the UART access mutex. */ -#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS ) +#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS ) /* Characters are only ever received slowly on the CLI so it is ok to pass received characters from the UART interrupt to the task on a queue. This sets @@ -135,11 +135,11 @@ static const char * const pcNewLine = "\r\n"; /* This semaphore is used to allow the task to wait for a Tx to complete without wasting any CPU time. */ -static xSemaphoreHandle xTxCompleteSemaphore = NULL; +static SemaphoreHandle_t xTxCompleteSemaphore = NULL; /* This semaphore is sued to allow the task to wait for an Rx to complete without wasting any CPU time. */ -static xSemaphoreHandle xRxCompleteSemaphore = NULL; +static SemaphoreHandle_t xRxCompleteSemaphore = NULL; /*-----------------------------------------------------------*/ @@ -266,7 +266,7 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffer, size_t xBufferLength ) { -const portTickType xBlockMax100ms = 100UL / portTICK_RATE_MS; +const TickType_t xBlockMax100ms = 100UL / portTICK_PERIOD_MS; if( xBufferLength > 0 ) { diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h index 4473e33f99..acf64a4106 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( system_clock_source_get_hz( SYSTEM_CLOCK_SOURCE_DFLL ) ) -#define configTICK_RATE_HZ ( ( portTickType ) 500 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 500 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16000 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c index a6febde18a..affb98f377 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c @@ -110,8 +110,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -141,7 +141,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -178,7 +178,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c index 9d2ae9a0a9..110699061f 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c @@ -135,13 +135,13 @@ /* The period after which the check timer will expire provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0UL ) @@ -164,7 +164,7 @@ extern void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TY /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the comprehensive test/demo application if @@ -184,7 +184,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; /* The register test tasks are asm functions that don't use a stack. The stack allocated just has to be large enough to hold the task context, and @@ -254,7 +254,7 @@ const size_t xRegTestStackSize = 25U; /*-----------------------------------------------------------*/ /* See the description at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c index 673f297dcf..81c5c60509 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c @@ -109,7 +109,7 @@ static void prvSetupHardware( void ); */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /* @@ -183,7 +183,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h index 26831f7196..2801f7d78b 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h @@ -89,7 +89,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 500 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 500 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 11000 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c index 9691be7df0..62d2b3876b 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -150,7 +150,7 @@ extern void vMainToggleLED( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -187,7 +187,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c index ae492d42db..0355911941 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c @@ -131,20 +131,20 @@ /* The period after which the check timer will expire provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0UL ) /* The base toggle rate used by the flash timers. Each toggle rate is a multiple of this. */ -#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_RATE_MS ) +#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_PERIOD_MS ) /* The LED toggle by the check timer. */ #define mainCHECK_LED ( 4 ) @@ -170,13 +170,13 @@ extern void vMainToggleLED( void ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * The flash timer callback function, as described at the top of this file. * This callback function is assigned to three separate software timers. */ -static void prvFlashTimerCallback( xTimerHandle xTimer ); +static void prvFlashTimerCallback( TimerHandle_t xTimer ); /* * The task that toggles an LED each time the semaphore 'given' by the tick @@ -201,12 +201,12 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; /* The semaphore that is given by the tick hook function (defined in main.c) and taken by the task implemented by the prvSemaphoreTakeTask() function. The task toggles LED mainSEMAPHORE_LED each time the semaphore is taken. */ -xSemaphoreHandle xLEDSemaphore = NULL; +SemaphoreHandle_t xLEDSemaphore = NULL; /*-----------------------------------------------------------*/ void main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; unsigned long ulTimer; const unsigned long ulTimersToCreate = 3L; /* The register test tasks are asm functions that don't use a stack. The @@ -297,7 +297,7 @@ const size_t xRegTestStackSize = 25U; /*-----------------------------------------------------------*/ /* See the description at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; @@ -387,7 +387,7 @@ static void prvSemaphoreTakeTask( void *pvParameters ) } /*-----------------------------------------------------------*/ -static void prvFlashTimerCallback( xTimerHandle xTimer ) +static void prvFlashTimerCallback( TimerHandle_t xTimer ) { unsigned long ulLED; diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c index 0a79fa60ae..ca5af1abf0 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c @@ -178,7 +178,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; @@ -209,8 +209,8 @@ void vApplicationTickHook( void ) #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 { static unsigned long ulLastGiveTime = 0UL; - const unsigned long ulRate = 50UL / portTICK_RATE_MS; - extern xSemaphoreHandle xLEDSemaphore; + const unsigned long ulRate = 50UL / portTICK_PERIOD_MS; + extern SemaphoreHandle_t xLEDSemaphore; configASSERT( xLEDSemaphore ); diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h index e66e0dd777..5d7e16a1c5 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h @@ -94,7 +94,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6500 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c index c90090b430..cf07b33f1f 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -147,7 +147,7 @@ extern void vMainToggleLED( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -184,7 +184,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c index 05add02bea..6d540ec707 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c @@ -128,13 +128,13 @@ /* The period after which the check timer will expire provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0UL ) @@ -156,7 +156,7 @@ extern void vMainToggleLED( void ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the comprehensive test/demo application if @@ -176,7 +176,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* The register test tasks are asm functions that don't use a stack. The stack allocated just has to be large enough to hold the task context, and for the additional required for the stack overflow checking to work (if @@ -238,7 +238,7 @@ const size_t xRegTestStackSize = 25U; /*-----------------------------------------------------------*/ /* See the description at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c index 7720425062..3373619884 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c @@ -231,7 +231,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h index 882d7e7d3a..efedb1e189 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h @@ -89,7 +89,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6500 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c index 8bdcd69de8..3f19f12499 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c @@ -116,8 +116,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -150,7 +150,7 @@ extern void vMainToggleLED( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -187,7 +187,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c index 6db3434ce4..b630e7fd89 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c @@ -127,20 +127,20 @@ /* The period after which the check timer will expire provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0UL ) /* The base toggle rate used by the flash timers. Each toggle rate is a multiple of this. */ -#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_RATE_MS ) +#define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_PERIOD_MS ) /* The LED toggle by the check timer. */ #define mainCHECK_LED ( 3 ) @@ -161,13 +161,13 @@ extern void vMainToggleLED( void ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * The flash timer callback function, as described at the top of this file. * This callback function is assigned to three separate software timers. */ -static void prvFlashTimerCallback( xTimerHandle xTimer ); +static void prvFlashTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the comprehensive test/demo application if @@ -187,7 +187,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; unsigned long ulTimer; const unsigned long ulTimersToCreate = 3L; /* The register test tasks are asm functions that don't use a stack. The @@ -266,7 +266,7 @@ const size_t xRegTestStackSize = 25U; /*-----------------------------------------------------------*/ /* See the description at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; @@ -332,7 +332,7 @@ unsigned long ulErrorFound = pdFALSE; } /*-----------------------------------------------------------*/ -static void prvFlashTimerCallback( xTimerHandle xTimer ) +static void prvFlashTimerCallback( TimerHandle_t xTimer ) { unsigned long ulLED; diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c index e60304ec94..a5342912b9 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c @@ -168,7 +168,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h index 811b30faf0..f75b7b6603 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h @@ -93,7 +93,7 @@ errata. */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c index f9b5265ab2..ade6a7e16c 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c @@ -181,7 +181,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c index 42bd3acef0..ff5f59e224 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -143,7 +143,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -180,7 +180,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c index 7f2d7929ee..2415b0edee 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c @@ -133,20 +133,20 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -168,7 +168,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -212,7 +212,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h index 231d6da766..adaaea1420 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h @@ -96,7 +96,7 @@ errata. */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c index 764407c3c7..b6f1a6b621 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c @@ -178,7 +178,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c index 42bd3acef0..ff5f59e224 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -143,7 +143,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -180,7 +180,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c index 122b7d6950..a274174c18 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c @@ -135,20 +135,20 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -170,7 +170,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -214,7 +214,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h index 6ebdeacada..fd3f436f85 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h @@ -93,7 +93,7 @@ errata. */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c index 3d8c24683f..2003fb02b6 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c @@ -174,7 +174,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c index 42bd3acef0..ff5f59e224 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -143,7 +143,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -180,7 +180,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c index f563cbf7b0..760a8a62e0 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c @@ -133,20 +133,20 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -168,7 +168,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -212,7 +212,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h index 226e2b9b4e..dccd320697 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h @@ -87,7 +87,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c index cb432d0a27..3b7fb2ce75 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c @@ -190,7 +190,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c index 5ca1f723f9..29285803bd 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -143,7 +143,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -183,7 +183,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c index 77449519a3..d6e08f7cc4 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c @@ -135,20 +135,20 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -170,7 +170,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -217,7 +217,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h index 41da93ebb0..1ff5251ca8 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h @@ -94,7 +94,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c index 851316c316..cab2c9f9ed 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c @@ -184,7 +184,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c index 2a06616585..085348a921 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c @@ -117,8 +117,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -155,7 +155,7 @@ extern void vMainToggleLED( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -192,7 +192,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c index 9dacf2ebdf..a19317ff25 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c @@ -144,20 +144,20 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -179,7 +179,7 @@ volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL; void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -231,7 +231,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h index 96b85122a9..3617f7e33d 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h @@ -86,7 +86,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 204000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c index f2ccd3b5d6..0ab1772fbb 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c @@ -109,7 +109,7 @@ static void prvI2CGateKeeperTask( void *pvParameters ); /* The queue used to communicate toggle commands with the I2C gatekeeper task. */ -static xQueueHandle xI2CCommandQueue = NULL; +static QueueHandle_t xI2CCommandQueue = NULL; /*-----------------------------------------------------------*/ void vParTestInitialise( void ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c index 344822951f..0bec88c2d1 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c @@ -150,13 +150,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo. Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more @@ -175,7 +175,7 @@ static void prvSetupHardware( void ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register check tasks, and the tasks used to write over and check the contents @@ -233,7 +233,7 @@ int main( void ) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; @@ -352,7 +352,7 @@ static void prvOptionallyCreateComprehensveTestApplication( void ) { #if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 ) { - xTimerHandle xCheckTimer = NULL; + TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); @@ -435,7 +435,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h index aae0eb2d57..2a2168e23e 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h @@ -89,7 +89,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 75 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c index a308f7acaf..89b0cfc346 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c @@ -183,13 +183,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo. Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more @@ -208,7 +208,7 @@ static void prvSetupHardware( void ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Configure the interrupts used to test the interrupt nesting depth as @@ -261,7 +261,7 @@ volatile unsigned long ulFPUInterruptNesting = 0UL, ulMaxFPUInterruptNesting = 0 /* The semaphore used to demonstrate a task being synchronised with an interrupt. */ -static xSemaphoreHandle xTestSemaphore = NULL; +static SemaphoreHandle_t xTestSemaphore = NULL; /* The variable that is incremented by the task synchronised with the button interrupt. */ @@ -298,7 +298,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; @@ -537,7 +537,7 @@ static void prvOptionallyCreateComprehensveTestApplication( void ) { #if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 ) { - xTimerHandle xCheckTimer = NULL; + TimerHandle_t xCheckTimer = NULL; /* Configure the interrupts used to test FPU registers being used from nested interrupts. */ @@ -654,7 +654,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/config/FreeRTOSIPConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/config/FreeRTOSIPConfig.h index 04c599e5a1..873deb781b 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/config/FreeRTOSIPConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/config/FreeRTOSIPConfig.h @@ -101,8 +101,8 @@ all the network buffers are in use and the tasks that process (and subsequently free) the network buffers are themselves blocked waiting for a network buffer. ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in milliseconds can be converted to a time in ticks by dividing the time in -milliseconds by portTICK_RATE_MS. */ -#define ipconfigMAX_SEND_BLOCK_TIME_TICKS ( 20 / portTICK_RATE_MS ) +milliseconds by portTICK_PERIOD_MS. */ +#define ipconfigMAX_SEND_BLOCK_TIME_TICKS ( 20 / portTICK_PERIOD_MS ) /* If ipconfigUSE_DHCP is 1 then FreeRTOS+UDP will attempt to retrieve an IP address, netmask, DNS server address and gateway address from a DHCP server. If @@ -120,7 +120,7 @@ ipconfigMAXIMUM_DISCOVER_TX_PERIOD. The IP stack will revert to using the static IP address passed as a parameter to FreeRTOS_IPInit() if the re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without a DHCP reply being received. */ -#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 999 / portTICK_RATE_MS ) +#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 999 / portTICK_PERIOD_MS ) /* The ARP cache is a table that maps IP addresses to MAC addresses. The IP stack can only send a UDP message to a remove IP address if it knowns the MAC @@ -280,7 +280,7 @@ or one lower than ipconfigUDP_TASK_PRIORITY, depending on the application. */ /* The windows simulator cannot really simulate MAC interrupts, and needs to block occasionally to allow other tasks to run. */ #ifdef _WINDOWS_ - #define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 3 / portTICK_RATE_MS ) + #define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 3 / portTICK_PERIOD_MS ) #endif /* The example IP trace macros are included here so the definitions are diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main.c index dc223d4a95..7dc59adb4e 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main.c @@ -179,7 +179,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c index 6934d1f92f..7029174b2b 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c @@ -108,8 +108,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -117,8 +117,8 @@ the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) /* The period of the blinky software timer. The period is specified in ms and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0 ) @@ -139,7 +139,7 @@ static void prvQueueSendTask( void *pvParameters ); * The callback function for the blinky software timer, as described at the top * of this file. */ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ); +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the simply blinky style application if @@ -151,8 +151,8 @@ void main_blinky( void ); void main_blinky( void ) { -xTimerHandle xTimer; -xQueueHandle xQueue; +TimerHandle_t xTimer; +QueueHandle_t xQueue; /* Create the queue. */ xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); @@ -200,12 +200,12 @@ xQueueHandle xQueue; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; -xQueueHandle xQueue; +QueueHandle_t xQueue; /* The handle of the queue is passed in using the task's parameter. */ - xQueue = ( xQueueHandle ) pvParameters; + xQueue = ( QueueHandle_t ) pvParameters; /* Initialise xNextWakeTime - this only needs to be done once. */ xNextWakeTime = xTaskGetTickCount(); @@ -230,10 +230,10 @@ xQueueHandle xQueue; static void prvQueueReceiveTask( void *pvParameters ) { unsigned long ulReceivedValue; -xQueueHandle xQueue; +QueueHandle_t xQueue; /* The queue is passed in as the task's parameter. */ - xQueue = ( xQueueHandle ) pvParameters; + xQueue = ( QueueHandle_t ) pvParameters; for( ;; ) { @@ -253,7 +253,7 @@ xQueueHandle xQueue; } /*-----------------------------------------------------------*/ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ) +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ) { /* Avoid compiler warnings. */ ( void ) xTimer; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c index d248bbb04b..cf39d8fef6 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c @@ -138,13 +138,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The priorities of the various demo application tasks. */ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) @@ -194,7 +194,7 @@ FreeRTOSConfig.h. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Creates a set of sample files on a RAM disk. http://www.FreeRTOS.org/fat_sl @@ -243,7 +243,7 @@ const uint8_t ucMACAddress[ 6 ] = { configMAC_ADDR0, configMAC_ADDR1, configMAC_ int main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; /* Usage instructions on http://www.FreeRTOS.org/Atmel_SAM4E_RTOS_Demo.html */ @@ -319,7 +319,7 @@ xTimerHandle xTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorOccurred = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c index 8be7dcf68a..548828eee1 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c @@ -121,7 +121,7 @@ static const uint32_t ulAlarmValueForOneTick = ( configSYSTICK_CLOCK_HZ / config /* Holds the maximum number of ticks that can be suppressed - which is basically how far into the future an interrupt can be generated. Set during initialisation. */ -static portTickType xMaximumPossibleSuppressedTicks = 0; +static TickType_t xMaximumPossibleSuppressedTicks = 0; /* Flag set from the tick interrupt to allow the sleep processing to know if sleep mode was exited because of an AST interrupt or a different interrupt. */ @@ -250,11 +250,11 @@ static void prvEnableAST( void ) defined in the FreeRTOS Cortex-M3 port layer with a version that manages the asynchronous timer (AST), as the tick is generated from the low power AST and not the SysTick as would normally be the case on a Cortex-M. */ -void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime ) +void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime ) { uint32_t ulAlarmValue, ulCompleteTickPeriods, ulInterruptStatus; eSleepModeStatus eSleepAction; -portTickType xModifiableIdleTime; +TickType_t xModifiableIdleTime; enum sleepmgr_mode xSleepMode; /* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */ diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h index 359efc6f86..f3e680d607 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h @@ -88,11 +88,11 @@ or 0 to run the more comprehensive test and demo application. */ #define configCPU_CLOCK_HZ 16384 #define configSYSTICK_CLOCK_HZ 16384 #define configUSE_TICKLESS_IDLE 1 - #define configTICK_RATE_HZ ( ( portTickType ) 128 ) + #define configTICK_RATE_HZ ( ( TickType_t ) 128 ) #else #define configCPU_CLOCK_HZ sysclk_get_cpu_hz() #define configUSE_TICKLESS_IDLE 0 - #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) + #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #endif /* configCREATE_LOW_POWER_DEMO */ #define configUSE_PREEMPTION 1 diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c index 88ed787a5d..2cad1ec6ef 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c @@ -109,7 +109,7 @@ extern void main_full( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ @@ -186,7 +186,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c index f870e2b6e2..231d30dc33 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c @@ -133,13 +133,13 @@ /* The period after which the check timer will expire providing no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The LED toggled by the check timer. */ #define mainCHECK_LED ( 0 ) @@ -149,13 +149,13 @@ in ticks using the portTICK_RATE_MS constant. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. They have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -195,7 +195,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c index 89f29be5e5..b38ed4b2c4 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c @@ -136,7 +136,7 @@ empty. */ #define mainQUEUE_LED ( 0 ) /* The rate at which the Tx task sends to the queue. */ -#define mainTX_DELAY ( 500UL / portTICK_RATE_MS ) +#define mainTX_DELAY ( 500UL / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ #define mainDONT_BLOCK ( 0 ) @@ -147,7 +147,7 @@ empty. */ /* The length of time the LED will remain on for. It is on just long enough to be able to see with the human eye so as not to distort the power readings too much. */ -#define mainLED_TOGGLE_DELAY ( 20 / portTICK_RATE_MS ) +#define mainLED_TOGGLE_DELAY ( 20 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ @@ -160,7 +160,7 @@ static void prvQueueSendTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue to pass data from the Tx task to the Rx task. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c index 0489086632..36417bf953 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -112,16 +112,16 @@ /* The Tx task will transmit the sequence of characters at a pseudo random interval. This is the maximum and minimum block time between sends. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 ) -#define comOFFSET_TIME ( ( portTickType ) 3 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 ) +#define comOFFSET_TIME ( ( TickType_t ) 3 ) /* We should find that each character can be queued for Tx immediately and we don't have to block to send. */ -#define comNO_BLOCK ( ( portTickType ) 0 ) +#define comNO_BLOCK ( ( TickType_t ) 0 ) /* The Rx task will block on the Rx queue for a long period. */ -#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff ) +#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff ) /* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */ #define comFIRST_BYTE ( 'A' ) @@ -158,15 +158,15 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vComTxTask, pvParameters ) { signed char cByteToSend; -portTickType xTimeToWait; +TickType_t xTimeToWait; /* Just to stop compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index a6848d8c92..7f79e9dd3a 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -127,8 +127,8 @@ typedef enum xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ); -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ); -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ); +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ); +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); void vSerialClose( xComPortHandle xPort ); diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h index 1bc93c0999..847bb39317 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h @@ -94,7 +94,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c index 1ae0bdd126..6f33f593fc 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c @@ -184,7 +184,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c index a84d2e4f10..23615bd62b 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c @@ -119,8 +119,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -149,7 +149,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -186,7 +186,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c index 107af24035..98807d3650 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c @@ -140,13 +140,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The standard demo flash timers can be used to flash any number of LEDs. In this case, because only three LEDs are available, and one is in use by the @@ -169,13 +169,13 @@ for the comtest, so the LED number is deliberately out of range. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the @@ -224,7 +224,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c index 38ea2d15ac..2deb3d9887 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c @@ -90,8 +90,8 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) #define serPMC_USART_ID ( BOARD_ID_USART ) /* The USART supported by this file. */ @@ -104,8 +104,8 @@ /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -169,7 +169,7 @@ const sam_usart_opt_t xUSARTSettings = } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -211,7 +211,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h index 3a22cb8ace..b0171b6698 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h @@ -90,7 +90,7 @@ assembly files that include this header file. */ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c index 1ba53a323c..5c147a4411 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c @@ -174,8 +174,8 @@ #include "dynamic.h" /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -224,21 +224,21 @@ FreeRTOS.org web site to see which LEDs this relates to. */ /* The period at which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS ) /* The period at which the digit counter timer will expire, in ms, and converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_PERIOD_MS ) /* The LED will remain on until the button has not been pushed for a full 5000ms. */ -#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* A zero block time. */ #define mainDONT_BLOCK ( 0UL ) @@ -263,17 +263,17 @@ static void prvQueueSendTask( void *pvParameters ); /* * The LED timer callback function. This does nothing but switch an LED off. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * The digit counter callback function, as described at the top of this file. */ -static void prvDigitCounterTimerCallback( xTimerHandle xTimer ); +static void prvDigitCounterTimerCallback( TimerHandle_t xTimer ); /* * This is not a 'standard' partest function, so the prototype is not in @@ -284,19 +284,19 @@ void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE x /*-----------------------------------------------------------*/ /* The queue used by both application specific demo tasks defined in this file. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses prvLEDTimerCallback() as it's callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* The digit counter software timer. This displays a counting digit on one half of the seven segment displays. */ -static xTimerHandle xDigitCounterTimer = NULL; +static TimerHandle_t xDigitCounterTimer = NULL; /* The check timer. This uses prvCheckTimerCallback() as its callback function. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* If an error is detected in a standard demo task, then pcStatusMessage will be set to point to a string that identifies the offending task. This is just @@ -383,7 +383,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { /* Check the standard demo tasks are running without error. Latch the latest reported error in the pcStatusMessage character pointer. */ @@ -477,7 +477,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -485,7 +485,7 @@ static void prvLEDTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvDigitCounterTimerCallback( xTimerHandle xTimer ) +static void prvDigitCounterTimerCallback( TimerHandle_t xTimer ) { /* Define the bit patterns that display numbers on the seven segment display. */ static const unsigned short usNumbersPatterns[] = { 0x8004, 0xF204, 0x4804, 0x6004, 0x3204, 0x2404, 0x0404, 0xF104, 0x0004, 0x2004 }; @@ -542,7 +542,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* The timer command queue will have been filled when the timer test tasks @@ -638,7 +638,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c index 79fcaa791b..d3271783ef 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c @@ -127,8 +127,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -158,16 +158,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /*-----------------------------------------------------------*/ @@ -190,7 +190,7 @@ int main(void) if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -209,7 +209,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -250,7 +250,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -360,7 +360,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c index ca1b6186f1..9cf805f6a5 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c @@ -101,14 +101,14 @@ #define serTX_INT 0x02 /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -175,7 +175,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -217,7 +217,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h index eeaf3ec3be..090a9014a0 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h @@ -90,7 +90,7 @@ assembly files that include this header file. */ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 60 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c index e326b3c042..b1addc7ba9 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c @@ -175,8 +175,8 @@ #include "dynamic.h" /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -225,21 +225,21 @@ FreeRTOS.org web site to see which LEDs this relates to. */ /* The period at which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS ) /* The period at which the digit counter timer will expire, in ms, and converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainDIGIT_COUNTER_TIMER_PERIOD_MS ( 250UL / portTICK_PERIOD_MS ) /* The LED will remain on until the button has not been pushed for a full 5000ms. */ -#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS ) +#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS ) /* A zero block time. */ #define mainDONT_BLOCK ( 0UL ) @@ -264,17 +264,17 @@ static void prvQueueSendTask( void *pvParameters ); /* * The LED timer callback function. This does nothing but switch an LED off. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * The digit counter callback function, as described at the top of this file. */ -static void prvDigitCounterTimerCallback( xTimerHandle xTimer ); +static void prvDigitCounterTimerCallback( TimerHandle_t xTimer ); /* * This is not a 'standard' partest function, so the prototype is not in @@ -285,19 +285,19 @@ void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE x /*-----------------------------------------------------------*/ /* The queue used by both application specific demo tasks defined in this file. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses prvLEDTimerCallback() as it's callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* The digit counter software timer. This displays a counting digit on one half of the seven segment displays. */ -static xTimerHandle xDigitCounterTimer = NULL; +static TimerHandle_t xDigitCounterTimer = NULL; /* The check timer. This uses prvCheckTimerCallback() as its callback function. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* If an error is detected in a standard demo task, then pcStatusMessage will be set to point to a string that identifies the offending task. This is just @@ -384,7 +384,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { /* Check the standard demo tasks are running without error. Latch the latest reported error in the pcStatusMessage character pointer. */ @@ -467,7 +467,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. */ @@ -475,7 +475,7 @@ static void prvLEDTimerCallback( xTimerHandle xTimer ) } /*-----------------------------------------------------------*/ -static void prvDigitCounterTimerCallback( xTimerHandle xTimer ) +static void prvDigitCounterTimerCallback( TimerHandle_t xTimer ) { /* Define the bit patterns that display numbers on the seven segment display. */ static const unsigned short usNumbersPatterns[] = { 0xC000U, 0xF900U, 0xA400U, 0xB000U, 0x9900U, 0x9200U, 0x8200U, 0xF800U, 0x8000U, 0x9000U }; @@ -526,7 +526,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* The timer command queue will have been filled when the timer test tasks @@ -622,7 +622,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c index 0f30ea94cc..89a758cdf2 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c @@ -128,8 +128,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -159,16 +159,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /*-----------------------------------------------------------*/ @@ -191,7 +191,7 @@ int main(void) if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -210,7 +210,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -251,7 +251,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -362,7 +362,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c index 387a6f2f3f..590ebeef73 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c @@ -102,14 +102,14 @@ #define serTX_INT 0x02 /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -176,7 +176,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -218,7 +218,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h index b4387410d6..8f8ee1c7fe 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c index c6cf244196..b226352091 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c @@ -176,7 +176,7 @@ static void prvDeleteMe( void ) __attribute__((noinline)); * If a reg test task detects an error it will delete itself, and in so doing * prevent itself from sending any more 'I'm Alive' messages to the check task. */ -static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber ); +static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber ); /* * The check task is created with access to three memory regions (plus its @@ -195,7 +195,7 @@ and interrupts. Note that this is a file scope variable that falls outside of any MPU region. As such other techniques have to be used to allow the tasks to gain access to the queue. See the comments in the tasks themselves for further information. */ -static xQueueHandle xFileScopeCheckQueue = NULL; +static QueueHandle_t xFileScopeCheckQueue = NULL; /*-----------------------------------------------------------*/ @@ -214,7 +214,7 @@ stack size is defined in words, not bytes. */ static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT ); /* Declare three arrays - an MPU region will be created for each array -using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE +using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE MPU FUNCTIONALITY, the data is not used by the check tasks primary function of monitoring the reg test tasks and printing out status information. @@ -234,9 +234,9 @@ char cReadOnlyArray[ mainREAD_ONLY_ARRAY_SIZE ] mainALIGN_TO( mainREAD_ONLY_ALIG #define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128 char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ); -/* Fill in a xTaskParameters structure to define the check task - this is the +/* Fill in a TaskParameters_t structure to define the check task - this is the structure passed to the xTaskCreateRestricted() function. */ -static const xTaskParameters xCheckTaskParameters = +static const TaskParameters_t xCheckTaskParameters = { prvCheckTask, /* pvTaskCode - the function that implements the task. */ "Check", /* pcName */ @@ -276,8 +276,8 @@ aligned to ( 128 * 4 ) bytes. */ static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); -/* Fill in a xTaskParameters structure per reg test task to define the tasks. */ -static const xTaskParameters xRegTest1Parameters = +/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */ +static const TaskParameters_t xRegTest1Parameters = { prvRegTest1Task, /* pvTaskCode - the function that implements the task. */ "RegTest1", /* pcName */ @@ -294,7 +294,7 @@ static const xTaskParameters xRegTest1Parameters = }; /*-----------------------------------------------------------*/ -static xTaskParameters xRegTest2Parameters = +static TaskParameters_t xRegTest2Parameters = { prvRegTest2Task, /* pvTaskCode - the function that implements the task. */ "RegTest2", /* pcName */ @@ -365,7 +365,7 @@ static void prvCheckTask( void *pvParameters ) queue variable. Take a stack copy of this before the task is set into user mode. Once that task is in user mode the file scope queue variable will no longer be accessible but the stack copy will. */ -xQueueHandle xQueue = xFileScopeCheckQueue; +QueueHandle_t xQueue = xFileScopeCheckQueue; long lMessage; unsigned long ulStillAliveCounts[ 2 ] = { 0 }; const char *pcStatusMessage = "PASS\r\n"; @@ -510,7 +510,7 @@ static void prvRegTest1Task( void *pvParameters ) queue variable. Take a stack copy of this before the task is set into user mode. Once this task is in user mode the file scope queue variable will no longer be accessible but the stack copy will. */ -xQueueHandle xQueue = xFileScopeCheckQueue; +QueueHandle_t xQueue = xFileScopeCheckQueue; /* Now the queue handle has been obtained the task can switch to user mode. This is just one method of passing a handle into a protected @@ -589,7 +589,7 @@ static void prvRegTest2Task( void *pvParameters ) /* The queue handle is passed in as the task parameter. This is one method of passing data into a protected task, the other reg test task uses a different method. */ -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; for( ;; ) { @@ -828,7 +828,7 @@ static void prvDeleteMe( void ) } /*-----------------------------------------------------------*/ -static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber ) +static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber ) { if( xHandle != NULL ) { @@ -854,7 +854,7 @@ static void prvSetupHardware( void ) void vApplicationTickHook( void ) { static unsigned long ulCallCount; -const unsigned long ulCallsBetweenSends = 5000 / portTICK_RATE_MS; +const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS; const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS; portBASE_TYPE xDummy; @@ -880,7 +880,7 @@ portBASE_TYPE xDummy; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this function will automatically get called if a task overflows its stack. */ diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h index 7da7504d09..30839ecd44 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h @@ -91,7 +91,7 @@ #define configMAX_PRIORITIES ( 5 ) #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c index 1d90a74ee8..ca299fd3a9 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c @@ -183,7 +183,7 @@ static void prvDeleteMe( void ) __attribute__((noinline)); * If a reg test task detects an error it will delete itself, and in so doing * prevent itself from sending any more 'I'm Alive' messages to the check task. */ -static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber ); +static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber ); /* * The check task is created with access to three memory regions (plus its @@ -202,7 +202,7 @@ and interrupts. Note that this is a file scope variable that falls outside of any MPU region. As such other techniques have to be used to allow the tasks to gain access to the queue. See the comments in the tasks themselves for further information. */ -static xQueueHandle xFileScopeCheckQueue = NULL; +static QueueHandle_t xFileScopeCheckQueue = NULL; @@ -222,7 +222,7 @@ stack size is defined in words, not bytes. */ static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT ); /* Declare three arrays - an MPU region will be created for each array -using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE +using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE MPU FUNCTIONALITY, the data is not used by the check tasks primary function of monitoring the reg test tasks and printing out status information. @@ -242,9 +242,9 @@ char cReadOnlyArray[ mainREAD_ONLY_ARRAY_SIZE ] mainALIGN_TO( mainREAD_ONLY_ALIG #define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128 char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ); -/* Fill in a xTaskParameters structure to define the check task - this is the +/* Fill in a TaskParameters_t structure to define the check task - this is the structure passed to the xTaskCreateRestricted() function. */ -static const xTaskParameters xCheckTaskParameters = +static const TaskParameters_t xCheckTaskParameters = { prvCheckTask, /* pvTaskCode - the function that implements the task. */ "Check", /* pcName */ @@ -273,7 +273,7 @@ the MPU regions are replaced with those defined by xAltRegions prior to the check task receiving any data on the queue or printing any messages to the debug console. The MPU region defined below covers the GPIO peripherals used to write to the LCD. */ -static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = +static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = { /* Base address Length Parameters */ { mainGPIO_START_ADDRESS, ( 64 * 1024 ), portMPU_REGION_READ_WRITE }, @@ -299,8 +299,8 @@ aligned to ( 128 * 4 ) bytes. */ static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT ); -/* Fill in a xTaskParameters structure per reg test task to define the tasks. */ -static const xTaskParameters xRegTest1Parameters = +/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */ +static const TaskParameters_t xRegTest1Parameters = { prvRegTest1Task, /* pvTaskCode - the function that implements the task. */ "RegTest1", /* pcName */ @@ -317,7 +317,7 @@ static const xTaskParameters xRegTest1Parameters = }; /*-----------------------------------------------------------*/ -static xTaskParameters xRegTest2Parameters = +static TaskParameters_t xRegTest2Parameters = { prvRegTest2Task, /* pvTaskCode - the function that implements the task. */ "RegTest2", /* pcName */ @@ -388,7 +388,7 @@ static void prvCheckTask( void *pvParameters ) queue variable. Take a stack copy of this before the task is set into user mode. Once that task is in user mode the file scope queue variable will no longer be accessible but the stack copy will. */ -xQueueHandle xQueue = xFileScopeCheckQueue; +QueueHandle_t xQueue = xFileScopeCheckQueue; long lMessage; unsigned long ulStillAliveCounts[ 2 ] = { 0 }; char *pcStatusMessage = "PASS\r\n"; @@ -534,7 +534,7 @@ static void prvRegTest1Task( void *pvParameters ) queue variable. Take a stack copy of this before the task is set into user mode. Once this task is in user mode the file scope queue variable will no longer be accessible but the stack copy will. */ -xQueueHandle xQueue = xFileScopeCheckQueue; +QueueHandle_t xQueue = xFileScopeCheckQueue; /* Now the queue handle has been obtained the task can switch to user mode. This is just one method of passing a handle into a protected @@ -613,7 +613,7 @@ static void prvRegTest2Task( void *pvParameters ) /* The queue handle is passed in as the task parameter. This is one method of passing data into a protected task, the other reg test task uses a different method. */ -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; for( ;; ) { @@ -846,7 +846,7 @@ static void prvDeleteMe( void ) } /*-----------------------------------------------------------*/ -static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber ) +static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber ) { if( xHandle != NULL ) { @@ -956,7 +956,7 @@ void prvSetupHardware( void ) void vApplicationTickHook( void ) { static unsigned long ulCallCount; -const unsigned long ulCallsBetweenSends = 5000 / portTICK_RATE_MS; +const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS; const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS; portBASE_TYPE xDummy; @@ -982,7 +982,7 @@ portBASE_TYPE xDummy; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this function will automatically get called if a task overflows its stack. */ diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h index 0e1ab5b2f4..e4745ab6f0 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h @@ -93,7 +93,7 @@ #define configUSE_TRACE_FACILITY 0 #define configUSE_16_BIT_TICKS 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) /* Timer clock. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 8 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 32768 ) diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c index 666ffbe3c9..1ad65a6104 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c @@ -172,7 +172,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c index 451981bd92..69ca050731 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c @@ -116,8 +116,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -146,7 +146,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -183,7 +183,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c index 1a6cf418fe..3c183e083c 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c @@ -146,10 +146,10 @@ #define mainDONT_BLOCK ( 0UL ) /* The period after which the check timer will expire, converted to ticks. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period after which the LED timer will expire, converted to ticks. */ -#define mainLED_TIMER_PERIOD_MS ( 75UL / portTICK_RATE_MS ) +#define mainLED_TIMER_PERIOD_MS ( 75UL / portTICK_PERIOD_MS ) /* Constants for the ComTest tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 ) @@ -160,12 +160,12 @@ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * The LED timer callback function, as described at the top of this file. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /* * The reg test tasks, as described at the top of this file. @@ -185,7 +185,7 @@ volatile unsigned long ulRegTest1Counter = 0, ulRegTest2Counter = 0; void main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; /* Start all the standard demo/test tasks. These have not particular functionality, but do demonstrate how to use the FreeRTOS API, and test the @@ -252,7 +252,7 @@ xTimerHandle xTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangeToRedLEDsAlready = pdFALSE; static unsigned long ulLastRegTest1Counter = 0, ulLastRegTest2Counter = 0; @@ -359,7 +359,7 @@ const unsigned long ulRedLED1 = 6, ulRedLED2 = 9; } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { const unsigned long ulNumWhiteLEDs = 6; static unsigned long ulLit1 = 2, ulLit2 = 1; diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c index f7bf7b471b..f320289777 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c @@ -128,15 +128,15 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) -#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) +#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars = NULL; -static xQueueHandle xCharsForTx = NULL; +static QueueHandle_t xRxedChars = NULL; +static QueueHandle_t xCharsForTx = NULL; /*-----------------------------------------------------------*/ @@ -195,7 +195,7 @@ xComPortHandle xReturn = ( xComPortHandle ) 0; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -233,7 +233,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h index 327f1dead4..2d6b56f308 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h @@ -91,7 +91,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( 24000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 7 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c index aa03b12c69..eae2b6cb72 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c @@ -130,8 +130,8 @@ remain on until a full five seconds pass without the button being pressed. #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -155,17 +155,17 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch the red LED * off. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback * function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /*-----------------------------------------------------------*/ @@ -188,7 +188,7 @@ int main(void) if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -207,7 +207,7 @@ int main(void) } /*-----------------------------------------------------------*/ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -247,7 +247,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -323,7 +323,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c index 4f94a165f4..845be8d8bd 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c @@ -103,7 +103,7 @@ contained in such a queue. */ there to be space to post each character to the queue of characters waiting transmission. NOTE! This is the time to wait per character - not the time to wait for the entire string. */ -#define serPUT_STRING_CHAR_DELAY ( 5 / portTICK_RATE_MS ) +#define serPUT_STRING_CHAR_DELAY ( 5 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ @@ -111,10 +111,10 @@ wait for the entire string. */ static USART_TypeDef * const xUARTS[ serNUM_COM_PORTS ] = { ( ( USART_TypeDef * ) USART1_BASE ), ( ( USART_TypeDef * ) USART2_BASE ) }; /* Queues used to hold characters waiting to be transmitted - one queue per port. */ -static xQueueHandle xCharsForTx[ serNUM_COM_PORTS ] = { 0 }; +static QueueHandle_t xCharsForTx[ serNUM_COM_PORTS ] = { 0 }; /* Queues holding received characters - one queue per port. */ -static xQueueHandle xRxedChars[ serNUM_COM_PORTS ] = { 0 }; +static QueueHandle_t xRxedChars[ serNUM_COM_PORTS ] = { 0 }; /*-----------------------------------------------------------*/ @@ -229,7 +229,7 @@ GPIO_InitTypeDef GPIO_InitStructure; } /*-----------------------------------------------------------*/ -signed long xSerialGetChar( long lPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed long xSerialGetChar( long lPort, signed char *pcRxedChar, TickType_t xBlockTime ) { long lReturn = pdFAIL; @@ -279,7 +279,7 @@ unsigned long ul; } /*-----------------------------------------------------------*/ -signed long xSerialPutChar( long lPort, signed char cOutChar, portTickType xBlockTime ) +signed long xSerialPutChar( long lPort, signed char cOutChar, TickType_t xBlockTime ) { long lReturn; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h index c05c7fcce4..341e083f91 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h @@ -84,7 +84,7 @@ long lCOMPortInit( unsigned long ulPort, unsigned long ulWantedBaud ); * waiting in the Blocked state for up to xBlockTime ticks), otherwise pdFAIL * will be returned. */ -signed long xSerialPutChar( long lPort, signed char cOutChar, portTickType xBlockTime ); +signed long xSerialPutChar( long lPort, signed char cOutChar, TickType_t xBlockTime ); /* * Retrieve a character from the queue of received characters. As supplied 2 @@ -96,7 +96,7 @@ signed long xSerialPutChar( long lPort, signed char cOutChar, portTickType xBloc * character is successfully returned (possible after waiting in the Blocked * state for up to xBlockTime ticks), otherwise pdFAIL will be returned. */ -signed long xSerialGetChar( long lPort, signed char *pcRxedChar, portTickType xBlockTime ); +signed long xSerialGetChar( long lPort, signed char *pcRxedChar, TickType_t xBlockTime ); /* * Send a string of characters to a COM port. As supplied 2 COM ports are diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h index a36421f744..4cffca4f3b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c index 32d964e716..8b54bd439d 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c @@ -126,8 +126,8 @@ /* The time between cycles of the 'check' task - which depends on whether the check task has detected an error or not. */ -#define mainCHECK_DELAY_NO_ERROR ( ( portTickType ) 5000 / portTICK_RATE_MS ) -#define mainCHECK_DELAY_ERROR ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainCHECK_DELAY_NO_ERROR ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) +#define mainCHECK_DELAY_ERROR ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED controlled by the 'check' task. */ #define mainCHECK_LED ( 3 ) @@ -198,7 +198,7 @@ int main( void ) /* Described at the top of this file. */ static void prvCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; unsigned long ulTicksToWait = mainCHECK_DELAY_NO_ERROR; /* Just to remove the compiler warning about the unused parameter. */ @@ -351,7 +351,7 @@ static void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will get called if a task overflows its stack. If the parameters are corrupt then inspect pxCurrentTCB to find which was the diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h index c52c057158..4402b00625 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/STM32F10xFWLib/src/lcd.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/STM32F10xFWLib/src/lcd.c index 48d8625274..55a6e86b65 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/STM32F10xFWLib/src/lcd.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/STM32F10xFWLib/src/lcd.c @@ -439,7 +439,7 @@ void LCD_Init(void) LCD_WriteReg(R1, 0x10); LCD_WriteReg(R0, 0xA0); LCD_WriteReg(R3, 0x01); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R3, 0x00); LCD_WriteReg(R43, 0x04); @@ -453,18 +453,18 @@ void LCD_Init(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ /* Chip Set ------------------------------------------------------------------*/ LCD_WriteReg(R157, 0x00); @@ -539,7 +539,7 @@ void LCD_Init(void) LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -808,7 +808,7 @@ void LCD_ScrollText(u8 Line, u8 *ptr) /* Increment the character counter */ i++; } - vTaskDelay( 100 / portTICK_RATE_MS ); + vTaskDelay( 100 / portTICK_PERIOD_MS ); i = 0; //LCD_ClearLine(Line); ptr -= length; @@ -1153,18 +1153,18 @@ void LCD_PowerOn(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ } /******************************************************************************* @@ -1182,7 +1182,7 @@ void LCD_DisplayOn(void) /* Display On */ LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -1197,7 +1197,7 @@ void LCD_DisplayOff(void) { /* Display Off */ LCD_WriteReg(R0, 0xA0); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R59, 0x00); } diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c index b21d67bf7d..87dc7b50f6 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c @@ -147,7 +147,7 @@ time. */ #define mainMAX_MSG_LEN 25 /* The time between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The number of nano seconds between each processor clock. */ #define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) ) @@ -205,7 +205,7 @@ extern void vSetupTimerTest( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -272,7 +272,7 @@ xLCDMessage xMessage; static void vCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; xLCDMessage xMessage; static signed char cPassMessage[ mainMAX_MSG_LEN ]; extern unsigned short usMaxJitter; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c index d68a8eecc1..f6429bb413 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c @@ -80,15 +80,15 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) -#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) +#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -163,7 +163,7 @@ GPIO_InitTypeDef GPIO_InitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -205,7 +205,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h index c52c057158..4402b00625 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/STM32F10xFWLib/src/lcd.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/STM32F10xFWLib/src/lcd.c index 48d8625274..55a6e86b65 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/STM32F10xFWLib/src/lcd.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/STM32F10xFWLib/src/lcd.c @@ -439,7 +439,7 @@ void LCD_Init(void) LCD_WriteReg(R1, 0x10); LCD_WriteReg(R0, 0xA0); LCD_WriteReg(R3, 0x01); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R3, 0x00); LCD_WriteReg(R43, 0x04); @@ -453,18 +453,18 @@ void LCD_Init(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ /* Chip Set ------------------------------------------------------------------*/ LCD_WriteReg(R157, 0x00); @@ -539,7 +539,7 @@ void LCD_Init(void) LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -808,7 +808,7 @@ void LCD_ScrollText(u8 Line, u8 *ptr) /* Increment the character counter */ i++; } - vTaskDelay( 100 / portTICK_RATE_MS ); + vTaskDelay( 100 / portTICK_PERIOD_MS ); i = 0; //LCD_ClearLine(Line); ptr -= length; @@ -1153,18 +1153,18 @@ void LCD_PowerOn(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ } /******************************************************************************* @@ -1182,7 +1182,7 @@ void LCD_DisplayOn(void) /* Display On */ LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -1197,7 +1197,7 @@ void LCD_DisplayOff(void) { /* Display Off */ LCD_WriteReg(R0, 0xA0); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R59, 0x00); } diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c index b21d67bf7d..87dc7b50f6 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c @@ -147,7 +147,7 @@ time. */ #define mainMAX_MSG_LEN 25 /* The time between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The number of nano seconds between each processor clock. */ #define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) ) @@ -205,7 +205,7 @@ extern void vSetupTimerTest( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -272,7 +272,7 @@ xLCDMessage xMessage; static void vCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; xLCDMessage xMessage; static signed char cPassMessage[ mainMAX_MSG_LEN ]; extern unsigned short usMaxJitter; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c index d68a8eecc1..f6429bb413 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c @@ -80,15 +80,15 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) -#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) +#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -163,7 +163,7 @@ GPIO_InitTypeDef GPIO_InitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -205,7 +205,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h index 3df75f3337..79b0af3c09 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo-globals.Standard.xml b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo-globals.Standard.xml index 6c0c620310..ffe9916690 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo-globals.Standard.xml +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo-globals.Standard.xml @@ -259,7 +259,7 @@ - + @@ -281,9 +281,9 @@ - + - + @@ -296,7 +296,7 @@ - + @@ -304,13 +304,13 @@ - + - + @@ -325,11 +325,11 @@ - + - + - + @@ -372,43 +372,43 @@ - + - + - + - - - + + + - + - + - + - + - + - + diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo.Standard.xml b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo.Standard.xml index c1b8ac4844..7e96ff0e06 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo.Standard.xml +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/RTOSDemo.Standard.xml @@ -1039,7 +1039,7 @@ - + @@ -1090,10 +1090,10 @@ - + - + @@ -1162,7 +1162,7 @@ - + @@ -1192,7 +1192,7 @@ - + @@ -1213,7 +1213,7 @@ - + @@ -1255,13 +1255,13 @@ - + - + - + @@ -1606,7 +1606,7 @@ - + @@ -1627,7 +1627,7 @@ - + @@ -1646,26 +1646,26 @@ - + - + - + - + - + @@ -1686,7 +1686,7 @@ - + @@ -1707,19 +1707,19 @@ - + - + - + @@ -1751,7 +1751,7 @@ - + diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c index 6a446a2b12..128f097d3b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c @@ -143,7 +143,7 @@ extra code. */ #define mainBITMAP_X ( 18 ) #define mainURL_Y ( 8 ) #define mainURL_X ( 78 ) -#define mainSPLASH_SCREEN_DELAY ( 2000 / portTICK_RATE_MS ) +#define mainSPLASH_SCREEN_DELAY ( 2000 / portTICK_PERIOD_MS ) /* Text drawing related constants. */ #define mainLCD_CHAR_HEIGHT ( 13 ) @@ -164,13 +164,13 @@ these can require a larger stack. */ #define mainMAX_MSG_LEN 25 /* The time between cycles of the 'check' task. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The period at which the MEMS input should be updated. */ -#define mainMEMS_DELAY ( ( portTickType ) 100 / portTICK_RATE_MS ) +#define mainMEMS_DELAY ( ( TickType_t ) 100 / portTICK_PERIOD_MS ) /* The rate at which the flash task toggles the LED. */ -#define mainFLASH_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainFLASH_DELAY ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) /* The number of nano seconds between each processor clock. */ #define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) ) @@ -236,7 +236,7 @@ static void prvFlashTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -328,7 +328,7 @@ const char * const pcBlankLine = " "; static void prvCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; xLCDMessage xMessage; static signed char cPassMessage[ mainMAX_MSG_LEN ]; extern unsigned short usMaxJitter; @@ -472,7 +472,7 @@ static void prvSetupHardware( void ) static void prvFlashTask( void *pvParameters ) { -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; /* Initialise the xLastExecutionTime variable on task entry. */ xLastExecutionTime = xTaskGetTickCount(); @@ -489,7 +489,7 @@ portTickType xLastExecutionTime; void starting_delay( unsigned long ul ) { - vTaskDelay( ( portTickType ) ul ); + vTaskDelay( ( TickType_t ) ul ); } diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h index ccd19618fc..aad4a1dc01 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( ( unsigned long ) 62500000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/LCD/lcd.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/LCD/lcd.c index 79e17363b6..c36d1b961a 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/LCD/lcd.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/LCD/lcd.c @@ -49,7 +49,7 @@ static vu16 TextColor = 0x0000, BackColor = 0xFFFF; /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ -#define timerDly( x ) vTaskDelay( ( x * 10 ) / portTICK_RATE_MS ); +#define timerDly( x ) vTaskDelay( ( x * 10 ) / portTICK_PERIOD_MS ); #define vBlockToWait( x ) /******************************************************************************* diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c index d5361a8bdc..402c7d93ae 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c @@ -136,7 +136,7 @@ /* The time between cycles of the 'check' functionality (defined within the tick hook. */ -#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* Task priorities. */ #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -191,7 +191,7 @@ extern void vSetupHighFrequencyTimer( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -347,7 +347,7 @@ static void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will get called if a task overflows its stack. If the parameters are corrupt then inspect pxCurrentTCB to find which was the diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c index 14cac3e015..9859dabc66 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c @@ -103,7 +103,7 @@ hold the send count. This is just #defined to a meaningful name. */ #define SendCount Buffer2NextDescAddr /* If no buffers are available, then wait this long before looking again.... */ -#define uipBUFFER_WAIT_DELAY ( 3 / portTICK_RATE_MS ) +#define uipBUFFER_WAIT_DELAY ( 3 / portTICK_PERIOD_MS ) /* ...and don't look more than this many times. */ #define uipBUFFER_WAIT_ATTEMPTS ( 30 ) @@ -479,7 +479,7 @@ unsigned long ul; void vMAC_ISR( void ) { unsigned long ulStatus; -extern xSemaphoreHandle xEMACSemaphore; +extern SemaphoreHandle_t xEMACSemaphore; long xHigherPriorityTaskWoken = pdFALSE; /* What caused the interrupt? */ diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c index fe24090079..c8f5e7b125 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c @@ -85,7 +85,7 @@ /*-----------------------------------------------------------*/ /* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_RATE_MS ) +#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) /* Shortcut to the header within the Rx buffer. */ #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) @@ -110,7 +110,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore; +SemaphoreHandle_t xEMACSemaphore; /* The buffer used by the uIP stack. In this case the pointer is used to point to one of the Rx buffers. */ @@ -253,7 +253,7 @@ void vApplicationProcessFormInput( char *pcInputString ) char *c, *pcText; static char cMessageForDisplay[ 32 ]; static const char *pcMessage = cMessageForDisplay; -extern xQueueHandle xLCDQueue; +extern QueueHandle_t xLCDQueue; /* Process the form input sent by the IO page of the served HTML. */ diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c index 3bd99894d9..2a89df8f54 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c @@ -109,7 +109,7 @@ static const uint32_t ulReloadValueForOneTick = ( ( lpCLOCK_INPUT_FREQUENCY / co /* Holds the maximum number of ticks that can be suppressed - which is basically how far into the future an interrupt can be generated. Set during initialisation. */ -static portTickType xMaximumPossibleSuppressedTicks = 0; +static TickType_t xMaximumPossibleSuppressedTicks = 0; /* Flag set from the tick interrupt to allow the sleep processing to know if sleep mode was exited because of an tick interrupt or a different interrupt. */ @@ -195,12 +195,12 @@ TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; /* Override the default definition of vPortSuppressTicksAndSleep() that is weakly defined in the FreeRTOS Cortex-M3 port layer with a version that manages the TIM2 interrupt, as the tick is generated from TIM2 compare matches events. */ -void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime ) +void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime ) { uint32_t ulCounterValue, ulCompleteTickPeriods; eSleepModeStatus eSleepAction; -portTickType xModifiableIdleTime; -const portTickType xRegulatorOffIdleTime = 30; +TickType_t xModifiableIdleTime; +const TickType_t xRegulatorOffIdleTime = 30; /* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */ diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h index 148a43bc9e..974699da17 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h @@ -94,11 +94,11 @@ demo, or 0 to run the more comprehensive test and demo application. */ /* A few settings are dependent on the configCREATE_LOW_POWER_DEMO setting. */ #if configCREATE_LOW_POWER_DEMO == 1 #define configTICK_RATE_HZ ( 100 ) - #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. */ + #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. */ #define configUSE_TIMERS 0 #else #define configSYSTICK_CLOCK_HZ ( SystemCoreClock >> 3UL ) /* Systick clock is one eighth the system clock. */ - #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) + #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configUSE_TIMERS 1 #endif /* configCREATE_LOW_POWER_DEMO */ diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c index a036c4312a..e1340c6d00 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c @@ -103,7 +103,7 @@ extern void main_full( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ @@ -234,7 +234,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c index 715a9414b8..8bfd906596 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c @@ -134,20 +134,20 @@ /* The period after which the check timer will expire providing no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Configure the LCD, then write welcome message. @@ -158,7 +158,7 @@ static void prvConfigureLCD( void ); void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* The LCD is only used in the Full demo. */ prvConfigureLCD(); @@ -201,7 +201,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c index 3b6ad8c816..f3ed08d558 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c @@ -174,7 +174,7 @@ empty. */ #define mainQUEUED_VALUE ( 100UL ) /* The length of time the LED will remain on for. */ -#define mainLED_TOGGLE_DELAY ( 10 / portTICK_RATE_MS ) +#define mainLED_TOGGLE_DELAY ( 10 / portTICK_PERIOD_MS ) /*-----------------------------------------------------------*/ @@ -187,19 +187,19 @@ static void prvQueueSendTask( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to pass data from the Tx task to the Rx task. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ /* Holds the block time used by the Tx task. */ -portTickType xSendBlockTime = ( 100UL / portTICK_RATE_MS ); +TickType_t xSendBlockTime = ( 100UL / portTICK_PERIOD_MS ); /* The lower an upper limits of the block time. An infinite block time is used if xSendBlockTime is incremented past xMaxBlockTime. */ -static const portTickType xMaxBlockTime = ( 500L / portTICK_RATE_MS ), xMinBlockTime = ( 100L / portTICK_RATE_MS ); +static const TickType_t xMaxBlockTime = ( 500L / portTICK_PERIOD_MS ), xMinBlockTime = ( 100L / portTICK_PERIOD_MS ); /* The semaphore on which the Tx task blocks. */ -static xSemaphoreHandle xTxSemaphore = NULL; +static SemaphoreHandle_t xTxSemaphore = NULL; /*-----------------------------------------------------------*/ @@ -281,7 +281,7 @@ unsigned long ulReceivedValue; /* Handles interrupts generated by pressing the USER button. */ void EXTI0_IRQHandler(void) { -static const portTickType xIncrement = 200UL / portTICK_RATE_MS; +static const TickType_t xIncrement = 200UL / portTICK_PERIOD_MS; /* If xSendBlockTime is already portMAX_DELAY then the Tx task was blocked indefinitely, and this interrupt is bringing the MCU out of STOP low power diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h index e436bc6174..23b44ea54b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h @@ -82,7 +82,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 32000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c index d707fdd7ae..dfecd5abdc 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c @@ -221,7 +221,7 @@ unsigned long ulTIM6_OverflowCount = 0UL; /* The handle of the queue used to send messages from tasks and interrupts to the LCD task. */ -static xQueueHandle xLCDQueue = NULL; +static QueueHandle_t xLCDQueue = NULL; /* The definition of each message sent from tasks and interrupts to the LCD task. */ @@ -411,7 +411,7 @@ long lHigherPriorityTaskWoken = pdFALSE; void vApplicationTickHook( void ) { static unsigned long ulCounter = 0; -static const unsigned long ulCheckFrequency = 5000UL / portTICK_RATE_MS; +static const unsigned long ulCheckFrequency = 5000UL / portTICK_PERIOD_MS; long lHigherPriorityTaskWoken = pdFALSE; /* Define the status message that is sent to the LCD task. By default the @@ -475,7 +475,7 @@ xQueueMessage xMessage; /* Block for 10 milliseconds so this task does not utilise all the CPU time and debouncing of the button is not necessary. */ - vTaskDelay( 10 / portTICK_RATE_MS ); + vTaskDelay( 10 / portTICK_PERIOD_MS ); } } /*-----------------------------------------------------------*/ @@ -578,7 +578,7 @@ void TIM6_IRQHandler( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c index 659ebc0340..7c7cdc5165 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c @@ -90,14 +90,14 @@ /*-----------------------------------------------------------*/ /* Misc defines. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -147,7 +147,7 @@ NVIC_InitTypeDef NVIC_InitStructure; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -189,7 +189,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c index bb28bb5d9f..63273b7527 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c @@ -117,8 +117,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -147,7 +147,7 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ @@ -184,7 +184,7 @@ void main_blinky( void ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h index 32a94cd790..5313018536 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h @@ -107,7 +107,7 @@ extern uint32_t SystemCoreClock; #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25000 ) ) diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c index 9cc962ba8e..af815a41b8 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c @@ -83,7 +83,7 @@ #define cmdMAX_INPUT_SIZE 50 /* The maximum time in ticks to wait for the UART access mutex. */ -#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_RATE_MS ) +#define cmdMAX_MUTEX_WAIT ( 200 / portTICK_PERIOD_MS ) /* Characters are only ever received slowly on the CLI so it is ok to pass received characters from the UART interrupt to the task on a queue. This sets @@ -129,7 +129,7 @@ static const char * const pcNewLine = "\r\n"; /* Because characters are received slowly (at the speed somebody can type) then it is ok to pass received characters from the Rx interrupt to the task on a queue. This is the queue used for that purpose. */ -static xQueueHandle xRxedChars = NULL; +static QueueHandle_t xRxedChars = NULL; /*-----------------------------------------------------------*/ @@ -251,7 +251,7 @@ portBASE_TYPE xReturned; static void prvSendBuffer( const char * pcBuffer, size_t xBufferLength ) { -const portTickType xVeryShortDelay = 2UL; +const TickType_t xVeryShortDelay = 2UL; if( xBufferLength > 0 ) { diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c index 851654531a..a3cf956c54 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c @@ -151,13 +151,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The standard demo flash timers can be used to flash any number of LEDs. In this case, because only three LEDs are available, and one is in use by the @@ -178,7 +178,7 @@ task. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * Register commands that can be used with FreeRTOS+CLI. The commands are @@ -203,7 +203,7 @@ extern void vCreateAndVerifySampleFiles( void ); void main_full( void ) { -xTimerHandle xCheckTimer = NULL; +TimerHandle_t xCheckTimer = NULL; /* Prepare to run the full demo: Configure the IO, register the CLI commands, and depending on configuration, generate a set of sample files on @@ -259,7 +259,7 @@ xTimerHandle xCheckTimer = NULL; } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; unsigned long ulErrorFound = pdFALSE; diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c index 3185525f8d..f0d40a2a54 100644 --- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c +++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c @@ -103,7 +103,7 @@ extern void main_full( void ); within this file. */ void vApplicationMallocFailedHook( void ); void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); void vApplicationTickHook( void ); /*-----------------------------------------------------------*/ @@ -196,7 +196,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c index e1c9d2abc3..1bac8f7967 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c @@ -85,8 +85,8 @@ static signed char seg7_digits[4]; void vStart7SegTasks( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( prvRefreshTask, "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); - xTaskCreate( prvCountTask, "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL ); + xTaskCreate( prvRefreshTask, "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t *) NULL ); + xTaskCreate( prvCountTask, "7SegCount", x7segSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t *) NULL ); } /*-----------------------------------------------------------*/ @@ -121,7 +121,7 @@ const unsigned char apsx[4] = 0x08 /* A */ }; -portTickType xRefreshRate, xLastRefreshTime; +TickType_t xRefreshRate, xLastRefreshTime; /* Digit to scan */ static int d = 0; @@ -158,7 +158,7 @@ static int d = 0; static void prvCountTask( void *pvParameters ) { -portTickType xCountRate, xLastCountTime; +TickType_t xCountRate, xLastCountTime; /* Approximately 20HZ */ xCountRate = configTICK_RATE_HZ / 20; diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h index ac554455f4..44aee297bc 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h @@ -86,7 +86,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) CLOCK_FREQUENCY ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c index e4676a39c6..c3af8b2b13 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c @@ -127,8 +127,8 @@ /* The rate at which the on board LED will toggle when there is/is not an error. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) #define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 ) /* The size of the memory blocks allocated by the vMemCheckTask() task. */ @@ -192,7 +192,7 @@ int main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD; /* Just to stop compiler warnings. */ ( void ) pvParameters; @@ -276,7 +276,7 @@ long lReturn = pdPASS; } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This function will be called if a task overflows its stack. Inspect pxCurrentTCB to find the offending task if the overflow was sever enough diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c index ee6947a010..0b4aa759c0 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c @@ -95,8 +95,8 @@ static void prvRxHandler( void ) __attribute__((noinline)); /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) @@ -119,7 +119,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports uart1. */ (void) pxPort; @@ -152,7 +152,7 @@ void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { ( void ) pxPort; diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FEC.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FEC.c index 03dd0137fd..35c6a93f05 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FEC.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FEC.c @@ -89,11 +89,11 @@ #define PHY_DUPLEX_STATUS ( 4 ) /* Delay between polling the PHY to see if a link has been established. */ -#define fecLINK_DELAY ( 500 / portTICK_RATE_MS ) +#define fecLINK_DELAY ( 500 / portTICK_PERIOD_MS ) /* Very short delay to use when waiting for the Tx to finish with a buffer if we run out of Rx buffers. */ -#define fecMINIMAL_DELAY ( 3 / portTICK_RATE_MS ) +#define fecMINIMAL_DELAY ( 3 / portTICK_PERIOD_MS ) /* Don't block to wait for a buffer more than this many times. */ #define uipBUFFER_WAIT_ATTEMPTS ( 30 ) @@ -119,7 +119,7 @@ static unsigned char *prvGetFreeBuffer( void ); /*-----------------------------------------------------------*/ /* The semaphore used to wake the uIP task when data arrives. */ -xSemaphoreHandle xFECSemaphore = NULL; +SemaphoreHandle_t xFECSemaphore = NULL; /* The buffer used by the uIP stack. In this case the pointer is used to point to one of the Rx buffers to avoid having to copy the Rx buffer into diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h index d37b85c605..2dffd2887b 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h @@ -97,7 +97,7 @@ before compiling. */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 50000000UL ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 13 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c index d636c59b6d..f406739ccb 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c @@ -98,7 +98,7 @@ clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ /* The semaphore used by the ISR to wake the uIP task. */ -extern xSemaphoreHandle xFECSemaphore; +extern SemaphoreHandle_t xFECSemaphore; /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c index 91bb0fb2d4..929bbdd9f8 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c @@ -196,7 +196,7 @@ extern void vBasicWEBServer( void *pv ); void vApplicationTickHook( void ) { static unsigned long ulExecutionCount = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0; -const unsigned long ulExecutionRate = 5000 / portTICK_RATE_MS; +const unsigned long ulExecutionRate = 5000 / portTICK_PERIOD_MS; /* Increment the count of how many times the tick hook has been called. */ ulExecutionCount++; @@ -299,7 +299,7 @@ static void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { /* This will get called if a stack overflow is detected during the context switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h index d958475405..5f7ff51ada 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h @@ -95,7 +95,7 @@ before compiling. */ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c index 0340036172..afd5517393 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c @@ -107,11 +107,11 @@ /* The time between cycles of the 'check' functionality - as described at the top of this file. */ -#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The rate at which the LED controlled by the 'check' task will flash should an error have been detected. */ -#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED controlled by the 'check' task. */ #define mainCHECK_LED ( 3 ) @@ -198,7 +198,7 @@ int main( void ) static void prvCheckTask( void *pvParameters ) { unsigned long ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; volatile unsigned portBASE_TYPE uxUnusedStack; ( void ) pvParameters; @@ -276,7 +276,7 @@ void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { /* This will get called if a stack overflow is detected during the context switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c index 4bf71606ee..ddd95a94c8 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c @@ -93,8 +93,8 @@ an example of an efficient driver. */ /* The queues used to communicate between tasks and ISR's. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Flag used to indicate the tx status. */ static portBASE_TYPE xTxHasEnded = pdTRUE; @@ -146,7 +146,7 @@ const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWanted } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -164,7 +164,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h index 1fb09c07bf..09654294ac 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h @@ -95,7 +95,7 @@ before compiling. */ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 160 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c index fdb909c2fe..f0756a53b4 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c @@ -116,11 +116,11 @@ /* The time between cycles of the 'check' functionality - as described at the top of this file. */ -#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The rate at which the LED controlled by the 'check' task will flash should an error have been detected. */ -#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED controlled by the 'check' task. */ #define mainCHECK_LED ( 3 ) @@ -207,7 +207,7 @@ extern void vBasicWEBServer( void *pv ); static void prvCheckTask( void *pvParameters ) { unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; ( void ) pvParameters; @@ -291,7 +291,7 @@ void prvSetupHardware( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { /* This will get called if a stack overflow is detected during the context switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h index fa8e58f5e2..b22d3802e1 100644 --- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 64000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 100 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 190 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c index b59edb133c..ab9b4dbc5b 100644 --- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c @@ -112,11 +112,11 @@ /* The time between cycles of the 'check' functionality - as described at the top of this file. */ -#define mainNO_ERROR_PERIOD ( ( portTickType ) 5000 / portTICK_RATE_MS ) +#define mainNO_ERROR_PERIOD ( ( TickType_t ) 5000 / portTICK_PERIOD_MS ) /* The rate at which the LED controlled by the 'check' task will flash should an error have been detected. */ -#define mainERROR_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainERROR_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED controlled by the 'check' task. */ #define mainCHECK_LED ( 3 ) @@ -200,7 +200,7 @@ int main( void ) static void prvCheckTask( void *pvParameters ) { unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0; -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; ( void ) pvParameters; @@ -314,7 +314,7 @@ extern void mcf5xxx_wr_cacr( unsigned long ); } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { /* This will get called if a stack overflow is detected during the context switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c index d3391a7947..5a3faa2a7f 100644 --- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c @@ -95,8 +95,8 @@ an example of an efficient driver. */ /* The queues used to communicate between tasks and ISR's. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Flag used to indicate the tx status. */ static portBASE_TYPE xTxHasEnded = pdTRUE; @@ -152,7 +152,7 @@ const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWanted } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -170,7 +170,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/Common/Full/BlockQ.c b/FreeRTOS/Demo/Common/Full/BlockQ.c index 879af59b9a..ed918c2880 100644 --- a/FreeRTOS/Demo/Common/Full/BlockQ.c +++ b/FreeRTOS/Demo/Common/Full/BlockQ.c @@ -99,7 +99,7 @@ Changes from V1.00: Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. Changes from V4.0.2 @@ -125,8 +125,8 @@ Changes from V4.0.2 /* Structure used to pass parameters to the blocking queue tasks. */ typedef struct BLOCKING_QUEUE_PARAMETERS { - xQueueHandle xQueue; /*< The queue to be used by the task. */ - portTickType xBlockTime; /*< The block time to use on queue reads/writes. */ + QueueHandle_t xQueue; /*< The queue to be used by the task. */ + TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */ } xBlockingQueueParameters; @@ -154,8 +154,8 @@ xBlockingQueueParameters *pxQueueParameters1, *pxQueueParameters2; xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4; xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6; const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5; -const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS; -const portTickType xDontBlock = ( portTickType ) 0; +const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS; +const TickType_t xDontBlock = ( TickType_t ) 0; /* Create the first two tasks as described at the top of the file. */ diff --git a/FreeRTOS/Demo/Common/Full/PollQ.c b/FreeRTOS/Demo/Common/Full/PollQ.c index 2344c763b7..697d96e5ed 100644 --- a/FreeRTOS/Demo/Common/Full/PollQ.c +++ b/FreeRTOS/Demo/Common/Full/PollQ.c @@ -94,7 +94,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -122,7 +122,7 @@ static volatile short sPollingConsumerCount = 0, sPollingProducerCount = 0; void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ) { -static xQueueHandle xPolledQueue; +static QueueHandle_t xPolledQueue; const unsigned portBASE_TYPE uxQueueSize = 10; /* Create the queue used by the producer and consumer. */ @@ -137,8 +137,8 @@ const unsigned portBASE_TYPE uxQueueSize = 10; static void vPolledQueueProducer( void *pvParameters ) { unsigned short usValue = 0, usLoop; -xQueueHandle *pxQueue; -const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; +QueueHandle_t *pxQueue; +const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS; const unsigned short usNumToProduce = 3; const char * const pcTaskStartMsg = "Polled queue producer started.\r\n"; const char * const pcTaskErrorMsg = "Could not post on polled queue.\r\n"; @@ -148,14 +148,14 @@ short sError = pdFALSE; vPrintDisplayMessage( &pcTaskStartMsg ); /* The queue being used is passed in as the parameter. */ - pxQueue = ( xQueueHandle * ) pvParameters; + pxQueue = ( QueueHandle_t * ) pvParameters; for( ;; ) { for( usLoop = 0; usLoop < usNumToProduce; ++usLoop ) { /* Send an incrementing number on the queue without blocking. */ - if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( portTickType ) 0 ) != pdPASS ) + if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( TickType_t ) 0 ) != pdPASS ) { /* We should never find the queue full - this is an error. */ vPrintDisplayMessage( &pcTaskErrorMsg ); @@ -185,8 +185,8 @@ short sError = pdFALSE; static void vPolledQueueConsumer( void *pvParameters ) { unsigned short usData, usExpectedValue = 0; -xQueueHandle *pxQueue; -const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; +QueueHandle_t *pxQueue; +const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS; const char * const pcTaskStartMsg = "Polled queue consumer started.\r\n"; const char * const pcTaskErrorMsg = "Incorrect value received on polled queue.\r\n"; short sError = pdFALSE; @@ -195,14 +195,14 @@ short sError = pdFALSE; vPrintDisplayMessage( &pcTaskStartMsg ); /* The queue being used is passed in as the parameter. */ - pxQueue = ( xQueueHandle * ) pvParameters; + pxQueue = ( QueueHandle_t * ) pvParameters; for( ;; ) { /* Loop until the queue is empty. */ while( uxQueueMessagesWaiting( *pxQueue ) ) { - if( xQueueReceive( *pxQueue, &usData, ( portTickType ) 0 ) == pdPASS ) + if( xQueueReceive( *pxQueue, &usData, ( TickType_t ) 0 ) == pdPASS ) { if( usData != usExpectedValue ) { diff --git a/FreeRTOS/Demo/Common/Full/comtest.c b/FreeRTOS/Demo/Common/Full/comtest.c index 53aebb832c..63ac20b442 100644 --- a/FreeRTOS/Demo/Common/Full/comtest.c +++ b/FreeRTOS/Demo/Common/Full/comtest.c @@ -120,7 +120,7 @@ Changed from V1.2.5 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. + Slight modification to task priorities. */ @@ -139,8 +139,8 @@ Changes from V2.0.0 /* The Tx task will transmit the sequence of characters at a pseudo random interval. This is the maximum and minimum block time between sends. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x15e ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0xc8 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x15e ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0xc8 ) #define comMAX_CONSECUTIVE_ERRORS ( 2 ) @@ -169,7 +169,7 @@ check that both tasks are still executing. */ volatile short sTxCount = 0, sRxCount = 0, sSemCount = 0; /* The handle to the semaphore test task. */ -static xTaskHandle xSemTestTaskHandle = NULL; +static TaskHandle_t xSemTestTaskHandle = NULL; /*-----------------------------------------------------------*/ @@ -188,7 +188,7 @@ const unsigned portBASE_TYPE uxBufferLength = 255; static void vComTxTask( void *pvParameters ) { const char * const pcTaskStartMsg = "COM Tx task started.\r\n"; -portTickType xTimeToWait; +TickType_t xTimeToWait; /* Stop warnings. */ ( void ) pvParameters; @@ -228,7 +228,7 @@ const char * const pcTaskStartMsg = "COM Rx task started.\r\n"; const char * const pcTaskErrorMsg = "COM read error\r\n"; const char * const pcTaskRestartMsg = "COM resynced\r\n"; const char * const pcTaskTimeoutMsg = "COM Rx timed out\r\n"; -const portTickType xBlockTime = ( portTickType ) 0xffff / portTICK_RATE_MS; +const TickType_t xBlockTime = ( TickType_t ) 0xffff / portTICK_PERIOD_MS; const char *pcExpectedChar; portBASE_TYPE xGotChar; char cRxedChar; diff --git a/FreeRTOS/Demo/Common/Full/death.c b/FreeRTOS/Demo/Common/Full/death.c index e593eff9f5..399da71d62 100644 --- a/FreeRTOS/Demo/Common/Full/death.c +++ b/FreeRTOS/Demo/Common/Full/death.c @@ -86,7 +86,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -119,7 +119,7 @@ static const unsigned portBASE_TYPE uxMaxNumberOfExtraTasksRunning = 5; /* Used to store a handle to the tasks that should be killed by a suicidal task, before it kills itself. */ -xTaskHandle xCreatedTask1, xCreatedTask2; +TaskHandle_t xCreatedTask1, xCreatedTask2; /*-----------------------------------------------------------*/ @@ -143,15 +143,15 @@ unsigned portBASE_TYPE *puxPriority; static void vSuicidalTask( void *pvParameters ) { portDOUBLE d1, d2; -xTaskHandle xTaskToKill; -const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS; +TaskHandle_t xTaskToKill; +const TickType_t xDelay = ( TickType_t ) 500 / portTICK_PERIOD_MS; if( pvParameters != NULL ) { /* This task is periodically created four times. Tow created tasks are passed a handle to the other task so it can kill it before killing itself. The other task is passed in null. */ - xTaskToKill = *( xTaskHandle* )pvParameters; + xTaskToKill = *( TaskHandle_t* )pvParameters; } else { @@ -169,7 +169,7 @@ const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS; if( xTaskToKill != NULL ) { /* Make sure the other task has a go before we delete it. */ - vTaskDelay( ( portTickType ) 0 ); + vTaskDelay( ( TickType_t ) 0 ); /* Kill the other task that was created by vCreateTasks(). */ vTaskDelete( xTaskToKill ); /* Kill ourselves. */ @@ -181,7 +181,7 @@ const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS; static void vCreateTasks( void *pvParameters ) { -const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS; +const TickType_t xDelay = ( TickType_t ) 1000 / portTICK_PERIOD_MS; unsigned portBASE_TYPE uxPriority; const char * const pcTaskStartMsg = "Create task started.\r\n"; diff --git a/FreeRTOS/Demo/Common/Full/dynamic.c b/FreeRTOS/Demo/Common/Full/dynamic.c index d2280bdc7a..3687e11223 100644 --- a/FreeRTOS/Demo/Common/Full/dynamic.c +++ b/FreeRTOS/Demo/Common/Full/dynamic.c @@ -132,7 +132,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. + Added a second, simple test that uses the functions vQueueReceiveWhenSuspendedTask() and vQueueSendWhenSuspendedTask(). @@ -177,17 +177,17 @@ static void prvChangePriorityHelperTask( void *pvParameters ); /* Demo task specific constants. */ #define priSTACK_SIZE ( ( unsigned short ) configMINIMAL_STACK_SIZE ) -#define priSLEEP_TIME ( ( portTickType ) 50 ) +#define priSLEEP_TIME ( ( TickType_t ) 50 ) #define priLOOPS ( 5 ) #define priMAX_COUNT ( ( unsigned long ) 0xff ) -#define priNO_BLOCK ( ( portTickType ) 0 ) +#define priNO_BLOCK ( ( TickType_t ) 0 ) #define priSUSPENDED_QUEUE_LENGTH ( 1 ) /*-----------------------------------------------------------*/ /* Handles to the two counter tasks. These could be passed in as parameters to the controller task to prevent them having to be file scope. */ -static xTaskHandle xContinuousIncrementHandle, xLimitedIncrementHandle, xChangePriorityWhenSuspendedHandle; +static TaskHandle_t xContinuousIncrementHandle, xLimitedIncrementHandle, xChangePriorityWhenSuspendedHandle; /* The shared counter variable. This is passed in as a parameter to the two counter variables for demonstration purposes. */ @@ -207,7 +207,7 @@ static portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE; static portBASE_TYPE xPriorityRaiseWhenSuspendedError = pdFALSE; /* Queue used by the second test. */ -xQueueHandle xSuspendedTestQueue; +QueueHandle_t xSuspendedTestQueue; /*-----------------------------------------------------------*/ /* diff --git a/FreeRTOS/Demo/Common/Full/events.c b/FreeRTOS/Demo/Common/Full/events.c index 24b8a25e5e..f87f97fa6f 100644 --- a/FreeRTOS/Demo/Common/Full/events.c +++ b/FreeRTOS/Demo/Common/Full/events.c @@ -126,11 +126,11 @@ static portBASE_TYPE xExpectedTaskCounters[ evtNUM_TASKS ] = { 0, 0, 0, 0 }; /* Handles to the four event tasks. These are required to suspend and resume the tasks. */ -static xTaskHandle xCreatedTasks[ evtNUM_TASKS ]; +static TaskHandle_t xCreatedTasks[ evtNUM_TASKS ]; /* The single queue onto which the controlling task posts, and the four event tasks block. */ -static xQueueHandle xQueue; +static QueueHandle_t xQueue; /* Flag used to indicate whether or not an error has occurred at any time. An error is either the queue being full when not expected, or an unexpected diff --git a/FreeRTOS/Demo/Common/Full/flash.c b/FreeRTOS/Demo/Common/Full/flash.c index af08d83802..0db7b80453 100644 --- a/FreeRTOS/Demo/Common/Full/flash.c +++ b/FreeRTOS/Demo/Common/Full/flash.c @@ -83,7 +83,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. Changes from V2.1.1 @@ -108,7 +108,7 @@ Changes from V2.1.1 typedef struct LED_PARAMETERS { unsigned portBASE_TYPE uxLED; /*< The output the task should use. */ - portTickType xFlashRate; /*< The rate at which the LED should flash. */ + TickType_t xFlashRate; /*< The rate at which the LED should flash. */ } xLEDParameters; /* The task that is created eight times - each time with a different xLEDParaemtes @@ -125,7 +125,7 @@ void vStartLEDFlashTasks( unsigned portBASE_TYPE uxPriority ) unsigned portBASE_TYPE uxLEDTask; xLEDParameters *pxLEDParameters; const unsigned portBASE_TYPE uxNumOfLEDs = 8; -const portTickType xFlashRate = 125; +const TickType_t xFlashRate = 125; /* Create the eight tasks. */ for( uxLEDTask = 0; uxLEDTask < uxNumOfLEDs; ++uxLEDTask ) @@ -134,11 +134,11 @@ const portTickType xFlashRate = 125; created task. */ pxLEDParameters = ( xLEDParameters * ) pvPortMalloc( sizeof( xLEDParameters ) ); pxLEDParameters->uxLED = uxLEDTask; - pxLEDParameters->xFlashRate = ( xFlashRate + ( xFlashRate * ( portTickType ) uxLEDTask ) ); - pxLEDParameters->xFlashRate /= portTICK_RATE_MS; + pxLEDParameters->xFlashRate = ( xFlashRate + ( xFlashRate * ( TickType_t ) uxLEDTask ) ); + pxLEDParameters->xFlashRate /= portTICK_PERIOD_MS; /* Spawn the task. */ - xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, ( void * ) pxLEDParameters, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, ( void * ) pxLEDParameters, uxPriority, ( TaskHandle_t * ) NULL ); } } /*-----------------------------------------------------------*/ @@ -155,11 +155,11 @@ xLEDParameters *pxParameters; for(;;) { /* Delay for half the flash period then turn the LED on. */ - vTaskDelay( pxParameters->xFlashRate / ( portTickType ) 2 ); + vTaskDelay( pxParameters->xFlashRate / ( TickType_t ) 2 ); vParTestToggleLED( pxParameters->uxLED ); /* Delay for half the flash period then turn the LED off. */ - vTaskDelay( pxParameters->xFlashRate / ( portTickType ) 2 ); + vTaskDelay( pxParameters->xFlashRate / ( TickType_t ) 2 ); vParTestToggleLED( pxParameters->uxLED ); } } diff --git a/FreeRTOS/Demo/Common/Full/print.c b/FreeRTOS/Demo/Common/Full/print.c index 1fe147210d..1cb3f77fbb 100644 --- a/FreeRTOS/Demo/Common/Full/print.c +++ b/FreeRTOS/Demo/Common/Full/print.c @@ -91,7 +91,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -103,7 +103,7 @@ Changes from V2.0.0 /* Demo program include files. */ #include "print.h" -static xQueueHandle xPrintQueue; +static QueueHandle_t xPrintQueue; /*-----------------------------------------------------------*/ @@ -119,7 +119,7 @@ const unsigned portBASE_TYPE uxQueueSize = 20; void vPrintDisplayMessage( const char * const * ppcMessageToSend ) { #ifdef USE_STDIO - xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( portTickType ) 0 ); + xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( TickType_t ) 0 ); #else /* Stop warnings. */ ( void ) ppcMessageToSend; @@ -127,7 +127,7 @@ void vPrintDisplayMessage( const char * const * ppcMessageToSend ) } /*-----------------------------------------------------------*/ -const char *pcPrintGetNextMessage( portTickType xPrintRate ) +const char *pcPrintGetNextMessage( TickType_t xPrintRate ) { char *pcMessage; diff --git a/FreeRTOS/Demo/Common/Full/semtest.c b/FreeRTOS/Demo/Common/Full/semtest.c index bfde7ad5e0..2084f8ddfe 100644 --- a/FreeRTOS/Demo/Common/Full/semtest.c +++ b/FreeRTOS/Demo/Common/Full/semtest.c @@ -101,7 +101,7 @@ Changes from V1.2.0: Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. Changes from V2.1.1 @@ -128,7 +128,7 @@ Changes from V2.1.1 #define semtstNUM_TASKS ( 4 ) -#define semtstDELAY_FACTOR ( ( portTickType ) 10 ) +#define semtstDELAY_FACTOR ( ( TickType_t ) 10 ) /* The task function as described at the top of the file. */ static void prvSemaphoreTest( void *pvParameters ); @@ -136,9 +136,9 @@ static void prvSemaphoreTest( void *pvParameters ); /* Structure used to pass parameters to each task. */ typedef struct SEMAPHORE_PARAMETERS { - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; volatile unsigned long *pulSharedVariable; - portTickType xBlockTime; + TickType_t xBlockTime; } xSemaphoreParameters; /* Variables used to check that all the tasks are still running without errors. */ @@ -154,7 +154,7 @@ const char * const pcSemaphoreTaskStart = "Guarded shared variable task started. void vStartSemaphoreTasks( unsigned portBASE_TYPE uxPriority ) { xSemaphoreParameters *pxFirstSemaphoreParameters, *pxSecondSemaphoreParameters; -const portTickType xBlockTime = ( portTickType ) 100; +const TickType_t xBlockTime = ( TickType_t ) 100; /* Create the structure used to pass parameters to the first two tasks. */ pxFirstSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) ); @@ -173,11 +173,11 @@ const portTickType xBlockTime = ( portTickType ) 100; *( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE; /* The first two tasks do not block on semaphore calls. */ - pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0; + pxFirstSemaphoreParameters->xBlockTime = ( TickType_t ) 0; /* Spawn the first two tasks. As they poll they operate at the idle priority. */ - xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); } } @@ -192,10 +192,10 @@ const portTickType xBlockTime = ( portTickType ) 100; { pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) ); *( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE; - pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS; + pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_PERIOD_MS; - xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL ); } } } @@ -225,7 +225,7 @@ short sError = pdFALSE, sCheckVariableToUse; /* If we are blocking we use a much higher count to ensure loads of context switches occur during the count. */ - if( pxParameters->xBlockTime > ( portTickType ) 0 ) + if( pxParameters->xBlockTime > ( TickType_t ) 0 ) { ulExpectedValue = semtstBLOCKING_EXPECTED_VALUE; } @@ -289,7 +289,7 @@ short sError = pdFALSE, sCheckVariableToUse; } else { - if( pxParameters->xBlockTime == ( portTickType ) 0 ) + if( pxParameters->xBlockTime == ( TickType_t ) 0 ) { /* We have not got the semaphore yet, so no point using the processor. We are not blocking when attempting to obtain the diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c index 69225594d2..15ad7dd084 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c +++ b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c @@ -106,8 +106,8 @@ /* Structure used to pass parameters to the blocking queue tasks. */ typedef struct BLOCKING_QUEUE_PARAMETERS { - xQueueHandle xQueue; /*< The queue to be used by the task. */ - portTickType xBlockTime; /*< The block time to use on queue reads/writes. */ + QueueHandle_t xQueue; /*< The queue to be used by the task. */ + TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */ } xBlockingQueueParameters; @@ -135,8 +135,8 @@ xBlockingQueueParameters *pxQueueParameters1, *pxQueueParameters2; xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4; xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6; const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5; -const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS; -const portTickType xDontBlock = ( portTickType ) 0; +const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS; +const TickType_t xDontBlock = ( TickType_t ) 0; /* Create the first two tasks as described at the top of the file. */ diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlock.c b/FreeRTOS/Demo/Common/Minimal/AltBlock.c index 0ae49418e0..2f1ce52c23 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltBlock.c +++ b/FreeRTOS/Demo/Common/Minimal/AltBlock.c @@ -85,19 +85,19 @@ /* Task behaviour. */ #define bktQUEUE_LENGTH ( 5 ) -#define bktSHORT_WAIT ( ( ( portTickType ) 20 ) / portTICK_RATE_MS ) +#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS ) #define bktPRIMARY_BLOCK_TIME ( 10 ) #define bktALLOWABLE_MARGIN ( 12 ) #define bktTIME_TO_BLOCK ( 175 ) -#define bktDONT_BLOCK ( ( portTickType ) 0 ) +#define bktDONT_BLOCK ( ( TickType_t ) 0 ) #define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 ) /* The queue on which the tasks block. */ -static xQueueHandle xTestQueue; +static QueueHandle_t xTestQueue; /* Handle to the secondary task is required by the primary task for calls to vTaskSuspend/Resume(). */ -static xTaskHandle xSecondary; +static TaskHandle_t xSecondary; /* Used to ensure that tasks are still executing without error. */ static portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0; @@ -136,8 +136,8 @@ void vCreateAltBlockTimeTasks( void ) static void vPrimaryBlockTimeTestTask( void *pvParameters ) { portBASE_TYPE xItem, xData; -portTickType xTimeWhenBlocking; -portTickType xTimeToBlock, xBlockedTime; +TickType_t xTimeWhenBlocking; +TickType_t xTimeToBlock, xBlockedTime; #ifdef USE_STDIO void vPrintDisplayMessage( const char * const * ppcMessageToSend ); @@ -415,7 +415,7 @@ portTickType xTimeToBlock, xBlockedTime; static void vSecondaryBlockTimeTestTask( void *pvParameters ) { -portTickType xTimeWhenBlocking, xBlockedTime; +TickType_t xTimeWhenBlocking, xBlockedTime; portBASE_TYPE xData; #ifdef USE_STDIO diff --git a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c index 42d645fca1..fb6a7d6c5e 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c +++ b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c @@ -88,7 +88,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -103,9 +103,9 @@ Changes from V2.0.0 #define pollqSTACK_SIZE configMINIMAL_STACK_SIZE #define pollqQUEUE_SIZE ( 10 ) -#define pollqPRODUCER_DELAY ( ( portTickType ) 200 / portTICK_RATE_MS ) -#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( portTickType ) ( 20 / portTICK_RATE_MS ) ) -#define pollqNO_DELAY ( ( portTickType ) 0 ) +#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS ) +#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) ) +#define pollqNO_DELAY ( ( TickType_t ) 0 ) #define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 ) #define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 ) @@ -123,7 +123,7 @@ static volatile signed portBASE_TYPE xPollingConsumerCount = pollqINITIAL_VALUE, void vStartAltPolledQueueTasks( unsigned portBASE_TYPE uxPriority ) { -static xQueueHandle xPolledQueue; +static QueueHandle_t xPolledQueue; /* Create the queue used by the producer and consumer. */ xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) ); @@ -138,8 +138,8 @@ static xQueueHandle xPolledQueue; /* Spawn the producer and consumer. */ - xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); + xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ @@ -162,7 +162,7 @@ signed portBASE_TYPE xError = pdFALSE, xLoop; for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ ) { /* Send an incrementing number on the queue without blocking. */ - if( xQueueAltSendToBack( *( ( xQueueHandle * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS ) + if( xQueueAltSendToBack( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS ) { /* We should never find the queue full so if we get here there has been an error. */ @@ -208,9 +208,9 @@ signed portBASE_TYPE xError = pdFALSE; for( ;; ) { /* Loop until the queue is empty. */ - while( uxQueueMessagesWaiting( *( ( xQueueHandle * ) pvParameters ) ) ) + while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) ) { - if( xQueueAltReceive( *( ( xQueueHandle * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS ) + if( xQueueAltReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS ) { if( usData != usExpectedValue ) { diff --git a/FreeRTOS/Demo/Common/Minimal/AltQTest.c b/FreeRTOS/Demo/Common/Minimal/AltQTest.c index 08e74bc386..b2bd9c2e11 100644 --- a/FreeRTOS/Demo/Common/Minimal/AltQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/AltQTest.c @@ -135,14 +135,14 @@ static volatile unsigned long ulGuardedVariable = 0; /* Handles used in the mutext test to suspend and resume the high and medium priority mutex test tasks. */ -static xTaskHandle xHighPriorityMutexTask, xMediumPriorityMutexTask; +static TaskHandle_t xHighPriorityMutexTask, xMediumPriorityMutexTask; /*-----------------------------------------------------------*/ void vStartAltGenericQueueTasks( unsigned portBASE_TYPE uxPriority ) { -xQueueHandle xQueue; -xSemaphoreHandle xMutex; +QueueHandle_t xQueue; +SemaphoreHandle_t xMutex; /* Create the queue that we are going to use for the prvSendFrontAndBackTest demo. */ @@ -170,7 +170,7 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Alt_Q_Mutex" ); + vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Alt_Q_Mutex" ); /* Create the mutex demo tasks and pass it the mutex just created. We are passing the mutex handle by value so it does not matter that it is declared @@ -184,7 +184,7 @@ xSemaphoreHandle xMutex; static void prvSendFrontAndBackTest( void *pvParameters ) { unsigned long ulData, ulData2; -xQueueHandle xQueue; +QueueHandle_t xQueue; #ifdef USE_STDIO void vPrintDisplayMessage( const char * const * ppcMessageToSend ); @@ -195,7 +195,7 @@ xQueueHandle xQueue; vPrintDisplayMessage( &pcTaskStartMsg ); #endif - xQueue = ( xQueueHandle ) pvParameters; + xQueue = ( QueueHandle_t ) pvParameters; for( ;; ) { @@ -411,7 +411,7 @@ xQueueHandle xQueue; static void prvLowPriorityMutexTask( void *pvParameters ) { -xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters; +SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters; #ifdef USE_STDIO void vPrintDisplayMessage( const char * const * ppcMessageToSend ); @@ -530,7 +530,7 @@ static void prvMediumPriorityMutexTask( void *pvParameters ) static void prvHighPriorityMutexTask( void *pvParameters ) { -xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters; +SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters; ( void ) pvParameters; diff --git a/FreeRTOS/Demo/Common/Minimal/BlockQ.c b/FreeRTOS/Demo/Common/Minimal/BlockQ.c index 8c5e385424..c69c7353b6 100644 --- a/FreeRTOS/Demo/Common/Minimal/BlockQ.c +++ b/FreeRTOS/Demo/Common/Minimal/BlockQ.c @@ -103,8 +103,8 @@ /* Structure used to pass parameters to the blocking queue tasks. */ typedef struct BLOCKING_QUEUE_PARAMETERS { - xQueueHandle xQueue; /*< The queue to be used by the task. */ - portTickType xBlockTime; /*< The block time to use on queue reads/writes. */ + QueueHandle_t xQueue; /*< The queue to be used by the task. */ + TickType_t xBlockTime; /*< The block time to use on queue reads/writes. */ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */ } xBlockingQueueParameters; @@ -132,8 +132,8 @@ xBlockingQueueParameters *pxQueueParameters1, *pxQueueParameters2; xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4; xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6; const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5; -const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS; -const portTickType xDontBlock = ( portTickType ) 0; +const TickType_t xBlockTime = ( TickType_t ) 1000 / portTICK_PERIOD_MS; +const TickType_t xDontBlock = ( TickType_t ) 0; /* Create the first two tasks as described at the top of the file. */ diff --git a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c index 8abad5142a..616a4c48f9 100644 --- a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c @@ -114,7 +114,7 @@ that synchronise with the xEventGroupSync() function. */ #define ebDONT_BLOCK ( 0 ) /* A 5ms delay. */ -#define ebSHORT_DELAY ( 5 / portTICK_RATE_MS ) +#define ebSHORT_DELAY ( 5 / portTICK_PERIOD_MS ) /* Used in the selective bits test which checks no, one or both tasks blocked on event bits in a group are unblocked as appropriate as different bits get set. */ diff --git a/FreeRTOS/Demo/Common/Minimal/GenQTest.c b/FreeRTOS/Demo/Common/Minimal/GenQTest.c index 9f919f9faa..620a8b4720 100644 --- a/FreeRTOS/Demo/Common/Minimal/GenQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/GenQTest.c @@ -137,14 +137,14 @@ static volatile unsigned long ulGuardedVariable = 0; /* Handles used in the mutext test to suspend and resume the high and medium priority mutex test tasks. */ -static xTaskHandle xHighPriorityMutexTask, xMediumPriorityMutexTask; +static TaskHandle_t xHighPriorityMutexTask, xMediumPriorityMutexTask; /*-----------------------------------------------------------*/ void vStartGenericQueueTasks( unsigned portBASE_TYPE uxPriority ) { -xQueueHandle xQueue; -xSemaphoreHandle xMutex; +QueueHandle_t xQueue; +SemaphoreHandle_t xMutex; /* Create the queue that we are going to use for the prvSendFrontAndBackTest demo. */ @@ -172,7 +172,7 @@ xSemaphoreHandle xMutex; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Gen_Queue_Mutex" ); + vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Gen_Queue_Mutex" ); /* Create the mutex demo tasks and pass it the mutex just created. We are passing the mutex handle by value so it does not matter that it is declared @@ -186,7 +186,7 @@ xSemaphoreHandle xMutex; static void prvSendFrontAndBackTest( void *pvParameters ) { unsigned long ulData, ulData2; -xQueueHandle xQueue; +QueueHandle_t xQueue; #ifdef USE_STDIO void vPrintDisplayMessage( const char * const * ppcMessageToSend ); @@ -197,7 +197,7 @@ xQueueHandle xQueue; vPrintDisplayMessage( &pcTaskStartMsg ); #endif - xQueue = ( xQueueHandle ) pvParameters; + xQueue = ( QueueHandle_t ) pvParameters; for( ;; ) { @@ -413,7 +413,7 @@ xQueueHandle xQueue; static void prvLowPriorityMutexTask( void *pvParameters ) { -xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters; +SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters; #ifdef USE_STDIO void vPrintDisplayMessage( const char * const * ppcMessageToSend ); @@ -545,7 +545,7 @@ static void prvMediumPriorityMutexTask( void *pvParameters ) static void prvHighPriorityMutexTask( void *pvParameters ) { -xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters; +SemaphoreHandle_t xMutex = ( SemaphoreHandle_t ) pvParameters; for( ;; ) { diff --git a/FreeRTOS/Demo/Common/Minimal/IntQueue.c b/FreeRTOS/Demo/Common/Minimal/IntQueue.c index e9828ff534..6fcc07710c 100644 --- a/FreeRTOS/Demo/Common/Minimal/IntQueue.c +++ b/FreeRTOS/Demo/Common/Minimal/IntQueue.c @@ -178,7 +178,7 @@ an interrupt. */ /*-----------------------------------------------------------*/ /* The two queues used by the test. */ -static xQueueHandle xNormallyEmptyQueue, xNormallyFullQueue; +static QueueHandle_t xNormallyEmptyQueue, xNormallyFullQueue; /* Variables used to detect a stall in one of the tasks. */ static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0; @@ -196,7 +196,7 @@ time to each queue. */ volatile unsigned portBASE_TYPE uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0; /* A handle to some of the tasks is required so they can be suspended/resumed. */ -xTaskHandle xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2; +TaskHandle_t xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2; /* When a value is received in a queue the value is ticked off in the array the array position of the value is set to a the identifier of the task or diff --git a/FreeRTOS/Demo/Common/Minimal/PollQ.c b/FreeRTOS/Demo/Common/Minimal/PollQ.c index 18ce9e7d7b..b076775547 100644 --- a/FreeRTOS/Demo/Common/Minimal/PollQ.c +++ b/FreeRTOS/Demo/Common/Minimal/PollQ.c @@ -90,7 +90,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -105,9 +105,9 @@ Changes from V2.0.0 #define pollqSTACK_SIZE configMINIMAL_STACK_SIZE #define pollqQUEUE_SIZE ( 10 ) -#define pollqPRODUCER_DELAY ( ( portTickType ) 200 / portTICK_RATE_MS ) -#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( portTickType ) ( 20 / portTICK_RATE_MS ) ) -#define pollqNO_DELAY ( ( portTickType ) 0 ) +#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS ) +#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) ) +#define pollqNO_DELAY ( ( TickType_t ) 0 ) #define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 ) #define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 ) @@ -125,7 +125,7 @@ static volatile signed portBASE_TYPE xPollingConsumerCount = pollqINITIAL_VALUE, void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ) { -static xQueueHandle xPolledQueue; +static QueueHandle_t xPolledQueue; /* Create the queue used by the producer and consumer. */ xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) ); @@ -139,8 +139,8 @@ static xQueueHandle xPolledQueue; vQueueAddToRegistry( xPolledQueue, "Poll_Test_Queue" ); /* Spawn the producer and consumer. */ - xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); + xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ @@ -154,7 +154,7 @@ signed portBASE_TYPE xError = pdFALSE, xLoop; for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ ) { /* Send an incrementing number on the queue without blocking. */ - if( xQueueSend( *( ( xQueueHandle * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS ) + if( xQueueSend( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS ) { /* We should never find the queue full so if we get here there has been an error. */ @@ -191,9 +191,9 @@ signed portBASE_TYPE xError = pdFALSE; for( ;; ) { /* Loop until the queue is empty. */ - while( uxQueueMessagesWaiting( *( ( xQueueHandle * ) pvParameters ) ) ) + while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) ) { - if( xQueueReceive( *( ( xQueueHandle * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS ) + if( xQueueReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS ) { if( usData != usExpectedValue ) { diff --git a/FreeRTOS/Demo/Common/Minimal/QPeek.c b/FreeRTOS/Demo/Common/Minimal/QPeek.c index 2731654dd2..c5ea6429a4 100644 --- a/FreeRTOS/Demo/Common/Minimal/QPeek.c +++ b/FreeRTOS/Demo/Common/Minimal/QPeek.c @@ -113,12 +113,12 @@ detect a stalled task - a test that is no longer running. */ static volatile unsigned long ulLoopCounter = 0; /* Handles to the test tasks. */ -xTaskHandle xMediumPriorityTask, xHighPriorityTask, xHighestPriorityTask; +TaskHandle_t xMediumPriorityTask, xHighPriorityTask, xHighestPriorityTask; /*-----------------------------------------------------------*/ void vStartQueuePeekTasks( void ) { -xQueueHandle xQueue; +QueueHandle_t xQueue; /* Create the queue that we are going to use for the test/demo. */ xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned long ) ); @@ -143,7 +143,7 @@ xQueueHandle xQueue; static void prvHighestPriorityPeekTask( void *pvParameters ) { -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; unsigned long ulValue; #ifdef USE_STDIO @@ -252,7 +252,7 @@ unsigned long ulValue; static void prvHighPriorityPeekTask( void *pvParameters ) { -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; unsigned long ulValue; for( ;; ) @@ -307,7 +307,7 @@ unsigned long ulValue; static void prvMediumPriorityPeekTask( void *pvParameters ) { -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; unsigned long ulValue; for( ;; ) @@ -348,7 +348,7 @@ unsigned long ulValue; static void prvLowPriorityPeekTask( void *pvParameters ) { -xQueueHandle xQueue = ( xQueueHandle ) pvParameters; +QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters; unsigned long ulValue; for( ;; ) diff --git a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c index 7cb948477c..ea527cd813 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c @@ -95,7 +95,7 @@ static portBASE_TYPE xISRTestStatus = pdPASS; /* The queue that is accessed from the ISR. The queue accessed by the task is created inside the task itself. */ -static xQueueHandle xISRQueue = NULL; +static QueueHandle_t xISRQueue = NULL; /*-----------------------------------------------------------*/ @@ -109,13 +109,13 @@ const unsigned portBASE_TYPE uxQueueLength = 1; /* Create the test task. The queue used by the test task is created inside the task itself. */ - xTaskCreate( prvQueueOverwriteTask, "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvQueueOverwriteTask, "QOver", configMINIMAL_STACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ static void prvQueueOverwriteTask( void *pvParameters ) { -xQueueHandle xTaskQueue; +QueueHandle_t xTaskQueue; const unsigned portBASE_TYPE uxQueueLength = 1; unsigned long ulValue, ulStatus = pdPASS, x; diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSet.c b/FreeRTOS/Demo/Common/Minimal/QueueSet.c index 4fadc20607..0ee6847048 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueSet.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueSet.c @@ -118,7 +118,7 @@ queuesetPRIORITY_CHANGE_LOOPS number of values are sent to a queue. */ /* A delay inserted when the Tx task changes its priority to be above the idle task priority to ensure the idle priority tasks get some CPU time before the next iteration of the queue set Tx task. */ -#define queuesetTX_LOOP_DELAY ( 200 / portTICK_RATE_MS ) +#define queuesetTX_LOOP_DELAY ( 200 / portTICK_PERIOD_MS ) /* The allowable maximum deviation between a received value and the expected received value. A deviation will occur when data is received from a queue @@ -189,14 +189,14 @@ static void prvSRand( unsigned long ulSeed ); /*-----------------------------------------------------------*/ /* The queues that are added to the set. */ -static xQueueHandle xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 }; +static QueueHandle_t xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 }; /* Counts how many times each queue in the set is used to ensure all the queues are used. */ static unsigned long ulQueueUsedCounter[ queuesetNUM_QUEUES_IN_SET ] = { 0 }; /* The handle of the queue set to which the queues are added. */ -static xQueueSetHandle xQueueSet; +static QueueSetHandle_t xQueueSet; /* If the prvQueueSetReceivingTask() task has not detected any errors then it increments ulCycleCounter on each iteration. @@ -222,7 +222,7 @@ static volatile unsigned long ulISRTxValue = queuesetINITIAL_ISR_TX_VALUE; static unsigned long ulNextRand = 0; /* The task handles are stored so their priorities can be changed. */ -xTaskHandle xQueueSetSendingTask, xQueueSetReceivingTask; +TaskHandle_t xQueueSetSendingTask, xQueueSetReceivingTask; /*-----------------------------------------------------------*/ @@ -292,7 +292,7 @@ portBASE_TYPE xReturn = pdPASS, x; static void prvQueueSetSendingTask( void *pvParameters ) { unsigned long ulTaskTxValue = 0, ulQueueToWriteTo; -xQueueHandle xQueueInUse; +QueueHandle_t xQueueInUse; /* Remove compiler warning about the unused parameter. */ ( void ) pvParameters; @@ -390,7 +390,7 @@ static eRelativePriorities ePriorities = eEqualPriority; static void prvQueueSetReceivingTask( void *pvParameters ) { unsigned long ulReceived; -xQueueHandle xActivatedQueue; +QueueHandle_t xActivatedQueue; /* Remove compiler warnings. */ ( void ) pvParameters; @@ -570,7 +570,7 @@ portBASE_TYPE xReturn = pdPASS; static void prvReceiveFromQueueInSetFromISR( void ) { -xQueueSetMemberHandle xActivatedQueue; +QueueSetMemberHandle_t xActivatedQueue; unsigned long ulReceived; /* See if any of the queues in the set contain data. */ diff --git a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c index 35af89bb29..a9a34ef849 100644 --- a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c @@ -84,8 +84,8 @@ #error configTIMER_TASK_PRIORITY must be set to at least 1 for this test/demo to function correctly. #endif -#define tmrdemoDONT_BLOCK ( ( portTickType ) 0 ) -#define tmrdemoONE_SHOT_TIMER_PERIOD ( xBasePeriod * ( portTickType ) 3 ) +#define tmrdemoDONT_BLOCK ( ( TickType_t ) 0 ) +#define tmrdemoONE_SHOT_TIMER_PERIOD ( xBasePeriod * ( TickType_t ) 3 ) #define trmdemoNUM_TIMER_RESETS ( ( unsigned char ) 10 ) /*-----------------------------------------------------------*/ @@ -97,11 +97,11 @@ prvAutoReloadTimerCallback() callback function, and use the ID of the pxExpiredTimer parameter passed into that function to know which counter to increment. The other timers all have their own unique callback function and simply increment their counters without using the callback function parameter. */ -static void prvAutoReloadTimerCallback( xTimerHandle pxExpiredTimer ); -static void prvOneShotTimerCallback( xTimerHandle pxExpiredTimer ); +static void prvAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer ); +static void prvOneShotTimerCallback( TimerHandle_t pxExpiredTimer ); static void prvTimerTestTask( void *pvParameters ); -static void prvISRAutoReloadTimerCallback( xTimerHandle pxExpiredTimer ); -static void prvISROneShotTimerCallback( xTimerHandle pxExpiredTimer ); +static void prvISRAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer ); +static void prvISROneShotTimerCallback( TimerHandle_t pxExpiredTimer ); /* The test functions used by the timer test task. These manipulate the auto reload and one shot timers in various ways, then delay, then inspect the timers @@ -128,33 +128,33 @@ static volatile unsigned long ulLoopCounter = 0; The callback function uses the timer ID to index into, and then increment, a counter in the ucAutoReloadTimerCounters[] array. The auto reload timers referenced from xAutoReloadTimers[] are used by the prvTimerTestTask task. */ -static xTimerHandle xAutoReloadTimers[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 }; +static TimerHandle_t xAutoReloadTimers[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 }; static unsigned char ucAutoReloadTimerCounters[ configTIMER_QUEUE_LENGTH + 1 ] = { 0 }; /* The one shot timer is configured to use a callback function that increments ucOneShotTimerCounter each time it gets called. */ -static xTimerHandle xOneShotTimer = NULL; +static TimerHandle_t xOneShotTimer = NULL; static unsigned char ucOneShotTimerCounter = ( unsigned char ) 0; /* The ISR reload timer is controlled from the tick hook to exercise the timer API functions that can be used from an ISR. It is configured to increment ucISRReloadTimerCounter each time its callback function is executed. */ -static xTimerHandle xISRAutoReloadTimer = NULL; +static TimerHandle_t xISRAutoReloadTimer = NULL; static unsigned char ucISRAutoReloadTimerCounter = ( unsigned char ) 0; /* The ISR one shot timer is controlled from the tick hook to exercise the timer API functions that can be used from an ISR. It is configured to increment ucISRReloadTimerCounter each time its callback function is executed. */ -static xTimerHandle xISROneShotTimer = NULL; +static TimerHandle_t xISROneShotTimer = NULL; static unsigned char ucISROneShotTimerCounter = ( unsigned char ) 0; /* The period of all the timers are a multiple of the base period. The base period is configured by the parameter to vStartTimerDemoTask(). */ -static portTickType xBasePeriod = 0; +static TickType_t xBasePeriod = 0; /*-----------------------------------------------------------*/ -void vStartTimerDemoTask( portTickType xBasePeriodIn ) +void vStartTimerDemoTask( TickType_t xBasePeriodIn ) { /* Start with the timer and counter arrays clear - this is only necessary where the compiler does not clear them automatically on start up. */ @@ -226,17 +226,17 @@ static void prvTimerTestTask( void *pvParameters ) /* This is called to check that the created task is still running and has not detected any errors. */ -portBASE_TYPE xAreTimerDemoTasksStillRunning( portTickType xCycleFrequency ) +portBASE_TYPE xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency ) { static unsigned long ulLastLoopCounter = 0UL; -portTickType xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax; -static portTickType xIterationsWithoutCounterIncrement = ( portTickType ) 0, xLastCycleFrequency; +TickType_t xMaxBlockTimeUsedByTheseTests, xLoopCounterIncrementTimeMax; +static TickType_t xIterationsWithoutCounterIncrement = ( TickType_t ) 0, xLastCycleFrequency; if( xLastCycleFrequency != xCycleFrequency ) { /* The cycle frequency has probably become much faster due to an error elsewhere. Start counting Iterations again. */ - xIterationsWithoutCounterIncrement = ( portTickType ) 0; + xIterationsWithoutCounterIncrement = ( TickType_t ) 0; xLastCycleFrequency = xCycleFrequency; } @@ -244,7 +244,7 @@ static portTickType xIterationsWithoutCounterIncrement = ( portTickType ) 0, xLa function to be called without ulLoopCounter being incremented. This is necessary because the tests in this file block for extended periods, and the block period might be longer than the time between calls to this function. */ - xMaxBlockTimeUsedByTheseTests = ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod; + xMaxBlockTimeUsedByTheseTests = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod; xLoopCounterIncrementTimeMax = ( xMaxBlockTimeUsedByTheseTests / xCycleFrequency ) + 1; /* If the demo task is still running then the loop counter is expected to @@ -263,7 +263,7 @@ static portTickType xIterationsWithoutCounterIncrement = ( portTickType ) 0, xLa { /* ulLoopCounter changed, so the count of times this function was called without a change can be reset to zero. */ - xIterationsWithoutCounterIncrement = ( portTickType ) 0; + xIterationsWithoutCounterIncrement = ( TickType_t ) 0; } ulLastLoopCounter = ulLoopCounter; @@ -286,7 +286,7 @@ unsigned portBASE_TYPE xTimer; been started, so their block times should get set to zero within the timer API itself. */ xAutoReloadTimers[ xTimer ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */ - ( ( xTimer + ( portTickType ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */ + ( ( xTimer + ( TickType_t ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */ pdTRUE, /* Auto-reload is set to true. */ ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */ prvAutoReloadTimerCallback ); /* The callback to be called when the timer expires. */ @@ -388,14 +388,14 @@ unsigned char ucTimer; static void prvTest3_CheckAutoReloadExpireRates( void ) { unsigned char ucMaxAllowableValue, ucMinAllowableValue, ucTimer; -portTickType xBlockPeriod, xTimerPeriod, xExpectedNumber; +TickType_t xBlockPeriod, xTimerPeriod, xExpectedNumber; /* Check the auto reload timers expire at the expected rates. */ /* Delaying for configTIMER_QUEUE_LENGTH * xBasePeriod ticks should allow all the auto reload timers to expire at least once. */ - xBlockPeriod = ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod; + xBlockPeriod = ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod; vTaskDelay( xBlockPeriod ); /* Check that all the auto reload timers have called their callback @@ -404,7 +404,7 @@ portTickType xBlockPeriod, xTimerPeriod, xExpectedNumber; { /* The expected number of expiries is equal to the block period divided by the timer period. */ - xTimerPeriod = ( ( ( portTickType ) ucTimer + ( portTickType ) 1 ) * xBasePeriod ); + xTimerPeriod = ( ( ( TickType_t ) ucTimer + ( TickType_t ) 1 ) * xBasePeriod ); xExpectedNumber = xBlockPeriod / xTimerPeriod; ucMaxAllowableValue = ( ( unsigned char ) xExpectedNumber ) ; @@ -477,7 +477,7 @@ unsigned char ucTimer; /* The timers are now all inactive, so this time, after delaying, none of the callback counters should have incremented. */ - vTaskDelay( ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod ); + vTaskDelay( ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod ); for( ucTimer = 0; ucTimer < ( unsigned char ) configTIMER_QUEUE_LENGTH; ucTimer++ ) { if( ucAutoReloadTimerCounters[ ucTimer ] != ( unsigned char ) 0 ) @@ -525,7 +525,7 @@ static void prvTest5_CheckBasicOneShotTimerBehaviour( void ) /* Delay for three times as long as the one shot timer period, then check to ensure it has only called its callback once, and is now not in the active state. */ - vTaskDelay( tmrdemoONE_SHOT_TIMER_PERIOD * ( portTickType ) 3 ); + vTaskDelay( tmrdemoONE_SHOT_TIMER_PERIOD * ( TickType_t ) 3 ); if( xTimerIsTimerActive( xOneShotTimer ) != pdFALSE ) { @@ -622,7 +622,7 @@ unsigned char ucTimer; } /* Finally delay long enough for both running timers to expire. */ - vTaskDelay( ( ( portTickType ) configTIMER_QUEUE_LENGTH ) * xBasePeriod ); + vTaskDelay( ( ( TickType_t ) configTIMER_QUEUE_LENGTH ) * xBasePeriod ); /* The timers were not reset during the above delay period so should now both have called their callback functions. */ @@ -715,7 +715,7 @@ unsigned char ucTimer; void vTimerPeriodicISRTests( void ) { -static portTickType uxTick = ( portTickType ) -1; +static TickType_t uxTick = ( TickType_t ) -1; #if( configTIMER_TASK_PRIORITY != ( configMAX_PRIORITIES - 1 ) ) /* The timer service task is not the highest priority task, so it cannot @@ -737,9 +737,9 @@ static portTickType uxTick = ( portTickType ) -1; will expire when the kernel's tick count is (100 + xBasePeriod). For this reason xMargin is used as an allowable margin for premature timer expiries as well as late timer expiries. */ - const portTickType xMargin = 6; + const TickType_t xMargin = 6; #else - const portTickType xMargin = 3; + const TickType_t xMargin = 3; #endif @@ -755,7 +755,7 @@ static portTickType uxTick = ( portTickType ) -1; /* It is possible that the timer task has not yet made room in the timer queue. If the timers cannot be started then reset uxTick so another attempt is made later. */ - uxTick = ( portTickType ) -1; + uxTick = ( TickType_t ) -1; /* Try starting first timer. */ if( xTimerChangePeriodFromISR( xISRAutoReloadTimer, xBasePeriod, NULL ) == pdPASS ) @@ -822,7 +822,7 @@ static portTickType uxTick = ( portTickType ) -1; configASSERT( xTestStatus ); } } - else if( uxTick == ( ( 2 * xBasePeriod ) + ( xBasePeriod >> ( portTickType ) 2U ) ) ) + else if( uxTick == ( ( 2 * xBasePeriod ) + ( xBasePeriod >> ( TickType_t ) 2U ) ) ) { /* The auto reload timer will still be active, but the one shot timer should now have stopped. Again though, at this time, neither timer call @@ -1012,14 +1012,14 @@ static portTickType uxTick = ( portTickType ) -1; configASSERT( xTestStatus ); } - uxTick = ( portTickType ) -1; + uxTick = ( TickType_t ) -1; } } /*-----------------------------------------------------------*/ /*** Timer callback functions are defined below here. ***/ -static void prvAutoReloadTimerCallback( xTimerHandle pxExpiredTimer ) +static void prvAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer ) { unsigned long ulTimerID; @@ -1037,7 +1037,7 @@ unsigned long ulTimerID; } /*-----------------------------------------------------------*/ -static void prvOneShotTimerCallback( xTimerHandle pxExpiredTimer ) +static void prvOneShotTimerCallback( TimerHandle_t pxExpiredTimer ) { /* The parameter is not used in this case as only one timer uses this callback function. */ @@ -1047,7 +1047,7 @@ static void prvOneShotTimerCallback( xTimerHandle pxExpiredTimer ) } /*-----------------------------------------------------------*/ -static void prvISRAutoReloadTimerCallback( xTimerHandle pxExpiredTimer ) +static void prvISRAutoReloadTimerCallback( TimerHandle_t pxExpiredTimer ) { /* The parameter is not used in this case as only one timer uses this callback function. */ @@ -1057,7 +1057,7 @@ static void prvISRAutoReloadTimerCallback( xTimerHandle pxExpiredTimer ) } /*-----------------------------------------------------------*/ -static void prvISROneShotTimerCallback( xTimerHandle pxExpiredTimer ) +static void prvISROneShotTimerCallback( TimerHandle_t pxExpiredTimer ) { /* The parameter is not used in this case as only one timer uses this callback function. */ diff --git a/FreeRTOS/Demo/Common/Minimal/blocktim.c b/FreeRTOS/Demo/Common/Minimal/blocktim.c index b1b7f1027e..f5a836a6ae 100644 --- a/FreeRTOS/Demo/Common/Minimal/blocktim.c +++ b/FreeRTOS/Demo/Common/Minimal/blocktim.c @@ -88,19 +88,19 @@ /* Task behaviour. */ #define bktQUEUE_LENGTH ( 5 ) -#define bktSHORT_WAIT ( ( ( portTickType ) 20 ) / portTICK_RATE_MS ) +#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS ) #define bktPRIMARY_BLOCK_TIME ( 10 ) #define bktALLOWABLE_MARGIN ( 15 ) #define bktTIME_TO_BLOCK ( 175 ) -#define bktDONT_BLOCK ( ( portTickType ) 0 ) +#define bktDONT_BLOCK ( ( TickType_t ) 0 ) #define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 ) /* The queue on which the tasks block. */ -static xQueueHandle xTestQueue; +static QueueHandle_t xTestQueue; /* Handle to the secondary task is required by the primary task for calls to vTaskSuspend/Resume(). */ -static xTaskHandle xSecondary; +static TaskHandle_t xSecondary; /* Used to ensure that tasks are still executing without error. */ static volatile portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0; @@ -138,8 +138,8 @@ void vCreateBlockTimeTasks( void ) static void vPrimaryBlockTimeTestTask( void *pvParameters ) { portBASE_TYPE xItem, xData; -portTickType xTimeWhenBlocking; -portTickType xTimeToBlock, xBlockedTime; +TickType_t xTimeWhenBlocking; +TickType_t xTimeToBlock, xBlockedTime; ( void ) pvParameters; @@ -153,7 +153,7 @@ portTickType xTimeToBlock, xBlockedTime; { /* The queue is empty. Attempt to read from the queue using a block time. When we wake, ensure the delta in time is as expected. */ - xTimeToBlock = ( portTickType ) ( bktPRIMARY_BLOCK_TIME << xItem ); + xTimeToBlock = ( TickType_t ) ( bktPRIMARY_BLOCK_TIME << xItem ); xTimeWhenBlocking = xTaskGetTickCount(); @@ -204,7 +204,7 @@ portTickType xTimeToBlock, xBlockedTime; { /* The queue is full. Attempt to write to the queue using a block time. When we wake, ensure the delta in time is as expected. */ - xTimeToBlock = ( portTickType ) ( bktPRIMARY_BLOCK_TIME << xItem ); + xTimeToBlock = ( TickType_t ) ( bktPRIMARY_BLOCK_TIME << xItem ); xTimeWhenBlocking = xTaskGetTickCount(); @@ -388,7 +388,7 @@ portTickType xTimeToBlock, xBlockedTime; static void vSecondaryBlockTimeTestTask( void *pvParameters ) { -portTickType xTimeWhenBlocking, xBlockedTime; +TickType_t xTimeWhenBlocking, xBlockedTime; portBASE_TYPE xData; ( void ) pvParameters; diff --git a/FreeRTOS/Demo/Common/Minimal/comtest.c b/FreeRTOS/Demo/Common/Minimal/comtest.c index 8d2f478451..6da8f2cbf3 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest.c @@ -112,16 +112,16 @@ /* The Tx task will transmit the sequence of characters at a pseudo random interval. This is the maximum and minimum block time between sends. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 ) -#define comOFFSET_TIME ( ( portTickType ) 3 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 ) +#define comOFFSET_TIME ( ( TickType_t ) 3 ) /* We should find that each character can be queued for Tx immediately and we don't have to block to send. */ -#define comNO_BLOCK ( ( portTickType ) 0 ) +#define comNO_BLOCK ( ( TickType_t ) 0 ) /* The Rx task will block on the Rx queue for a long period. */ -#define comRX_BLOCK_TIME ( ( portTickType ) 0xffff ) +#define comRX_BLOCK_TIME ( ( TickType_t ) 0xffff ) /* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */ #define comFIRST_BYTE ( 'A' ) @@ -158,15 +158,15 @@ void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulB xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); /* The Tx task is spawned with a lower priority than the Rx task. */ - xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); - xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComTxTask, "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( TaskHandle_t * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vComTxTask, pvParameters ) { char cByteToSend; -portTickType xTimeToWait; +TickType_t xTimeToWait; /* Just to stop compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c index 0de0a5fa6d..8cb32deda4 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c @@ -119,9 +119,9 @@ /* The Tx timer transmits the sequence of characters at a pseudo random interval that is capped between comTX_MAX_BLOCK_TIME and comTX_MIN_BLOCK_TIME. */ -#define comTX_MAX_BLOCK_TIME ( ( portTickType ) 0x96 ) -#define comTX_MIN_BLOCK_TIME ( ( portTickType ) 0x32 ) -#define comOFFSET_TIME ( ( portTickType ) 3 ) +#define comTX_MAX_BLOCK_TIME ( ( TickType_t ) 0x96 ) +#define comTX_MIN_BLOCK_TIME ( ( TickType_t ) 0x32 ) +#define comOFFSET_TIME ( ( TickType_t ) 3 ) /* States for the simple state machine implemented in the Rx task. */ #define comtstWAITING_START_OF_STRING 0 @@ -132,20 +132,20 @@ a bit so more than one character can be processed at a time. This is relative to comTX_MIN_BLOCK_TIME to ensure it is never longer than the shortest gap between transmissions. It could be worked out more scientifically from the baud rate being used. */ -#define comSHORT_DELAY ( comTX_MIN_BLOCK_TIME >> ( portTickType ) 2 ) +#define comSHORT_DELAY ( comTX_MIN_BLOCK_TIME >> ( TickType_t ) 2 ) /* The string that is transmitted and received. */ #define comTRANSACTED_STRING "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" /* A block time of 0 simply means "don't block". */ -#define comtstDONT_BLOCK ( portTickType ) 0 +#define comtstDONT_BLOCK ( TickType_t ) 0 /* Handle to the com port used by both tasks. */ static xComPortHandle xPort = NULL; /* The callback function allocated to the transmit timer, as described in the comments at the top of this file. */ -static void prvComTxTimerCallback( xTimerHandle xTimer ); +static void prvComTxTimerCallback( TimerHandle_t xTimer ); /* The receive task as described in the comments at the top of this file. */ static void vComRxTask( void *pvParameters ); @@ -161,7 +161,7 @@ static volatile unsigned portBASE_TYPE uxRxLoops = 0UL; /* The timer used to periodically transmit the string. This is the timer that has prvComTxTimerCallback allocated to it as its callback function. */ -static xTimerHandle xTxTimer = NULL; +static TimerHandle_t xTxTimer = NULL; /* The string length is held at file scope so the Tx timer does not need to calculate it each time it executes. */ @@ -188,15 +188,15 @@ void vStartComTestStringsTasks( unsigned portBASE_TYPE uxPriority, unsigned long /* Create the Rx task and the Tx timer. The timer is started from the Rx task. */ - xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vComRxTask, "COMRx", comSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); xTxTimer = xTimerCreate( "TxTimer", comTX_MIN_BLOCK_TIME, pdFALSE, NULL, prvComTxTimerCallback ); configASSERT( xTxTimer ); } /*-----------------------------------------------------------*/ -static void prvComTxTimerCallback( xTimerHandle xTimer ) +static void prvComTxTimerCallback( TimerHandle_t xTimer ) { -portTickType xTimeToWait; +TickType_t xTimeToWait; /* The parameter is not used in this case. */ ( void ) xTimer; diff --git a/FreeRTOS/Demo/Common/Minimal/countsem.c b/FreeRTOS/Demo/Common/Minimal/countsem.c index 954cbf2568..78b7e760ea 100644 --- a/FreeRTOS/Demo/Common/Minimal/countsem.c +++ b/FreeRTOS/Demo/Common/Minimal/countsem.c @@ -111,13 +111,13 @@ static void prvCountingSemaphoreTask( void *pvParameters ); * Utility function to increment the semaphore count value up from zero to * countMAX_COUNT_VALUE. */ -static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); +static void prvIncrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); /* * Utility function to decrement the semaphore count value up from * countMAX_COUNT_VALUE to zero. */ -static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); +static void prvDecrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); /*-----------------------------------------------------------*/ @@ -125,7 +125,7 @@ static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned po typedef struct COUNT_SEM_STRUCT { /* The semaphore to be used for the demo. */ - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; /* Set to countSTART_AT_MAX_COUNT if the semaphore should be created with its count value set to its max count value, or countSTART_AT_ZERO if it @@ -161,8 +161,8 @@ void vStartCountingSemaphoreTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" ); - vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" ); + vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" ); + vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" ); /* Were the semaphores created? */ @@ -175,7 +175,7 @@ void vStartCountingSemaphoreTasks( void ) } /*-----------------------------------------------------------*/ -static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) +static void prvDecrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) { unsigned portBASE_TYPE ux; @@ -211,7 +211,7 @@ unsigned portBASE_TYPE ux; } /*-----------------------------------------------------------*/ -static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) +static void prvIncrementSemaphoreCount( SemaphoreHandle_t xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) { unsigned portBASE_TYPE ux; diff --git a/FreeRTOS/Demo/Common/Minimal/crflash.c b/FreeRTOS/Demo/Common/Minimal/crflash.c index d582b99fec..917089b131 100644 --- a/FreeRTOS/Demo/Common/Minimal/crflash.c +++ b/FreeRTOS/Demo/Common/Minimal/crflash.c @@ -127,7 +127,7 @@ static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE /* The queue used to pass data between the 'fixed delay' co-routines and the 'flash' co-routine. */ -static xQueueHandle xFlashQueue; +static QueueHandle_t xFlashQueue; /* This will be set to pdFALSE if we detect an error. */ static portBASE_TYPE xCoRoutineFlashStatus = pdPASS; @@ -170,14 +170,14 @@ static as we do not need it to maintain its state between blocks. */ signed portBASE_TYPE xResult; /* The uxIndex parameter of the co-routine function is used as an index into the xFlashRates array to obtain the delay period to use. */ -static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS, - 200 / portTICK_RATE_MS, - 250 / portTICK_RATE_MS, - 300 / portTICK_RATE_MS, - 350 / portTICK_RATE_MS, - 400 / portTICK_RATE_MS, - 450 / portTICK_RATE_MS, - 500 / portTICK_RATE_MS }; +static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS, + 200 / portTICK_PERIOD_MS, + 250 / portTICK_PERIOD_MS, + 300 / portTICK_PERIOD_MS, + 350 / portTICK_PERIOD_MS, + 400 / portTICK_PERIOD_MS, + 450 / portTICK_PERIOD_MS, + 500 / portTICK_PERIOD_MS }; /* Co-routines MUST start with a call to crSTART. */ crSTART( xHandle ); diff --git a/FreeRTOS/Demo/Common/Minimal/crhook.c b/FreeRTOS/Demo/Common/Minimal/crhook.c index 693850c9f0..de6b17e27c 100644 --- a/FreeRTOS/Demo/Common/Minimal/crhook.c +++ b/FreeRTOS/Demo/Common/Minimal/crhook.c @@ -130,12 +130,12 @@ void vApplicationTickHook( void ); /* Queues used to send data FROM a co-routine TO the tick hook function. The hook functions received (Rx's) on these queues. One queue per 'hook' co-routine. */ -static xQueueHandle xHookRxQueues[ hookNUM_HOOK_CO_ROUTINES ]; +static QueueHandle_t xHookRxQueues[ hookNUM_HOOK_CO_ROUTINES ]; /* Queues used to send data FROM the tick hook TO a co-routine function. The hood function transmits (Tx's) on these queues. One queue per 'hook' co-routine. */ -static xQueueHandle xHookTxQueues[ hookNUM_HOOK_CO_ROUTINES ]; +static QueueHandle_t xHookTxQueues[ hookNUM_HOOK_CO_ROUTINES ]; /* Set to true if an error is detected at any time. */ static portBASE_TYPE xCoRoutineErrorDetected = pdFALSE; diff --git a/FreeRTOS/Demo/Common/Minimal/death.c b/FreeRTOS/Demo/Common/Minimal/death.c index bd51473f8e..e98e0fb9bb 100644 --- a/FreeRTOS/Demo/Common/Minimal/death.c +++ b/FreeRTOS/Demo/Common/Minimal/death.c @@ -130,7 +130,7 @@ static const unsigned portBASE_TYPE uxMaxNumberOfExtraTasksRunning = 3; /* Used to store a handle to the task that should be killed by a suicidal task, before it kills itself. */ -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; /*-----------------------------------------------------------*/ @@ -168,15 +168,15 @@ unsigned portBASE_TYPE *puxPriority; static portTASK_FUNCTION( vSuicidalTask, pvParameters ) { volatile long l1, l2; -xTaskHandle xTaskToKill; -const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; +TaskHandle_t xTaskToKill; +const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS; if( pvParameters != NULL ) { /* This task is periodically created four times. Two created tasks are passed a handle to the other task so it can kill it before killing itself. The other task is passed in null. */ - xTaskToKill = *( xTaskHandle* )pvParameters; + xTaskToKill = *( TaskHandle_t* )pvParameters; } else { @@ -194,7 +194,7 @@ const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; if( xTaskToKill != NULL ) { /* Make sure the other task has a go before we delete it. */ - vTaskDelay( ( portTickType ) 0 ); + vTaskDelay( ( TickType_t ) 0 ); /* Kill the other task that was created by vCreateTasks(). */ vTaskDelete( xTaskToKill ); @@ -208,7 +208,7 @@ const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; static portTASK_FUNCTION( vCreateTasks, pvParameters ) { -const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS; +const TickType_t xDelay = ( TickType_t ) 1000 / portTICK_PERIOD_MS; unsigned portBASE_TYPE uxPriority; uxPriority = *( unsigned portBASE_TYPE * ) pvParameters; diff --git a/FreeRTOS/Demo/Common/Minimal/dynamic.c b/FreeRTOS/Demo/Common/Minimal/dynamic.c index c6310af5b3..dd11427cfa 100644 --- a/FreeRTOS/Demo/Common/Minimal/dynamic.c +++ b/FreeRTOS/Demo/Common/Minimal/dynamic.c @@ -144,17 +144,17 @@ static portTASK_FUNCTION_PROTO( vQueueSendWhenSuspendedTask, pvParameters ); /* Demo task specific constants. */ #define priSTACK_SIZE ( configMINIMAL_STACK_SIZE ) -#define priSLEEP_TIME ( ( portTickType ) 128 / portTICK_RATE_MS ) +#define priSLEEP_TIME ( ( TickType_t ) 128 / portTICK_PERIOD_MS ) #define priLOOPS ( 5 ) #define priMAX_COUNT ( ( unsigned long ) 0xff ) -#define priNO_BLOCK ( ( portTickType ) 0 ) +#define priNO_BLOCK ( ( TickType_t ) 0 ) #define priSUSPENDED_QUEUE_LENGTH ( 1 ) /*-----------------------------------------------------------*/ /* Handles to the two counter tasks. These could be passed in as parameters to the controller task to prevent them having to be file scope. */ -static xTaskHandle xContinuousIncrementHandle, xLimitedIncrementHandle; +static TaskHandle_t xContinuousIncrementHandle, xLimitedIncrementHandle; /* The shared counter variable. This is passed in as a parameter to the two counter variables for demonstration purposes. */ @@ -169,7 +169,7 @@ static volatile portBASE_TYPE xSuspendedQueueSendError = pdFALSE; static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE; /* Queue used by the second test. */ -xQueueHandle xSuspendedTestQueue; +QueueHandle_t xSuspendedTestQueue; /* The value the queue receive task expects to receive next. This is file scope so xAreDynamicPriorityTasksStillRunning() can ensure it is still diff --git a/FreeRTOS/Demo/Common/Minimal/flash.c b/FreeRTOS/Demo/Common/Minimal/flash.c index c0f459c33a..c387dde012 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash.c +++ b/FreeRTOS/Demo/Common/Minimal/flash.c @@ -89,7 +89,7 @@ #define ledSTACK_SIZE configMINIMAL_STACK_SIZE #define ledNUMBER_OF_LEDS ( 3 ) -#define ledFLASH_RATE_BASE ( ( portTickType ) 333 ) +#define ledFLASH_RATE_BASE ( ( TickType_t ) 333 ) /* Variable used by the created tasks to calculate the LED number to use, and the rate at which they should flash the LED. */ @@ -108,14 +108,14 @@ signed portBASE_TYPE xLEDTask; for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask ) { /* Spawn the task. */ - xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vLEDFlashTask, "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( TaskHandle_t * ) NULL ); } } /*-----------------------------------------------------------*/ static portTASK_FUNCTION( vLEDFlashTask, pvParameters ) { -portTickType xFlashRate, xLastFlashTime; +TickType_t xFlashRate, xLastFlashTime; unsigned portBASE_TYPE uxLED; /* The parameters are not used. */ @@ -132,12 +132,12 @@ unsigned portBASE_TYPE uxLED; } portEXIT_CRITICAL(); - xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( portTickType ) uxLED ); - xFlashRate /= portTICK_RATE_MS; + xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( TickType_t ) uxLED ); + xFlashRate /= portTICK_PERIOD_MS; /* We will turn the LED on and off again in the delay period, so each delay is only half the total period. */ - xFlashRate /= ( portTickType ) 2; + xFlashRate /= ( TickType_t ) 2; /* We need to initialise xLastFlashTime prior to the first call to vTaskDelayUntil(). */ diff --git a/FreeRTOS/Demo/Common/Minimal/flash_timer.c b/FreeRTOS/Demo/Common/Minimal/flash_timer.c index c9bad7844a..35b4856acc 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash_timer.c +++ b/FreeRTOS/Demo/Common/Minimal/flash_timer.c @@ -77,10 +77,10 @@ #include "flash_timer.h" /* The toggle rates are all a multple of ledFLASH_RATE_BASE. */ -#define ledFLASH_RATE_BASE ( ( ( portTickType ) 333 ) / portTICK_RATE_MS ) +#define ledFLASH_RATE_BASE ( ( ( TickType_t ) 333 ) / portTICK_PERIOD_MS ) /* A block time of zero simple means "don't block". */ -#define ledDONT_BLOCK ( ( portTickType ) 0 ) +#define ledDONT_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ @@ -89,14 +89,14 @@ * this function, and the timer ID is used within the function to determine * which timer has actually expired. */ -static void prvLEDTimerCallback( xTimerHandle xTimer ); +static void prvLEDTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ void vStartLEDFlashTimers( unsigned portBASE_TYPE uxNumberOfLEDs ) { unsigned portBASE_TYPE uxLEDTimer; -xTimerHandle xTimer; +TimerHandle_t xTimer; /* Create and start the requested number of timers. */ for( uxLEDTimer = 0; uxLEDTimer < uxNumberOfLEDs; ++uxLEDTimer ) @@ -122,7 +122,7 @@ xTimerHandle xTimer; } /*-----------------------------------------------------------*/ -static void prvLEDTimerCallback( xTimerHandle xTimer ) +static void prvLEDTimerCallback( TimerHandle_t xTimer ) { portBASE_TYPE xTimerID; diff --git a/FreeRTOS/Demo/Common/Minimal/integer.c b/FreeRTOS/Demo/Common/Minimal/integer.c index 8fc03b13d5..eff1511358 100644 --- a/FreeRTOS/Demo/Common/Minimal/integer.c +++ b/FreeRTOS/Demo/Common/Minimal/integer.c @@ -110,7 +110,7 @@ short sTask; for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ ) { - xTaskCreate( vCompeteingIntMathTask, "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( vCompeteingIntMathTask, "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( TaskHandle_t * ) NULL ); } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/recmutex.c b/FreeRTOS/Demo/Common/Minimal/recmutex.c index 62c6ff397b..2bf128a9a0 100644 --- a/FreeRTOS/Demo/Common/Minimal/recmutex.c +++ b/FreeRTOS/Demo/Common/Minimal/recmutex.c @@ -119,9 +119,9 @@ be overridden by a definition in FreeRTOSConfig.h. */ #define recmuMAX_COUNT ( 10 ) /* Misc. */ -#define recmuSHORT_DELAY ( 20 / portTICK_RATE_MS ) -#define recmuNO_DELAY ( ( portTickType ) 0 ) -#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 ) +#define recmuSHORT_DELAY ( 20 / portTICK_PERIOD_MS ) +#define recmuNO_DELAY ( ( TickType_t ) 0 ) +#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 ) /* The three tasks as described at the top of this file. */ static void prvRecursiveMutexControllingTask( void *pvParameters ); @@ -129,7 +129,7 @@ static void prvRecursiveMutexBlockingTask( void *pvParameters ); static void prvRecursiveMutexPollingTask( void *pvParameters ); /* The mutex used by the demo. */ -static xSemaphoreHandle xMutex; +static SemaphoreHandle_t xMutex; /* Variables used to detect and latch errors. */ static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE; @@ -137,7 +137,7 @@ static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles /* Handles of the two higher priority tasks, required so they can be resumed (unsuspended). */ -static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle; +static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle; /*-----------------------------------------------------------*/ @@ -153,7 +153,7 @@ void vStartRecursiveMutexTasks( void ) is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" ); + vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" ); if( xMutex != NULL ) diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c index 5b093a5fab..3240c806d2 100644 --- a/FreeRTOS/Demo/Common/Minimal/semtest.c +++ b/FreeRTOS/Demo/Common/Minimal/semtest.c @@ -105,7 +105,7 @@ #define semtstNUM_TASKS ( 4 ) -#define semtstDELAY_FACTOR ( ( portTickType ) 10 ) +#define semtstDELAY_FACTOR ( ( TickType_t ) 10 ) /* The task function as described at the top of the file. */ static portTASK_FUNCTION_PROTO( prvSemaphoreTest, pvParameters ); @@ -113,9 +113,9 @@ static portTASK_FUNCTION_PROTO( prvSemaphoreTest, pvParameters ); /* Structure used to pass parameters to each task. */ typedef struct SEMAPHORE_PARAMETERS { - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; volatile unsigned long *pulSharedVariable; - portTickType xBlockTime; + TickType_t xBlockTime; } xSemaphoreParameters; /* Variables used to check that all the tasks are still running without errors. */ @@ -127,7 +127,7 @@ static volatile short sNextCheckVariable = 0; void vStartSemaphoreTasks( unsigned portBASE_TYPE uxPriority ) { xSemaphoreParameters *pxFirstSemaphoreParameters, *pxSecondSemaphoreParameters; -const portTickType xBlockTime = ( portTickType ) 100; +const TickType_t xBlockTime = ( TickType_t ) 100; /* Create the structure used to pass parameters to the first two tasks. */ pxFirstSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) ); @@ -147,11 +147,11 @@ const portTickType xBlockTime = ( portTickType ) 100; *( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE; /* The first two tasks do not block on semaphore calls. */ - pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0; + pxFirstSemaphoreParameters->xBlockTime = ( TickType_t ) 0; /* Spawn the first two tasks. As they poll they operate at the idle priority. */ - xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); + xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); } } @@ -167,10 +167,10 @@ const portTickType xBlockTime = ( portTickType ) 100; { pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) ); *( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE; - pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS; + pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_PERIOD_MS; - xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); - xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL ); + xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL ); } } @@ -180,8 +180,8 @@ const portTickType xBlockTime = ( portTickType ) 100; is not being used. The call to vQueueAddToRegistry() will be removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ - vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" ); - vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" ); + vQueueAddToRegistry( ( QueueHandle_t ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" ); + vQueueAddToRegistry( ( QueueHandle_t ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" ); } /*-----------------------------------------------------------*/ @@ -206,7 +206,7 @@ short sError = pdFALSE, sCheckVariableToUse; /* If we are blocking we use a much higher count to ensure loads of context switches occur during the count. */ - if( pxParameters->xBlockTime > ( portTickType ) 0 ) + if( pxParameters->xBlockTime > ( TickType_t ) 0 ) { ulExpectedValue = semtstBLOCKING_EXPECTED_VALUE; } @@ -264,7 +264,7 @@ short sError = pdFALSE, sCheckVariableToUse; } else { - if( pxParameters->xBlockTime == ( portTickType ) 0 ) + if( pxParameters->xBlockTime == ( TickType_t ) 0 ) { /* We have not got the semaphore yet, so no point using the processor. We are not blocking when attempting to obtain the diff --git a/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/lcd.c b/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/lcd.c index 48d8625274..55a6e86b65 100644 --- a/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/lcd.c +++ b/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/lcd.c @@ -439,7 +439,7 @@ void LCD_Init(void) LCD_WriteReg(R1, 0x10); LCD_WriteReg(R0, 0xA0); LCD_WriteReg(R3, 0x01); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R3, 0x00); LCD_WriteReg(R43, 0x04); @@ -453,18 +453,18 @@ void LCD_Init(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ /* Chip Set ------------------------------------------------------------------*/ LCD_WriteReg(R157, 0x00); @@ -539,7 +539,7 @@ void LCD_Init(void) LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -808,7 +808,7 @@ void LCD_ScrollText(u8 Line, u8 *ptr) /* Increment the character counter */ i++; } - vTaskDelay( 100 / portTICK_RATE_MS ); + vTaskDelay( 100 / portTICK_PERIOD_MS ); i = 0; //LCD_ClearLine(Line); ptr -= length; @@ -1153,18 +1153,18 @@ void LCD_PowerOn(void) LCD_WriteReg(R36, 0x74); LCD_WriteReg(R30, 0x01); LCD_WriteReg(R24, 0xC1); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R24, 0xE1); LCD_WriteReg(R24, 0xF1); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R24, 0xF5); - vTaskDelay( 60 / portTICK_RATE_MS ); /* Delay 60 ms */ + vTaskDelay( 60 / portTICK_PERIOD_MS ); /* Delay 60 ms */ LCD_WriteReg(R27, 0x09); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ LCD_WriteReg(R31, 0x11); LCD_WriteReg(R32, 0x0E); LCD_WriteReg(R30, 0x81); - vTaskDelay( 10 / portTICK_RATE_MS ); /* Delay 10 ms */ + vTaskDelay( 10 / portTICK_PERIOD_MS ); /* Delay 10 ms */ } /******************************************************************************* @@ -1182,7 +1182,7 @@ void LCD_DisplayOn(void) /* Display On */ LCD_WriteReg(R0, 0x80); LCD_WriteReg(R59, 0x01); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R0, 0x20); } @@ -1197,7 +1197,7 @@ void LCD_DisplayOff(void) { /* Display Off */ LCD_WriteReg(R0, 0xA0); - vTaskDelay( 40 / portTICK_RATE_MS ); /* Delay 40 ms */ + vTaskDelay( 40 / portTICK_PERIOD_MS ); /* Delay 40 ms */ LCD_WriteReg(R59, 0x00); } diff --git a/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/stm32fxxx_eth.c b/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/stm32fxxx_eth.c index 6889a9fe34..29d03b88c3 100644 --- a/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/stm32fxxx_eth.c +++ b/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/src/stm32fxxx_eth.c @@ -64,8 +64,8 @@ ETH_DMADESCTypeDef *DMAPTPRxDescToGet; #define ETH_ERROR ((u32)0) #define ETH_SUCCESS ((u32)1) -#define ethFIVE_SECONDS ( 5000 / portTICK_RATE_MS ) -#define ethHUNDRED_MS ( 100 / portTICK_RATE_MS ) +#define ethFIVE_SECONDS ( 5000 / portTICK_PERIOD_MS ) +#define ethHUNDRED_MS ( 100 / portTICK_PERIOD_MS ) /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ @@ -191,7 +191,7 @@ u32 ETH_Init(ETH_InitTypeDef* ETH_InitStruct, u16 PHYAddress) } /* Delay to assure PHY reset */ - vTaskDelay( 250 / portTICK_RATE_MS ); + vTaskDelay( 250 / portTICK_PERIOD_MS ); if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { @@ -277,7 +277,7 @@ u32 ETH_Init(ETH_InitTypeDef* ETH_InitStruct, u16 PHYAddress) return ETH_ERROR; } - vTaskDelay( 250 / portTICK_RATE_MS ); + vTaskDelay( 250 / portTICK_PERIOD_MS ); } /*------------------------- ETHERNET MACCR Configuration ---------------------*/ diff --git a/FreeRTOS/Demo/Common/ethernet/FreeTCPIP/net/clock-arch.h b/FreeRTOS/Demo/Common/ethernet/FreeTCPIP/net/clock-arch.h index 73d32e20a5..293e0262e3 100644 --- a/FreeRTOS/Demo/Common/ethernet/FreeTCPIP/net/clock-arch.h +++ b/FreeRTOS/Demo/Common/ethernet/FreeTCPIP/net/clock-arch.h @@ -36,7 +36,7 @@ #include "FreeRTOS.h" -typedef portTickType clock_time_t; +typedef TickType_t clock_time_t; #define CLOCK_CONF_SECOND configTICK_RATE_HZ #endif /* __CLOCK_ARCH_H__ */ diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c index 36e612f084..3e885f3dd2 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/MCF5225x_ethernetif.c @@ -38,7 +38,7 @@ #include "FreeRTOS.h" #include "task.h" -xTaskHandle xEthIntTask; +TaskHandle_t xEthIntTask; /* lwIP includes. */ #include "lwip/def.h" @@ -55,10 +55,10 @@ xTaskHandle xEthIntTask; /* Delay to wait for a DMA buffer to become available if one is not already available. */ #define netifBUFFER_WAIT_ATTEMPTS 10 -#define netifBUFFER_WAIT_DELAY (10 / portTICK_RATE_MS) +#define netifBUFFER_WAIT_DELAY (10 / portTICK_PERIOD_MS) /* Delay between polling the PHY to see if a link has been established. */ -#define netifLINK_DELAY ( 500 / portTICK_RATE_MS ) +#define netifLINK_DELAY ( 500 / portTICK_PERIOD_MS ) /* Delay between looking for incoming packets. In ideal world this would be infinite. */ @@ -85,7 +85,7 @@ static unsigned char ucFECRxBuffers[ ( configNUM_FEC_RX_BUFFERS * configFEC_BUFF static unsigned portBASE_TYPE uxNextRxBuffer = 0, uxNextTxBuffer = 0; /* Semaphore used by the FEC interrupt handler to wake the handler task. */ -static xSemaphoreHandle xFecSemaphore; +static SemaphoreHandle_t xFecSemaphore; #pragma options align= packed struct ethernetif diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c index 7097b3307c..18e3955677 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/__sys_arch.c @@ -56,16 +56,16 @@ /* This is the number of threads that can be started with sys_thead_new() */ #define SYS_MBOX_SIZE ( 16 ) #define MS_TO_TICKS( ms ) \ - ( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS ) + ( TickType_t )( ( TickType_t ) ( ms ) / portTICK_PERIOD_MS ) #define TICKS_TO_MS( ticks ) \ - ( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS ) + ( unsigned long )( ( TickType_t ) ( ticks ) * portTICK_PERIOD_MS ) #define THREAD_STACK_SIZE ( 256 /*FSL:1024*/ ) #define THREAD_NAME "lwIP" #define THREAD_INIT( tcb ) \ do { \ tcb->next = NULL; \ - tcb->pid = ( xTaskHandle )0; \ + tcb->pid = ( TaskHandle_t )0; \ tcb->timeouts.next = NULL; \ } while( 0 ) @@ -74,7 +74,7 @@ typedef struct sys_tcb { struct sys_tcb *next; struct sys_timeouts timeouts; - xTaskHandle pid; + TaskHandle_t pid; } sys_tcb_t; /* ------------------------ Prototypes ------------------------------------ */ @@ -223,7 +223,7 @@ sys_arch_thread_remove( sys_thread_t hdl ) { sys_tcb_t *current = tasks, *prev; sys_tcb_t *toremove = hdl; - xTaskHandle pid = ( xTaskHandle ) 0; + TaskHandle_t pid = ( TaskHandle_t ) 0; LWIP_ASSERT( "sys_arch_thread_remove: assertion hdl != NULL failed!", hdl != NULL ); @@ -261,7 +261,7 @@ sys_arch_thread_remove( sys_thread_t hdl ) * resources. */ vPortExitCritical( ); - if( pid != ( xTaskHandle ) 0 ) + if( pid != ( TaskHandle_t ) 0 ) { vTaskDelete( pid ); /* not reached. */ @@ -276,7 +276,7 @@ sys_thread_t sys_arch_thread_current( void ) { sys_tcb_t *p = tasks; - xTaskHandle pid = xTaskGetCurrentTaskHandle( ); + TaskHandle_t pid = xTaskGetCurrentTaskHandle( ); vPortEnterCritical( ); while( ( p != NULL ) && ( p->pid != pid ) ) @@ -316,7 +316,7 @@ sys_arch_timeouts( void ) sys_sem_t sys_sem_new( u8_t count ) { - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; vSemaphoreCreateBinary( xSemaphore ); if( xSemaphore != SYS_SEM_NULL ) @@ -386,7 +386,7 @@ u32_t sys_arch_sem_wait( sys_sem_t sem, u32_t timeout ) { portBASE_TYPE xStatus; - portTickType xTicksStart, xTicksEnd, xTicksElapsed; + TickType_t xTicksStart, xTicksEnd, xTicksElapsed; u32_t timespent; LWIP_ASSERT( "sys_arch_sem_wait: sem != SYS_SEM_NULL", sem != SYS_SEM_NULL ); @@ -425,7 +425,7 @@ sys_arch_sem_wait( sys_sem_t sem, u32_t timeout ) sys_mbox_t sys_mbox_new( /*paolo:void*/int size ) { - xQueueHandle mbox; + QueueHandle_t mbox; mbox = xQueueCreate( SYS_MBOX_SIZE/*size*/, sizeof( void * ) ); if( mbox != SYS_MBOX_NULL ) @@ -523,7 +523,7 @@ sys_arch_mbox_fetch( sys_mbox_t mbox, void **msg, u32_t timeout ) { void *ret_msg; portBASE_TYPE xStatus; - portTickType xTicksStart, xTicksEnd, xTicksElapsed; + TickType_t xTicksStart, xTicksEnd, xTicksElapsed; u32_t timespent; LWIP_ASSERT( "sys_arch_mbox_fetch: mbox != SYS_MBOX_NULL", mbox != SYS_MBOX_NULL ); @@ -565,7 +565,7 @@ sys_arch_mbox_fetch( sys_mbox_t mbox, void **msg, u32_t timeout ) u32_t sys_jiffies( void ) { - portTickType xTicks = xTaskGetTickCount( ); + TickType_t xTicks = xTaskGetTickCount( ); return ( u32_t )TICKS_TO_MS( xTicks ); } diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/arch/sys_arch.h b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/arch/sys_arch.h index 9fee9b5c43..20b2e9d39b 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/arch/sys_arch.h +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/ColdFire/arch/sys_arch.h @@ -37,12 +37,12 @@ #include "queue.h" #include "semphr.h" -#define SYS_MBOX_NULL (xQueueHandle)0 -#define SYS_SEM_NULL (xSemaphoreHandle)0 +#define SYS_MBOX_NULL (QueueHandle_t)0 +#define SYS_SEM_NULL (SemaphoreHandle_t)0 -typedef xSemaphoreHandle sys_sem_t; -typedef xQueueHandle sys_mbox_t; -typedef xTaskHandle sys_thread_t; +typedef SemaphoreHandle_t sys_sem_t; +typedef QueueHandle_t sys_mbox_t; +typedef TaskHandle_t sys_thread_t; /* Message queue constants. */ #define archMESG_QUEUE_LENGTH ( 6 ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/STR91x/arch/sys_arch.h b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/STR91x/arch/sys_arch.h index 870bfc8455..2f50a9b6cd 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/STR91x/arch/sys_arch.h +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/STR91x/arch/sys_arch.h @@ -37,12 +37,12 @@ #include "queue.h" #include "semphr.h" -#define SYS_MBOX_NULL (xQueueHandle)0 -#define SYS_SEM_NULL (xSemaphoreHandle)0 +#define SYS_MBOX_NULL (QueueHandle_t)0 +#define SYS_SEM_NULL (SemaphoreHandle_t)0 -typedef xSemaphoreHandle sys_sem_t; -typedef xQueueHandle sys_mbox_t; -typedef xTaskHandle sys_thread_t; +typedef SemaphoreHandle_t sys_sem_t; +typedef QueueHandle_t sys_mbox_t; +typedef TaskHandle_t sys_thread_t; /* Message queue constants. */ #define archMESG_QUEUE_LENGTH ( 6 ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c index bd7ff38fbc..4f781c11a1 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/contrib/port/FreeRTOS/sys_arch.c @@ -40,7 +40,7 @@ struct timeoutlist { struct sys_timeouts timeouts; - xTaskHandle pid; + TaskHandle_t pid; }; /* This is the number of threads that can be started with sys_thread_new() */ @@ -54,7 +54,7 @@ static u16_t s_nextthread = 0; // Creates an empty mailbox. sys_mbox_t sys_mbox_new(int size) { - xQueueHandle mbox; + QueueHandle_t mbox; ( void ) size; @@ -146,7 +146,7 @@ err_t result; u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout) { void *dummyptr; -portTickType StartTime, EndTime, Elapsed; +TickType_t StartTime, EndTime, Elapsed; StartTime = xTaskGetTickCount(); @@ -157,10 +157,10 @@ portTickType StartTime, EndTime, Elapsed; if ( timeout != 0 ) { - if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_RATE_MS ) ) + if ( pdTRUE == xQueueReceive( mbox, &(*msg), timeout / portTICK_PERIOD_MS ) ) { EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS; return ( Elapsed ); } @@ -175,7 +175,7 @@ portTickType StartTime, EndTime, Elapsed; { while( pdTRUE != xQueueReceive( mbox, &(*msg), portMAX_DELAY ) ){} // time is arbitrary EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS; return ( Elapsed ); // return time blocked TODO test } @@ -210,7 +210,7 @@ void *dummyptr; // the initial state of the semaphore. sys_sem_t sys_sem_new(u8_t count) { - xSemaphoreHandle xSemaphore; + SemaphoreHandle_t xSemaphore; vSemaphoreCreateBinary( xSemaphore ); @@ -257,16 +257,16 @@ sys_sem_t sys_sem_new(u8_t count) */ u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout) { -portTickType StartTime, EndTime, Elapsed; +TickType_t StartTime, EndTime, Elapsed; StartTime = xTaskGetTickCount(); if( timeout != 0) { - if( xSemaphoreTake( sem, timeout / portTICK_RATE_MS ) == pdTRUE ) + if( xSemaphoreTake( sem, timeout / portTICK_PERIOD_MS ) == pdTRUE ) { EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS; return (Elapsed); // return time blocked TODO test } @@ -279,7 +279,7 @@ portTickType StartTime, EndTime, Elapsed; { while( xSemaphoreTake( sem, portMAX_DELAY ) != pdTRUE ){} EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + Elapsed = (EndTime - StartTime) * portTICK_PERIOD_MS; return ( Elapsed ); // return time blocked @@ -337,7 +337,7 @@ void sys_init(void) struct sys_timeouts *sys_arch_timeouts(void) { int i; -xTaskHandle pid; +TaskHandle_t pid; struct timeoutlist *tl; pid = xTaskGetCurrentTaskHandle( ); @@ -367,7 +367,7 @@ struct timeoutlist *tl; */ sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio) { -xTaskHandle CreatedTask; +TaskHandle_t CreatedTask; int result; if ( s_nextthread < SYS_THREAD_MAX ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c index ee5dc7bbda..87042f8511 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwIP_130/src/netif/stf91x_ethernetif.c @@ -54,12 +54,12 @@ #define netifINTERFACE_TASK_STACK_SIZE ( 350 ) #define netifINTERFACE_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) #define netifBUFFER_WAIT_ATTEMPTS 10 -#define netifBUFFER_WAIT_DELAY (10 / portTICK_RATE_MS) +#define netifBUFFER_WAIT_DELAY (10 / portTICK_PERIOD_MS) #define IFNAME0 'e' #define IFNAME1 'n' /* The time to block waiting for input. */ -#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 ) +#define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( TickType_t ) 100 ) /* Interrupt status bit definition. */ #define DMI_RX_CURRENT_DONE 0x8000 @@ -67,7 +67,7 @@ static u8_t s_rxBuff[1520]; /* The semaphore used by the ISR to wake the lwIP task. */ -static xSemaphoreHandle s_xSemaphore = NULL; +static SemaphoreHandle_t s_xSemaphore = NULL; struct ethernetif { struct eth_addr *ethaddr; diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c index 1b59a3077d..60171fb98d 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c @@ -91,7 +91,7 @@ * milliseconds. It will do this a maximum of netifMAX_TX_ATTEMPTS before * giving up. */ -#define netifTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define netifTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_PERIOD_MS ) #define netifMAX_TX_ATTEMPTS ( 5 ) #define netifMAX_MTU 1500 diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/include/arch/sys_arch.h b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/include/arch/sys_arch.h index 3daf87bc6f..3fc373998d 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/include/arch/sys_arch.h +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/include/arch/sys_arch.h @@ -37,14 +37,14 @@ #include "queue.h" #include "semphr.h" -#define SYS_MBOX_NULL ( ( xQueueHandle ) NULL ) -#define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL ) +#define SYS_MBOX_NULL ( ( QueueHandle_t ) NULL ) +#define SYS_SEM_NULL ( ( SemaphoreHandle_t ) NULL ) #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE -typedef xSemaphoreHandle sys_sem_t; -typedef xSemaphoreHandle sys_mutex_t; -typedef xQueueHandle sys_mbox_t; -typedef xTaskHandle sys_thread_t; +typedef SemaphoreHandle_t sys_sem_t; +typedef SemaphoreHandle_t sys_mutex_t; +typedef QueueHandle_t sys_mbox_t; +typedef TaskHandle_t sys_thread_t; #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c index 8e07c13f05..fa1c20ef12 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c @@ -150,7 +150,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } else { - xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( portTickType ) 0 ); + xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); } if( xReturn == pdPASS ) @@ -195,7 +195,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut ) { void *pvDummy; -portTickType xStartTime, xEndTime, xElapsed; +TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); @@ -209,10 +209,10 @@ unsigned long ulReturn; { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); - if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_RATE_MS ) ) + if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) { xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; ulReturn = xElapsed; } @@ -227,7 +227,7 @@ unsigned long ulReturn; { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) { @@ -349,17 +349,17 @@ err_t xReturn = ERR_MEM; *---------------------------------------------------------------------------*/ u32_t sys_arch_sem_wait( sys_sem_t *pxSemaphore, u32_t ulTimeout ) { -portTickType xStartTime, xEndTime, xElapsed; +TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); if( ulTimeout != 0UL ) { - if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_RATE_MS ) == pdTRUE ) + if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE ) { xEndTime = xTaskGetTickCount(); - xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS; + xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; ulReturn = xElapsed; } else @@ -371,7 +371,7 @@ unsigned long ulReturn; { while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE ); xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) { @@ -501,7 +501,7 @@ u32_t sys_now(void) *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c index 0065349bc3..5d293aa643 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c @@ -335,7 +335,7 @@ static void prvInterruptSimulator( void *pvParameters ) { static struct pcap_pkthdr *pxHeader; const unsigned char *pucPacketData; -extern xQueueHandle xEMACEventQueue; +extern QueueHandle_t xEMACEventQueue; const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; long lResult; diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c index f4e210e251..845e74c413 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c @@ -587,7 +587,7 @@ static void prvInterruptSimulator( void *pvParameters ) { static struct pcap_pkthdr *pxHeader; const unsigned char *pucPacketData; -extern xQueueHandle xEMACEventQueue; +extern QueueHandle_t xEMACEventQueue; long lResult; /* Just to kill the compiler warning. */ diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h index 3daf87bc6f..3fc373998d 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h @@ -37,14 +37,14 @@ #include "queue.h" #include "semphr.h" -#define SYS_MBOX_NULL ( ( xQueueHandle ) NULL ) -#define SYS_SEM_NULL ( ( xSemaphoreHandle ) NULL ) +#define SYS_MBOX_NULL ( ( QueueHandle_t ) NULL ) +#define SYS_SEM_NULL ( ( SemaphoreHandle_t ) NULL ) #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE -typedef xSemaphoreHandle sys_sem_t; -typedef xSemaphoreHandle sys_mutex_t; -typedef xQueueHandle sys_mbox_t; -typedef xTaskHandle sys_thread_t; +typedef SemaphoreHandle_t sys_sem_t; +typedef SemaphoreHandle_t sys_mutex_t; +typedef QueueHandle_t sys_mbox_t; +typedef TaskHandle_t sys_thread_t; #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c index 904ffc8a9f..78b129867a 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/sys_arch.c @@ -180,7 +180,7 @@ err_t xReturn; u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut ) { void *pvDummy; -portTickType xStartTime, xEndTime, xElapsed; +TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); @@ -192,10 +192,10 @@ unsigned long ulReturn; if( ulTimeOut != 0UL ) { - if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_RATE_MS ) ) + if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) { xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; ulReturn = xElapsed; } @@ -210,7 +210,7 @@ unsigned long ulReturn; { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) { @@ -321,17 +321,17 @@ err_t xReturn = ERR_MEM; *---------------------------------------------------------------------------*/ u32_t sys_arch_sem_wait( sys_sem_t *pxSemaphore, u32_t ulTimeout ) { -portTickType xStartTime, xEndTime, xElapsed; +TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); if( ulTimeout != 0UL ) { - if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_RATE_MS ) == pdTRUE ) + if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE ) { xEndTime = xTaskGetTickCount(); - xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS; + xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; ulReturn = xElapsed; } else @@ -343,7 +343,7 @@ unsigned long ulReturn; { while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE ); xEndTime = xTaskGetTickCount(); - xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) { @@ -464,7 +464,7 @@ u32_t sys_now(void) *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { -xTaskHandle xCreatedTask; +TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; diff --git a/FreeRTOS/Demo/Common/include/TimerDemo.h b/FreeRTOS/Demo/Common/include/TimerDemo.h index 8cdcde6290..a99a3c76fa 100644 --- a/FreeRTOS/Demo/Common/include/TimerDemo.h +++ b/FreeRTOS/Demo/Common/include/TimerDemo.h @@ -66,8 +66,8 @@ #ifndef TIMER_DEMO_H #define TIMER_DEMO_H -void vStartTimerDemoTask( portTickType xBaseFrequencyIn ); -portBASE_TYPE xAreTimerDemoTasksStillRunning( portTickType xCycleFrequency ); +void vStartTimerDemoTask( TickType_t xBaseFrequencyIn ); +portBASE_TYPE xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency ); void vTimerPeriodicISRTests( void ); #endif /* TIMER_DEMO_H */ diff --git a/FreeRTOS/Demo/Common/include/print.h b/FreeRTOS/Demo/Common/include/print.h index 45b3fe6edb..53521e27ae 100644 --- a/FreeRTOS/Demo/Common/include/print.h +++ b/FreeRTOS/Demo/Common/include/print.h @@ -68,7 +68,7 @@ void vPrintInitialise( void ); void vPrintDisplayMessage( const char * const * pcMessageToSend ); -const char *pcPrintGetNextMessage( portTickType xPrintRate ); +const char *pcPrintGetNextMessage( TickType_t xPrintRate ); #endif diff --git a/FreeRTOS/Demo/Common/include/serial.h b/FreeRTOS/Demo/Common/include/serial.h index a6848d8c92..7f79e9dd3a 100644 --- a/FreeRTOS/Demo/Common/include/serial.h +++ b/FreeRTOS/Demo/Common/include/serial.h @@ -127,8 +127,8 @@ typedef enum xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ); -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ); -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ); +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ); +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); void vSerialClose( xComPortHandle xPort ); diff --git a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h index 64bb69118a..77c00bb3ca 100644 --- a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h @@ -87,7 +87,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 98000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 - ( unsigned short ) configSTACK_START ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6 * 1024 ) ) diff --git a/FreeRTOS/Demo/Cygnal/main.c b/FreeRTOS/Demo/Cygnal/main.c index 2b2d135387..6a42bf6548 100644 --- a/FreeRTOS/Demo/Cygnal/main.c +++ b/FreeRTOS/Demo/Cygnal/main.c @@ -144,8 +144,8 @@ /* Toggle rate for the on board LED - which is dependent on whether or not an error has been detected. */ -#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 5000 ) -#define mainERROR_FLASH_PERIOD ( ( portTickType ) 250 ) +#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 5000 ) +#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 250 ) /* Baud rate used by the serial port tasks. */ #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 ) @@ -241,13 +241,13 @@ void main( void ) must not be used with the co-operative scheduler. */ #if configUSE_PREEMPTION == 1 { - xTaskCreate( vRegisterCheck, "RegChck", configMINIMAL_STACK_SIZE, mainDUMMY_POINTER, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); - xTaskCreate( vFLOPCheck1, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); - xTaskCreate( vFLOPCheck2, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( vRegisterCheck, "RegChck", configMINIMAL_STACK_SIZE, mainDUMMY_POINTER, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); + xTaskCreate( vFLOPCheck1, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); + xTaskCreate( vFLOPCheck2, "FLOP", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL ); } #endif - xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, ( xTaskHandle * ) NULL ); + xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, ( TaskHandle_t * ) NULL ); /* Finally kick off the scheduler. This function should never return. */ vTaskStartScheduler(); diff --git a/FreeRTOS/Demo/Cygnal/serial/serial.c b/FreeRTOS/Demo/Cygnal/serial/serial.c index fb76f4f164..36ddeff324 100644 --- a/FreeRTOS/Demo/Cygnal/serial/serial.c +++ b/FreeRTOS/Demo/Cygnal/serial/serial.c @@ -81,8 +81,8 @@ #define ser8BIT_WITH_RELOAD ( ( unsigned char ) 0x20 ) #define serSMOD ( ( unsigned char ) 0x10 ) -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; data static unsigned portBASE_TYPE uxTxEmpty; @@ -183,7 +183,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* There is only one port supported. */ ( void ) pxPort; @@ -201,7 +201,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, po } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/Flshlite/FRConfig.h b/FreeRTOS/Demo/Flshlite/FRConfig.h index 2c6633f2b1..8675402e49 100644 --- a/FreeRTOS/Demo/Flshlite/FRConfig.h +++ b/FreeRTOS/Demo/Flshlite/FRConfig.h @@ -76,7 +76,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) diff --git a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h index e9a1ba93f4..8f31a65abd 100644 --- a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 10 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) diff --git a/FreeRTOS/Demo/Flshlite/main.c b/FreeRTOS/Demo/Flshlite/main.c index 0fe34bc495..292442f15f 100644 --- a/FreeRTOS/Demo/Flshlite/main.c +++ b/FreeRTOS/Demo/Flshlite/main.c @@ -114,7 +114,7 @@ Changes from V1.2.5 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ #include @@ -153,7 +153,7 @@ Changes from V2.0.0 /* If an error is detected in a task then the vErrorChecks() task will enter an infinite loop flashing the LED at this rate. */ -#define mainERROR_FLASH_RATE ( ( portTickType ) 100 / portTICK_RATE_MS ) +#define mainERROR_FLASH_RATE ( ( TickType_t ) 100 / portTICK_PERIOD_MS ) /* Task function for the "Print" task as described at the top of the file. */ static void vErrorChecks( void *pvParameters ); @@ -207,10 +207,10 @@ short main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xExpectedWakeTime; -const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS; +TickType_t xExpectedWakeTime; +const TickType_t xPrintRate = ( TickType_t ) 5000 / portTICK_PERIOD_MS; const long lMaxAllowableTimeDifference = ( long ) 0; -portTickType xWakeTime; +TickType_t xWakeTime; long lTimeDifference; const char *pcReceivedMessage; const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n"; diff --git a/FreeRTOS/Demo/Flshlite/serial/serial.c b/FreeRTOS/Demo/Flshlite/serial/serial.c index 6ee4054fbb..589e75261a 100644 --- a/FreeRTOS/Demo/Flshlite/serial/serial.c +++ b/FreeRTOS/Demo/Flshlite/serial/serial.c @@ -95,7 +95,7 @@ Changes from V1.2.5 Changes from V2.0.0 - + Use portTickType in place of unsigned pdLONG for delay periods. + + Use TickType_t in place of unsigned pdLONG for delay periods. + Slightly more efficient vSerialSendString() implementation. + cQueueReieveFromISR() used in place of xQueueReceive() in ISR. */ @@ -140,7 +140,7 @@ Changes from V2.0.0 #define serCLEAR_ALL_STATUS_BITS ( ( unsigned short ) 0x00 ) #define serINTERRUPT_PRIORITY ( ( unsigned short ) 0x01 ) /*< Just below the scheduler priority. */ -#define serDONT_BLOCK ( ( portTickType ) 0 ) +#define serDONT_BLOCK ( ( TickType_t ) 0 ) typedef enum { @@ -235,12 +235,12 @@ typedef struct xCOM_PORT unsigned short usIRQVector; /* Queues used for communications with com test task. */ - xQueueHandle xRxedChars; - xQueueHandle xCharsForTx; + QueueHandle_t xRxedChars; + QueueHandle_t xCharsForTx; /* This semaphore does nothing useful except test a feature of the scheduler. */ - xSemaphoreHandle xTestSem; + SemaphoreHandle_t xTestSem; } xComPort; @@ -255,8 +255,8 @@ typedef xComPort * xComPortHandle; /* These prototypes are repeated here so we don't have to include the serial header. This allows the xComPortHandle structure details to be private to this file. */ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ); -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ); +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime ); +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime ); void vSerialClose( xComPortHandle xPort ); short sSerialWaitForSemaphore( xComPortHandle xPort ); /*-----------------------------------------------------------*/ @@ -385,7 +385,7 @@ char *pcNextChar; } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer, note that this routine is only called having checked that the is (at least) one to get */ @@ -400,7 +400,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickT } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime ) { if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) { @@ -415,7 +415,7 @@ portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ) { -const portTickType xBlockTime = ( portTickType ) 0xffff; +const TickType_t xBlockTime = ( TickType_t ) 0xffff; /* This function does nothing interesting, but test the semaphore from ISR mechanism. */ diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h index 80ede28084..3231ca7e61 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 22118400 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15 * 1024 ) ) diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/main.c b/FreeRTOS/Demo/H8S/RTOSDemo/main.c index 4f5aa4936b..b115f8cf6e 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/main.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/main.c @@ -128,8 +128,8 @@ that all the other tasks are operating without error. If no errors are found the LED is toggled with mainCHECK_PERIOD frequency. If an error is found the the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainCHECK_TASK_LED ( 5 ) -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* Constants used by the vMemCheckTask() task. */ #define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 ) @@ -205,10 +205,10 @@ int main( void ) */ static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainCHECK_PERIOD; +TickType_t xDelayPeriod = mainCHECK_PERIOD; volatile unsigned long ulMemCheckTaskRunningCount; -xTaskHandle xCreatedTask; -portTickType xLastWakeTime; +TaskHandle_t xCreatedTask; +TickType_t xLastWakeTime; /* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil() functions correctly. */ diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c index 358766ddaa..8ebf1d1de7 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c @@ -83,8 +83,8 @@ peripheral. */ /* The queues used to communicate between the task code and the interrupt service routines. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Hardware specific constants. */ #define serTX_INTERRUPT ( ( unsigned char ) 0x80 ) @@ -161,7 +161,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -176,7 +176,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn = pdPASS; diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h index 25285e7dff..115107765e 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h @@ -88,7 +88,7 @@ model. */ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10240 ) ) diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c index e20cab9bf7..e908b49eab 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c @@ -124,8 +124,8 @@ that all the other tasks are operating without error. If no errors are found the LED is toggled with mainCHECK_PERIOD frequency. If an error is found then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainCHECK_TASK_LED ( 7 ) -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The constants used in the idle task calculation. */ #define intgCONST1 ( ( long ) 123 ) @@ -214,8 +214,8 @@ void vMain( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainCHECK_PERIOD; -portTickType xLastWakeTime; +TickType_t xDelayPeriod = mainCHECK_PERIOD; +TickType_t xLastWakeTime; /* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil() functions correctly. */ diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c index f27b3fefd0..404d53bedf 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c @@ -82,8 +82,8 @@ to represent an optimised solution. */ /* The queues used to communicate between the task code and the interrupt service routines. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Interrupt identification bits. */ #define serOVERRUN_INTERRUPT ( 0x08 ) @@ -111,7 +111,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -126,7 +126,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h index c011857e06..83d235ef82 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2048 - 256 ) ) diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c index 38d1a3fe9b..859c18ade8 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c @@ -151,8 +151,8 @@ that all the other tasks are operating without error. If no errors are found the LED is toggled with mainCHECK_PERIOD frequency. If an error is found then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainCHECK_TASK_LED ( 7 ) -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* LED that is toggled by the button push interrupt. */ #define mainBUTTON_PUSH_LED ( 5 ) @@ -206,7 +206,7 @@ portBASE_TYPE xLocalError = pdFALSE; /* The queue used to send data from the button push ISR to the Button Push task. */ -static xQueueHandle xButtonQueue; +static QueueHandle_t xButtonQueue; /*-----------------------------------------------------------*/ @@ -236,8 +236,8 @@ void vMain( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainCHECK_PERIOD; -portTickType xLastWakeTime; +TickType_t xDelayPeriod = mainCHECK_PERIOD; +TickType_t xLastWakeTime; /* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil() functions correctly. */ diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c index eb87cd2d6d..528f5c23dc 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c @@ -90,13 +90,13 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { return pdFALSE; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn = pdPASS; diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h index 119af18af2..06fb48e932 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h @@ -91,7 +91,7 @@ model. */ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 977 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 977 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300/*128*/ ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10752 ) ) diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/main.c b/FreeRTOS/Demo/HCS12_GCC_banked/main.c index 269fd15988..d02ed7abd0 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/main.c +++ b/FreeRTOS/Demo/HCS12_GCC_banked/main.c @@ -127,8 +127,8 @@ that all the other tasks are operating without error. If no errors are found the LED is toggled with mainCHECK_PERIOD frequency. If an error is found then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainCHECK_TASK_LED ( 7 ) -#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The constants used in the idle task calculation. */ #define intgCONST1 ( ( long ) 123 ) @@ -216,8 +216,8 @@ int ATTR_BANK0 main ( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainCHECK_PERIOD; -portTickType xLastWakeTime; +TickType_t xDelayPeriod = mainCHECK_PERIOD; +TickType_t xLastWakeTime; /* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil() functions correctly. */ diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/serial.c b/FreeRTOS/Demo/HCS12_GCC_banked/serial.c index 05dc9edd35..8b88c14a46 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/serial.c +++ b/FreeRTOS/Demo/HCS12_GCC_banked/serial.c @@ -23,8 +23,8 @@ /* The queues used to communicate between the task code and the interrupt service routines. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Interrupt identification bits. */ #define serOVERRUN_INTERRUPT ( '\x08' ) @@ -52,7 +52,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -67,7 +67,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h index 38d284c68a..be1dee2392 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h @@ -81,7 +81,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 64000000 ) /* Clock setup from start91460.asm in the demo application. */ #define configPER_CLOCK_HZ ( ( unsigned long ) 16000000 ) /* Clock setup from start91460.asm in the demo application. */ #define configMAX_PRIORITIES ( 6 ) diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c index 866a551002..0aa60fcd8a 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c @@ -132,7 +132,7 @@ static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE /* The queue used to pass data between the 'fixed delay' co-routines and the 'flash' co-routine. */ -static xQueueHandle xFlashQueue; +static QueueHandle_t xFlashQueue; /* This will be set to pdFALSE if we detect an error. */ static unsigned portBASE_TYPE uxCoRoutineFlashStatus = pdPASS; @@ -175,14 +175,14 @@ static as we do not need it to maintain its state between blocks. */ signed portBASE_TYPE xResult; /* The uxIndex parameter of the co-routine function is used as an index into the xFlashRates array to obtain the delay period to use. */ -static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS, - 200 / portTICK_RATE_MS, - 250 / portTICK_RATE_MS, - 300 / portTICK_RATE_MS, - 350 / portTICK_RATE_MS, - 400 / portTICK_RATE_MS, - 450 / portTICK_RATE_MS, - 500 / portTICK_RATE_MS }; +static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS, + 200 / portTICK_PERIOD_MS, + 250 / portTICK_PERIOD_MS, + 300 / portTICK_PERIOD_MS, + 350 / portTICK_PERIOD_MS, + 400 / portTICK_PERIOD_MS, + 450 / portTICK_PERIOD_MS, + 500 / portTICK_PERIOD_MS }; /* Co-routines MUST start with a call to crSTART. */ crSTART( xHandle ); diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c index 4ddf588100..7a9e75f2e3 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c @@ -137,8 +137,8 @@ top of the page. When the system is operating error free the 'Check' task toggles an LED every three seconds. If an error is discovered in any task the rate is increased to 500 milliseconds. [in this case the '*' characters on the LCD represent LEDs]*/ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The total number of LEDs available. */ #define mainNO_CO_ROUTINE_LEDs ( 8 ) @@ -243,7 +243,7 @@ void main(void) static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() works correctly. */ diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c index 565080c08d..d271ffa998 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c @@ -82,10 +82,10 @@ #include "serial.h" /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /* The queue used to hold characters waiting transmission. */ -static xQueueHandle xCharsForTx; +static QueueHandle_t xCharsForTx; static volatile short sTHREEmpty; @@ -120,7 +120,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -135,7 +135,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c b/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c index 8339969248..f477ad4e23 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/utility/taskutility.c @@ -19,7 +19,7 @@ const char ASCII[] = "0123456789ABCDEF"; void vInitUart5( void ); -static xQueueHandle xQueue; +static QueueHandle_t xQueue; void vInitUart5( void ) { @@ -176,7 +176,7 @@ static void vUART5Task( void *pvParameters ) case '2': vTaskStartTrace( (signed char *) buff, sizeof( buff ) ); Puts5( "\n\rThe trace started!!" ); - vTaskDelay( (portTickType) 450 ); + vTaskDelay( (TickType_t) 450 ); trace_len = ulTaskEndTrace(); Puts5( "\n\rThe trace ended!!" ); Puts5( "\n\rThe trace is as follows...." ); diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c b/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c index c3df26013b..ef97bd6d7f 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/watchdog/watchdog.c @@ -28,8 +28,8 @@ void InitWatchdog(void) #if WATCHDOG == WTC_IN_TASK static void prvWatchdogTask ( void *pvParameters ) { - const portTickType xFrequency = WTC_CLR_PER; - portTickType xLastWakeTime; + const TickType_t xFrequency = WTC_CLR_PER; + TickType_t xLastWakeTime; /* Get currrent tick count */ xLastWakeTime = xTaskGetTickCount(); @@ -51,6 +51,6 @@ static void prvWatchdogTask ( void *pvParameters ) #if WATCHDOG == WTC_IN_TASK void vStartWatchdogTask( unsigned short uxPriority ) { - xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( TaskHandle_t * ) NULL ); } #endif diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h index c2df2fba51..bed2293395 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h @@ -102,7 +102,7 @@ the ComTest tasks will be included in place of the trace task. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 ) /* This can be greatly reduced when using the small or medium memory model. */ #define configCPU_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */ #define configCLKP1_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (20000) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c index 866a551002..0aa60fcd8a 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c @@ -132,7 +132,7 @@ static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE /* The queue used to pass data between the 'fixed delay' co-routines and the 'flash' co-routine. */ -static xQueueHandle xFlashQueue; +static QueueHandle_t xFlashQueue; /* This will be set to pdFALSE if we detect an error. */ static unsigned portBASE_TYPE uxCoRoutineFlashStatus = pdPASS; @@ -175,14 +175,14 @@ static as we do not need it to maintain its state between blocks. */ signed portBASE_TYPE xResult; /* The uxIndex parameter of the co-routine function is used as an index into the xFlashRates array to obtain the delay period to use. */ -static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS, - 200 / portTICK_RATE_MS, - 250 / portTICK_RATE_MS, - 300 / portTICK_RATE_MS, - 350 / portTICK_RATE_MS, - 400 / portTICK_RATE_MS, - 450 / portTICK_RATE_MS, - 500 / portTICK_RATE_MS }; +static const TickType_t xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_PERIOD_MS, + 200 / portTICK_PERIOD_MS, + 250 / portTICK_PERIOD_MS, + 300 / portTICK_PERIOD_MS, + 350 / portTICK_PERIOD_MS, + 400 / portTICK_PERIOD_MS, + 450 / portTICK_PERIOD_MS, + 500 / portTICK_PERIOD_MS }; /* Co-routines MUST start with a call to crSTART. */ crSTART( xHandle ); diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c index cfb6bd3b6e..fd3543eb16 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c @@ -134,8 +134,8 @@ top of the page. When the system is operating error free the 'Check' task toggles an LED every three seconds. If an error is discovered in any task the rate is increased to 500 milliseconds. [in this case the '*' characters on the LCD represent LED's] */ -#define mainNO_ERROR_CHECK_DELAY ( (portTickType) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( (portTickType) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( (TickType_t) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( (TickType_t) 500 / portTICK_PERIOD_MS ) /* LED assignments for the demo tasks. */ #define mainNUM_FLASH_CO_ROUTINES 8 @@ -224,7 +224,7 @@ static void prvSetupHardware( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY; /* Just to remove compiler warnings. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c index 0bcbcc9712..16e16c7d18 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c @@ -80,10 +80,10 @@ #include "serial.h" /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /* The queue used to hold characters waiting transmission. */ -static xQueueHandle xCharsForTx; +static QueueHandle_t xCharsForTx; static volatile short sTHREEmpty; @@ -129,7 +129,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -144,7 +144,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c index 4b0bb9e73c..54dc882ab0 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/utility/taskutility.c @@ -24,9 +24,9 @@ static void vUART0Task( void *pvParameters ); /*********************@GLOBAL_VARIABLES_START*******************/ const char ASCII[] = "0123456789ABCDEF"; -xTaskHandle UART_TaskHandle; +TaskHandle_t UART_TaskHandle; -static xQueueHandle xQueue; +static QueueHandle_t xQueue; void InitUart0( void ) { /* Initialize UART asynchronous mode */ @@ -184,7 +184,7 @@ static void vUART0Task( void *pvParameters ) case '2': vTaskStartTrace( (signed char *) buff, sizeof( buff ) ); Puts0( "\n\rThe trace started!!" ); - vTaskDelay( (portTickType) 500 ); + vTaskDelay( (TickType_t) 500 ); trace_len = ulTaskEndTrace(); Puts0( "\n\rThe trace ended!!" ); Puts0( "\n\rThe trace is as follows...." ); diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c index b65f376cc9..4ea84f05de 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/watchdog/watchdog.c @@ -31,8 +31,8 @@ void InitWatchdog( void ) #if WATCHDOG == WTC_IN_TASK static void prvWatchdogTask( void *pvParameters ) { - const portTickType xFrequency = WTC_CLR_PER; - portTickType xLastWakeTime; + const TickType_t xFrequency = WTC_CLR_PER; + TickType_t xLastWakeTime; ( void ) pvParameters; /* Get currrent tick count */ @@ -58,7 +58,7 @@ static void prvWatchdogTask( void *pvParameters ) #if WATCHDOG == WTC_IN_TASK void vStartWatchdogTask( unsigned portBASE_TYPE uxPriority ) { - xTaskCreate( prvWatchdogTask, "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL ); + xTaskCreate( prvWatchdogTask, "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( TaskHandle_t * ) NULL ); } #endif diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c index 00d2f55ccd..291801df25 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c @@ -75,10 +75,10 @@ #include "semphr.h" /* Delays used within the dice functionality. All delays are defined in milliseconds. */ -#define diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ( 20 / portTICK_RATE_MS ) -#define diceSHAKE_TIME ( ( 2000 / portTICK_RATE_MS ) / diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ) -#define diceSHORT_PAUSE_BEFORE_SHAKE ( 250 / portTICK_RATE_MS ) -#define diceDELAY_WHILE_DISPLAYING_RESULT ( 5000 / portTICK_RATE_MS ) +#define diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ( 20 / portTICK_PERIOD_MS ) +#define diceSHAKE_TIME ( ( 2000 / portTICK_PERIOD_MS ) / diceDELAY_BETWEEN_RANDOM_NUMBERS_ms ) +#define diceSHORT_PAUSE_BEFORE_SHAKE ( 250 / portTICK_PERIOD_MS ) +#define diceDELAY_WHILE_DISPLAYING_RESULT ( 5000 / portTICK_PERIOD_MS ) /* Macro to access the display ports. */ #define dice7SEG_Value( x ) ( *( pucDisplayOutput[ x ] ) ) @@ -98,7 +98,7 @@ static const char cDisplaySegments[ 2 ][ 11 ] = /* The semaphores used to communicate button push events between the button input interrupt handlers and the dice tasks. Two dice tasks are created so two semaphores are required. */ -static xSemaphoreHandle xSemaphores[ 2 ] = { 0 }; +static SemaphoreHandle_t xSemaphores[ 2 ] = { 0 }; /* Defines the ports used to write to the display. This variable is defined in partest.c, which contains the LED set/clear/toggle functions. */ diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h index 339898a83d..2188635a12 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h @@ -101,7 +101,7 @@ the ComTest tasks will be included in place of the trace task. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 180 ) /* This can be greatly reduced when using the small or medium memory model. */ #define configCPU_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */ #define configCLKP1_CLOCK_HZ ( ( unsigned long ) 56000000 ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (5000) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c index d7a9b5730e..472ac6a057 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c @@ -85,7 +85,7 @@ #define ledNUM_OF_LED_TASKS ( 7 ) /* Each task toggles at a frequency that is a multiple of 333ms. */ -#define ledFLASH_RATE_BASE ( ( portTickType ) 333 ) +#define ledFLASH_RATE_BASE ( ( TickType_t ) 333 ) /* One co-routine per segment of the right hand display. */ #define ledNUM_OF_LED_CO_ROUTINES 7 @@ -106,11 +106,11 @@ static void vLEDCoRoutineControlTask( void *pvParameters ); /* Handles to each of the 7 tasks. Used so the tasks can be suspended and resumed. */ -static xTaskHandle xFlashTaskHandles[ ledNUM_OF_LED_TASKS ] = { 0 }; +static TaskHandle_t xFlashTaskHandles[ ledNUM_OF_LED_TASKS ] = { 0 }; /* Handle to the task in which the co-routines run. Used so the co-routines can be suspended and resumed. */ -static xTaskHandle xCoroutineTask; +static TaskHandle_t xCoroutineTask; /*-----------------------------------------------------------*/ @@ -176,19 +176,19 @@ short sLEDTask; static void vLEDFlashTask( void * pvParameters ) { -portTickType xFlashRate, xLastFlashTime; +TickType_t xFlashRate, xLastFlashTime; unsigned short usLED; /* The LED to flash is passed in as the task parameter. */ usLED = ( unsigned short ) pvParameters; /* Calculate the rate at which this task is going to toggle its LED. */ - xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( portTickType ) usLED ); - xFlashRate /= portTICK_RATE_MS; + xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( TickType_t ) usLED ); + xFlashRate /= portTICK_PERIOD_MS; /* We will turn the LED on and off again in the delay period, so each delay is only half the total period. */ - xFlashRate /= ( portTickType ) 2; + xFlashRate /= ( TickType_t ) 2; /* We need to initialise xLastFlashTime prior to the first call to vTaskDelayUntil(). */ @@ -232,13 +232,13 @@ static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned short us { /* The usIndex parameter of the co-routine function is used as an index into the xFlashRates array to obtain the delay period to use. */ -static const portTickType xFlashRates[ ledNUM_OF_LED_CO_ROUTINES ] = { 150 / portTICK_RATE_MS, - 300 / portTICK_RATE_MS, - 450 / portTICK_RATE_MS, - 600 / portTICK_RATE_MS, - 750 / portTICK_RATE_MS, - 900 / portTICK_RATE_MS, - 1050 / portTICK_RATE_MS }; +static const TickType_t xFlashRates[ ledNUM_OF_LED_CO_ROUTINES ] = { 150 / portTICK_PERIOD_MS, + 300 / portTICK_PERIOD_MS, + 450 / portTICK_PERIOD_MS, + 600 / portTICK_PERIOD_MS, + 750 / portTICK_PERIOD_MS, + 900 / portTICK_PERIOD_MS, + 1050 / portTICK_PERIOD_MS }; /* Co-routines MUST start with a call to crSTART. */ crSTART( xHandle ); diff --git a/FreeRTOS/Demo/MCF5235_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/MCF5235_GCC/FreeRTOSConfig.h index b0ae2987ef..ae27398cc2 100644 --- a/FreeRTOS/Demo/MCF5235_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MCF5235_GCC/FreeRTOSConfig.h @@ -70,7 +70,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 7 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) #define configMAX_TASK_NAME_LEN ( 16 ) diff --git a/FreeRTOS/Demo/MCF5235_GCC/demo.c b/FreeRTOS/Demo/MCF5235_GCC/demo.c index 0e0066cae5..dcd8671095 100644 --- a/FreeRTOS/Demo/MCF5235_GCC/demo.c +++ b/FreeRTOS/Demo/MCF5235_GCC/demo.c @@ -85,7 +85,7 @@ #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* Interval in which tasks are checked. */ -#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS ) +#define mainCHECK_PERIOD ( ( TickType_t ) 2000 / portTICK_PERIOD_MS ) /* Constants used by the vMemCheckTask() task. */ #define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 ) @@ -138,7 +138,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters ) { unsigned long ulMemCheckTaskRunningCount; - xTaskHandle xCreatedTask; + TaskHandle_t xCreatedTask; /* The parameters are not used in this function. */ ( void )pvParameters; diff --git a/FreeRTOS/Demo/MCF5235_GCC/system/serial.c b/FreeRTOS/Demo/MCF5235_GCC/system/serial.c index 32edb346cf..f3e87bab02 100644 --- a/FreeRTOS/Demo/MCF5235_GCC/system/serial.c +++ b/FreeRTOS/Demo/MCF5235_GCC/system/serial.c @@ -74,8 +74,8 @@ static void prvSerialISR( void ); typedef struct { portBASE_TYPE xInitialized; - xQueueHandle xRXChars; - xQueueHandle xTXChars; + QueueHandle_t xRXChars; + QueueHandle_t xTXChars; } xComPortIF_t; static xComPortIF_t xComPortIF[ COM_NIFACE ]; @@ -145,7 +145,7 @@ xSerialPortInitMinimal( unsigned long ulWantedBaud, signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar, - portTickType xBlockTime ) + TickType_t xBlockTime ) { int i; portBASE_TYPE xResult = pdFALSE; @@ -189,7 +189,7 @@ vSerialPutString( xComPortHandle pxPort, const signed char * signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, - portTickType xBlockTime ) + TickType_t xBlockTime ) { int i; portBASE_TYPE xResult = pdFALSE; diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h index b59227637c..d87714f422 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h @@ -92,7 +92,7 @@ #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 25000000UL ) #define configLFXT_CLOCK_HZ ( 32768L ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c index 43d287b5e4..ed969529be 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c @@ -201,7 +201,7 @@ information. */ /* The frequency at which the check timer (described in the comments at the top of this file) will call its callback function. */ -#define mainCHECK_TIMER_PERIOD ( 5000UL / ( unsigned long ) portTICK_RATE_MS ) +#define mainCHECK_TIMER_PERIOD ( 5000UL / ( unsigned long ) portTICK_PERIOD_MS ) /* Misc. */ #define mainDONT_BLOCK ( 0 ) @@ -239,7 +239,7 @@ static void prvGenerateStatusMessage( char *pcBuffer, unsigned long ulStatusValu /* * Defines the 'check' functionality as described at the top of this file. This * function is the callback function for the 'check' timer. */ -static void vCheckTimerCallback( xTimerHandle xTimer ); +static void vCheckTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ @@ -251,10 +251,10 @@ volatile unsigned short usRegTest1Counter = 0, usRegTest2Counter = 0; /* The handle of the queue used to send messages from tasks and interrupts to the LCD task. */ -static xQueueHandle xLCDQueue = NULL; +static QueueHandle_t xLCDQueue = NULL; /* The 'check' timer, as described at the top of this file. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* The definition of each message sent from tasks and interrupts to the LCD task. */ @@ -471,12 +471,12 @@ xQueueMessage xMessage; /* Block for 10 milliseconds so this task does not utilise all the CPU time and debouncing of the button is not necessary. */ - vTaskDelay( 10 / portTICK_RATE_MS ); + vTaskDelay( 10 / portTICK_PERIOD_MS ); } } /*-----------------------------------------------------------*/ -static void vCheckTimerCallback( xTimerHandle xTimer ) +static void vCheckTimerCallback( TimerHandle_t xTimer ) { static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0; @@ -513,7 +513,7 @@ static xQueueMessage xStatusMessage = { mainMESSAGE_STATUS, pdPASS }; xStatusMessage.ulMessageValue = mainERROR_COUNT_SEM_TEST; } - if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainCHECK_TIMER_PERIOD ) != pdPASS ) + if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainCHECK_TIMER_PERIOD ) != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_TIMER_TEST; } @@ -666,7 +666,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pxTask; ( void ) pcTaskName; diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c index 7221c923bb..8f3e226fe1 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c @@ -85,13 +85,13 @@ #include "serial.h" /* Misc. constants. */ -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /* The queue used to hold characters waiting transmission. */ -static xQueueHandle xCharsForTx; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -140,7 +140,7 @@ unsigned long ulBaudRateCount; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -155,7 +155,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h index ad12c7928d..f84e213946 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 25000000UL ) #define configLFXT_CLOCK_HZ ( 32768L ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 5 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c index 9c0e510df2..e99932e6d5 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c @@ -239,7 +239,7 @@ volatile unsigned short usRegTest1Counter = 0, usRegTest2Counter = 0; /* The handle of the queue used to send messages from tasks and interrupts to the LCD task. */ -static xQueueHandle xLCDQueue = NULL; +static QueueHandle_t xLCDQueue = NULL; /* The definition of each message sent from tasks and interrupts to the LCD task. */ @@ -448,7 +448,7 @@ xQueueMessage xMessage; /* Block for 10 milliseconds so this task does not utilise all the CPU time and debouncing of the button is not necessary. */ - vTaskDelay( 10 / portTICK_RATE_MS ); + vTaskDelay( 10 / portTICK_PERIOD_MS ); } } /*-----------------------------------------------------------*/ @@ -481,7 +481,7 @@ void vApplicationTickHook( void ) { static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0; static unsigned long ulCounter = 0; -static const unsigned long ulCheckFrequency = 5000UL / portTICK_RATE_MS; +static const unsigned long ulCheckFrequency = 5000UL / portTICK_PERIOD_MS; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Define the status message that is sent to the LCD task. By default the @@ -626,7 +626,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pxTask; ( void ) pcTaskName; diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c index d5d65a1311..59e1d605fd 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c @@ -85,13 +85,13 @@ #include "serial.h" /* Misc. constants. */ -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /* The queue used to hold characters waiting transmission. */ -static xQueueHandle xCharsForTx; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -140,7 +140,7 @@ unsigned long ulBaudRateCount; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -155,7 +155,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/MicroBlaze/FreeRTOSConfig.h b/FreeRTOS/Demo/MicroBlaze/FreeRTOSConfig.h index c5c8dfa2f5..5cd658039a 100644 --- a/FreeRTOS/Demo/MicroBlaze/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MicroBlaze/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 100000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) ) diff --git a/FreeRTOS/Demo/MicroBlaze/main.c b/FreeRTOS/Demo/MicroBlaze/main.c index b4d4f20861..91719cf906 100644 --- a/FreeRTOS/Demo/MicroBlaze/main.c +++ b/FreeRTOS/Demo/MicroBlaze/main.c @@ -211,7 +211,7 @@ int main (void) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_PERIOD; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_PERIOD; /* The parameters are not used. */ ( void ) pvParameters; diff --git a/FreeRTOS/Demo/MicroBlaze/serial/serial.c b/FreeRTOS/Demo/MicroBlaze/serial/serial.c index a284325dc4..eaa49d5487 100644 --- a/FreeRTOS/Demo/MicroBlaze/serial/serial.c +++ b/FreeRTOS/Demo/MicroBlaze/serial/serial.c @@ -84,8 +84,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -127,7 +127,7 @@ unsigned long ulControlReg, ulMask; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -145,7 +145,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c index a078248a48..53b5bb250d 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/KernelAwareBSPRepository/sw_apps/FreeRTOS_Hello_World/src/FreeRTOS-main.c @@ -111,8 +111,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added because it has the higher priority, meaning @@ -120,7 +120,7 @@ the send task should always find the queue empty. */ #define mainQUEUE_LENGTH ( 1 ) /* A block time of 0 simply means, "don't block". */ -#define mainDONT_BLOCK ( portTickType ) 0 +#define mainDONT_BLOCK ( TickType_t ) 0 /* The following constants describe the timer instance used in this application. They are defined here such that a user can easily change all the needed parameters @@ -141,16 +141,16 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but increment the * ulCallback variable each time it executes. */ -static void vSoftwareTimerCallback( xTimerHandle xTimer ); +static void vSoftwareTimerCallback( TimerHandle_t xTimer ); /*-----------------------------------------------------------*/ /* The queue used by the queue send and queue receive tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vSoftwareTimerCallback() as its callback function. */ -static xTimerHandle xExampleSoftwareTimer = NULL; +static TimerHandle_t xExampleSoftwareTimer = NULL; /*-----------------------------------------------------------*/ @@ -192,7 +192,7 @@ int main( void ) /* Create the software timer */ xExampleSoftwareTimer = xTimerCreate( "SoftwareTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vSoftwareTimerCallback /* The callback function that switches the LED off. */ @@ -214,7 +214,7 @@ int main( void ) /*-----------------------------------------------------------*/ /* The callback is executed when the software timer expires. */ -static void vSoftwareTimerCallback( xTimerHandle xTimer ) +static void vSoftwareTimerCallback( TimerHandle_t xTimer ) { /* Just increment the ulCallbac variable. */ ulCallback++; @@ -223,7 +223,7 @@ static void vSoftwareTimerCallback( xTimerHandle xTimer ) static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -284,7 +284,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOSConfig.h index b7b751940b..d9ea1fb885 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOSConfig.h @@ -91,7 +91,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #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. */ -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 7 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 64 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c index f3b4b92ce9..0e7c873f14 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-blinky.c @@ -128,8 +128,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue, specified in milliseconds, and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added because it has the higher priority, meaning @@ -143,7 +143,7 @@ the send task should always find the queue empty. */ #define mainTIMER_CONTROLLED_LED 0x02UL /* A block time of 0 simply means, "don't block". */ -#define mainDONT_BLOCK ( portTickType ) 0 +#define mainDONT_BLOCK ( TickType_t ) 0 /*-----------------------------------------------------------*/ @@ -162,7 +162,7 @@ static void prvQueueSendTask( void *pvParameters ); * The LED timer callback function. This does nothing but switch off the * LED defined by the mainTIMER_CONTROLLED_LED constant. */ -static void vLEDTimerCallback( xTimerHandle xTimer ); +static void vLEDTimerCallback( TimerHandle_t xTimer ); /* * The handler executed each time a button interrupt is generated. This ensures @@ -175,11 +175,11 @@ static void prvButtonInputInterruptHandler( void *pvUnused ); /*-----------------------------------------------------------*/ /* The queue used by the queue send and queue receive tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /* The LED software timer. This uses vLEDTimerCallback() as its callback function. */ -static xTimerHandle xLEDTimer = NULL; +static TimerHandle_t xLEDTimer = NULL; /* Maintains the current LED output state. */ static volatile unsigned char ucGPIOState = 0U; @@ -226,7 +226,7 @@ int main( void ) this file. The timer is not actually started until a button interrupt is pushed, as it is not until that point that the LED is turned on. */ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */ - ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */ + ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ vLEDTimerCallback /* The callback function that switches the LED off. */ @@ -245,7 +245,7 @@ int main( void ) /*-----------------------------------------------------------*/ /* The callback is executed when the LED timer expires. */ -static void vLEDTimerCallback( xTimerHandle xTimer ) +static void vLEDTimerCallback( TimerHandle_t xTimer ) { /* The timer has expired - so no button pushes have occurred in the last five seconds - turn the LED off. NOTE - accessing the LED port should use @@ -286,7 +286,7 @@ long lHigherPriorityTaskWoken = pdFALSE; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Initialise xNextWakeTime - this only needs to be done once. */ @@ -410,7 +410,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c index 1c8df1cbfc..70d5444441 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/main-full.c @@ -169,15 +169,15 @@ /* The rate at which mainCHECK_LED will toggle when all the tasks are running without error. See the description of the check timer in the comments at the top of this file. */ -#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_PERIOD_MS ) /* The rate at which mainCHECK_LED will toggle when an error has been reported by at least one task. See the description of the check timer in the comments at the top of this file. */ -#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_RATE_MS ) +#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_PERIOD_MS ) /* A block time of zero simply means "don't block". */ -#define mainDONT_BLOCK ( ( portTickType ) 0 ) +#define mainDONT_BLOCK ( ( TickType_t ) 0 ) /* The LED used by the comtest tasks. See the comtest_strings.c file for more information. In this case an invalid LED number is provided as all four @@ -208,7 +208,7 @@ extern void vRegisterTest2( void *pvParameters ); * Defines the 'check' timer functionality as described at the top of this file. * This function is the callback function associated with the 'check' timer. */ -static void vCheckTimerCallback( xTimerHandle xTimer ); +static void vCheckTimerCallback( TimerHandle_t xTimer ); /* * Configure the interrupt controller, LED outputs and button inputs. @@ -230,7 +230,7 @@ only the timer/counter is used directly within this file. */ static XTmrCtr xTimer0Instance; /* The 'check' timer, as described at the top of this file. */ -static xTimerHandle xCheckTimer = NULL; +static TimerHandle_t xCheckTimer = NULL; /* Used in the run time stats calculations. */ static unsigned long ulClocksPer10thOfAMilliSecond = 0UL; @@ -309,12 +309,12 @@ int main( void ) } /*-----------------------------------------------------------*/ -static void vCheckTimerCallback( xTimerHandle xTimer ) +static void vCheckTimerCallback( TimerHandle_t xTimer ) { extern unsigned long ulRegTest1CycleCount, ulRegTest2CycleCount; static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL; static long lErrorAlreadyLatched = pdFALSE; -portTickType xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD; +TickType_t xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD; /* This is the callback function used by the 'check' timer, as described in the comments at the top of this file. */ @@ -511,7 +511,7 @@ void vApplicationMallocFailedHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/serial.c b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/serial.c index 5029961071..07f48c6b28 100644 --- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/serial.c +++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/serial.c @@ -91,7 +91,7 @@ This is used by the Xilinx peripheral driver API functions. */ static XUartLite xUartLiteInstance; /* The queue used to hold received characters. */ -static xQueueHandle xRxedChars; +static QueueHandle_t xRxedChars; /*-----------------------------------------------------------*/ @@ -148,7 +148,7 @@ portBASE_TYPE xStatus; } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c index f09672cfa6..c608ac7a9d 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c @@ -77,10 +77,10 @@ #define butLED1 P7_bit.no7 /* A short delay used for button debouncing. */ -#define butDEBOUNCE_DELAY ( 200 / portTICK_RATE_MS ) +#define butDEBOUNCE_DELAY ( 200 / portTICK_PERIOD_MS ) /* The semaphore used to synchronise the button push task with the interrupt. */ -static xSemaphoreHandle xButtonSemaphore; +static SemaphoreHandle_t xButtonSemaphore; /* * The definition of the button task itself. See the comments at the top of diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h index a6acd99cab..30d0c7532b 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h @@ -104,7 +104,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 - #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) + #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c index 87624ff61b..2739330f61 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c @@ -117,8 +117,8 @@ #define mainGEN_QUEUE_PRIORITY ( tskIDLE_PRIORITY ) /* The period between executions of the check task. */ -#define mainNO_ERROR_TOGGLE_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_TOGGLE_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_TOGGLE_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_TOGGLE_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED toggled by the check task. */ #define mainLED_0 P7_bit.no6 @@ -217,7 +217,7 @@ short main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime; +TickType_t xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime; /* Ensure the parameter was passed in as expected. This is just a test of the kernel port, the parameter is not actually used for anything. The diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h index e20286497d..bd05733376 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h @@ -97,7 +97,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 - #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) + #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 ) #define configMAX_TASK_NAME_LEN ( 10 ) diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c index 7aec461a80..cb09cb2096 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c @@ -123,8 +123,8 @@ mechanism is working correctly. */ #define mainCHECK_PARAMETER ( ( void * ) 0x12345678 ) /* The period between executions of the check task. */ -#define mainNO_ERROR_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* There are no spare LEDs for the comtest tasks, so this is just set to an invalid number. */ @@ -200,7 +200,7 @@ void main( void ) static void prvCheckTask( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_DELAY, xLastWakeTime; +TickType_t xDelayPeriod = mainNO_ERROR_DELAY, xLastWakeTime; unsigned portBASE_TYPE uxLEDToUse = 0; /* Ensure parameter is passed in correctly. */ diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c index f52a744454..3bd996b0ef 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c @@ -92,16 +92,16 @@ #define serLSB ( 0x10 ) /* Misc. */ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) #define serHANDLE ( ( xComPortHandle ) 1 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*-----------------------------------------------------------*/ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -161,7 +161,7 @@ const unsigned long ulFuclk = ( configCPU_CLOCK_HZ / 2 ) / 8UL; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -203,7 +203,7 @@ signed char *pxNext; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdPASS; diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h index e1a7c52e7c..71f3149b1a 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h @@ -89,7 +89,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) SYS_CLK_FREQ ) #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( 1024 ) diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c index 933e1086b8..2f0614a735 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c @@ -253,7 +253,7 @@ void _general_exception_handler( unsigned long ulCause, unsigned long ulStatus ) static void prvCheckTask( void *pvParameters ) { -portTickType xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD; +TickType_t xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD; unsigned long ulLastRegTest1 = 0UL, ulLastRegTest2 = 0UL; const char * pcMessage; diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c index 083324a46d..70cea8e37f 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c @@ -76,12 +76,12 @@ COM driver. */ #include "Serial.h" /*---------------------------------------------------------------------------*/ -#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) -#define serNO_BLOCK ( ( portTickType ) 0 ) +#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 ) +#define serNO_BLOCK ( ( TickType_t ) 0 ) /*---------------------------------------------------------------------------*/ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; alt_u32 uartControl; /*---------------------------------------------------------------------------*/ @@ -124,7 +124,7 @@ void vSerialClose( xComPortHandle xPort ) } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one port. */ ( void ) pxPort; @@ -145,7 +145,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*---------------------------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE lReturn = pdPASS; diff --git a/FreeRTOS/Demo/PC/FRConfig.h b/FreeRTOS/Demo/PC/FRConfig.h index 047793cc32..c407100aef 100644 --- a/FreeRTOS/Demo/PC/FRConfig.h +++ b/FreeRTOS/Demo/PC/FRConfig.h @@ -76,7 +76,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 16 ) diff --git a/FreeRTOS/Demo/PC/FreeRTOSConfig.h b/FreeRTOS/Demo/PC/FreeRTOSConfig.h index f35e1b12fa..0764123aa1 100644 --- a/FreeRTOS/Demo/PC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PC/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 16 ) diff --git a/FreeRTOS/Demo/PC/main.c b/FreeRTOS/Demo/PC/main.c index 692090256d..2c72018a4c 100644 --- a/FreeRTOS/Demo/PC/main.c +++ b/FreeRTOS/Demo/PC/main.c @@ -251,10 +251,10 @@ void vMainQueueSendPassed( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xExpectedWakeTime; -const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS; +TickType_t xExpectedWakeTime; +const TickType_t xPrintRate = ( TickType_t ) 5000 / portTICK_PERIOD_MS; const long lMaxAllowableTimeDifference = ( long ) 0; -portTickType xWakeTime; +TickType_t xWakeTime; long lTimeDifference; const char *pcReceivedMessage; const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n"; diff --git a/FreeRTOS/Demo/PC/serial/serial.c b/FreeRTOS/Demo/PC/serial/serial.c index 4348cf1212..8139589071 100644 --- a/FreeRTOS/Demo/PC/serial/serial.c +++ b/FreeRTOS/Demo/PC/serial/serial.c @@ -220,8 +220,8 @@ typedef struct xCOM_PORT unsigned char ucInterruptEnableMast; /* Read/Write buffers. */ - xQueueHandle xRxedChars; - xQueueHandle xCharsForTx; + QueueHandle_t xRxedChars; + QueueHandle_t xCharsForTx; /* This lot are set up to minimise CPU time where accessing the comm * port's registers. @@ -243,7 +243,7 @@ typedef struct xCOM_PORT /* This semaphore does nothing useful except test a feature of the scheduler. */ - xSemaphoreHandle xTestSem; + SemaphoreHandle_t xTestSem; } xComPort; @@ -258,8 +258,8 @@ xComPort *xPortStatus[ serMAX_IRQs ] = { NULL, NULL, NULL, NULL, NULL, NULL, NUL /* These prototypes are repeated here so we don't have to include the serial header. This allows the xComPortHandle structure details to be private to this file. */ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ); -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ); +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime ); +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); static void prvSetupPortHardware( xComPort *pxPort, eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits ); @@ -607,7 +607,7 @@ extern void vComTestUnsuspendTask( void ); } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer, note that this routine is only called having checked that the is (at least) one to get */ @@ -622,7 +622,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickT } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime ) { if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) { @@ -638,7 +638,7 @@ portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType void vSerialPutString( xComPortHandle pxPort, const char * const pcString, unsigned short usStringLength ) { char * pcNextChar; -const portTickType xNoBlock = ( portTickType ) 0; +const TickType_t xNoBlock = ( TickType_t ) 0; /* Stop warnings. */ ( void ) usStringLength; @@ -654,7 +654,7 @@ const portTickType xNoBlock = ( portTickType ) 0; portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ) { -const portTickType xBlockTime = ( portTickType ) 0xffff; +const TickType_t xBlockTime = ( TickType_t ) 0xffff; /* This function does nothing interesting, but test the semaphore from ISR mechanism. */ diff --git a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h index 4db5509a54..b0a462fd5b 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( 105 ) diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main1.c b/FreeRTOS/Demo/PIC18_MPLAB/main1.c index d422b34346..6bebf1c7e0 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main1.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main1.c @@ -101,7 +101,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ /* Scheduler include files. */ @@ -117,8 +117,8 @@ Changes from V2.0.0 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS ) /* Priority definitions for some of the tasks. Other tasks just use the idle priority. */ @@ -131,7 +131,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 9600 ) /* @@ -172,7 +172,7 @@ void main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; portBASE_TYPE xErrorOccurred; /* Cycle for ever, delaying then checking all the other tasks are still diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main2.c b/FreeRTOS/Demo/PIC18_MPLAB/main2.c index 8c47be253d..3fae592ca2 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main2.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main2.c @@ -97,7 +97,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ /* Scheduler include files. */ @@ -119,7 +119,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 9600 ) /* diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main3.c b/FreeRTOS/Demo/PIC18_MPLAB/main3.c index c8e01c5b23..f0c6afb4cb 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main3.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main3.c @@ -105,7 +105,7 @@ Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned long. + TickType_t rather than unsigned long. */ /* Scheduler include files. */ @@ -126,11 +126,11 @@ priority. */ /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 100 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 100 / portTICK_PERIOD_MS ) /* The period for which mainRESET_LED remain on every reset. */ -#define mainRESET_LED_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainRESET_LED_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* The LED that is toggled whenever a character is transmitted. mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */ @@ -182,7 +182,7 @@ void main( void ) static void vErrorChecks( void *pvParameters ) { -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; volatile unsigned long ulDummy = 3UL; /* Toggle the LED so we can see when a reset occurs. */ diff --git a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c index d0786ccd1c..38fa15717c 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c @@ -71,7 +71,7 @@ Changes from V1.2.5 Changes from V2.0.0 - + Use portTickType in place of unsigned pdLONG for delay periods. + + Use TickType_t in place of unsigned pdLONG for delay periods. + cQueueReieveFromISR() used in place of xQueueReceive() in ISR. */ @@ -112,8 +112,8 @@ void vSerialRxISR( void ); /*-----------------------------------------------------------*/ /* Queues to interface between comms API and interrupt routines. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /*-----------------------------------------------------------*/ @@ -177,7 +177,7 @@ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWant } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -192,7 +192,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, po } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Return false if after the block time there is no room on the Tx queue. */ if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != pdPASS ) diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c index 6952bf3caf..32fd8d56b5 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c @@ -96,7 +96,7 @@ Changes from V3.0.1 #include #include -#define mainBLINK_LED_INTERVAL ( ( portTickType ) 100 / ( portTICK_RATE_MS ) ) +#define mainBLINK_LED_INTERVAL ( ( TickType_t ) 100 / ( portTICK_PERIOD_MS ) ) /* The LED that is flashed by the B0 task. */ #define mainBLINK_LED0_PORT LATD @@ -150,7 +150,7 @@ typedef struct { unsigned char *port; unsigned char *tris; unsigned char pin; - portTickType interval; + TickType_t interval; } SBLINK; const SBLINK sled0 = {&mainBLINK_LED0_PORT, &mainBLINK_LED0_TRIS, mainBLINK_LED0_PIN, mainBLINK_LED0_INTERVAL}; @@ -202,9 +202,9 @@ static portTASK_FUNCTION(vBlink, pvParameters) unsigned char *Port = ((SBLINK *)pvParameters)->port; unsigned char *Tris = ((SBLINK *)pvParameters)->tris; unsigned char Pin = ((SBLINK *)pvParameters)->pin; - portTickType Interval = ((SBLINK *)pvParameters)->interval; + TickType_t Interval = ((SBLINK *)pvParameters)->interval; - portTickType xLastWakeTime; + TickType_t xLastWakeTime; /* * Initialize the hardware diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c index 9f10381228..35b1bcd3ed 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c @@ -113,8 +113,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -128,7 +128,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /* @@ -174,8 +174,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { -portTickType xLastCheckTime; -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xLastCheckTime; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c index 4eb11a4c9c..9afe893ff4 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c @@ -111,8 +111,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -125,7 +125,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /* @@ -170,8 +170,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { - portTickType xLastCheckTime; - portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; + TickType_t xLastCheckTime; + TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c index 33fd46394e..829180ddde 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c @@ -111,8 +111,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -124,7 +124,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /* @@ -169,8 +169,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { - portTickType xLastCheckTime; - portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; + TickType_t xLastCheckTime; + TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c index 09fe114160..45f5829079 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c @@ -109,8 +109,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -121,7 +121,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /* @@ -165,8 +165,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { -portTickType xLastCheckTime; -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xLastCheckTime; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c index 1acfa80414..b0126de21e 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c @@ -104,8 +104,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -156,8 +156,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { -portTickType xLastCheckTime; -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xLastCheckTime; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c index a7a0657788..40f567bff4 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c @@ -110,8 +110,8 @@ Changes from V3.0.1 /* The period between executions of the check task before and after an error has been discovered. If an error has been discovered the check task runs more frequently - increasing the LED flash rate. */ -#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_PERIOD ( ( TickType_t ) 10000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_PERIOD ( ( TickType_t ) 1000 / portTICK_PERIOD_MS ) #define mainCHECK_TASK_LED ( ( unsigned char ) 3 ) /* Priority definitions for some of the tasks. Other tasks just use the idle @@ -123,7 +123,7 @@ priority. */ /* Constants required for the communications. Only one character is ever transmitted. */ #define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 ) -#define mainNO_BLOCK ( ( portTickType ) 0 ) +#define mainNO_BLOCK ( ( TickType_t ) 0 ) #define mainBAUD_RATE ( ( unsigned long ) 57600 ) /* @@ -170,8 +170,8 @@ void main( void ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { -portTickType xLastCheckTime; -portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD; +TickType_t xLastCheckTime; +TickType_t xDelayTime = mainNO_ERROR_CHECK_PERIOD; char cErrorOccurred; /* We need to initialise xLastCheckTime prior to the first call to diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c index 77435a3cb2..11d5fb4c71 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c @@ -91,7 +91,7 @@ Changes from V3.0.1 /* * Queue to interface between comms API and interrupt routine. */ - extern xQueueHandle xRxedChars; + extern QueueHandle_t xRxedChars; /* * Because we are not allowed to use local variables here, diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c index 5a34623d9f..79248e15b4 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c @@ -91,7 +91,7 @@ Changes from V3.0.1 /* * Queue to interface between comms API and interrupt routine. */ - extern xQueueHandle xCharsForTx; + extern QueueHandle_t xCharsForTx; /* * Because we are not allowed to use local variables here, diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c index 0e92c000e9..40c44c2db9 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c @@ -94,8 +94,8 @@ Changes from V3.0.1 /*-----------------------------------------------------------*/ /* Queues to interface between comms API and interrupt routines. */ -xQueueHandle xRxedChars; -xQueueHandle xCharsForTx; +QueueHandle_t xRxedChars; +QueueHandle_t xCharsForTx; portBASE_TYPE xHigherPriorityTaskWoken; /*-----------------------------------------------------------*/ @@ -174,7 +174,7 @@ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWant } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, TickType_t xBlockTime ) { /* Get the next character from the buffer. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -187,7 +187,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickT } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, TickType_t xBlockTime ) { /* Return false if after the block time there is no room on the Tx queue. */ if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != ( char ) pdPASS ) diff --git a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h index 37ca678842..e76af2cef6 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 16000000 ) /* Fosc / 2 */ #define configMAX_PRIORITIES ( 4 ) #define configMINIMAL_STACK_SIZE ( 115 ) diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c index 6a3bcbed42..edf2f78f6d 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c @@ -118,12 +118,12 @@ static void prvLCDClear( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ -xQueueHandle xStartLCDTask( void ) +QueueHandle_t xStartLCDTask( void ) { /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h index c0d26445e6..650316652a 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h +++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h @@ -68,13 +68,13 @@ /* Create the task that will control the LCD. Returned is a handle to the queue on which messages to get written to the LCD should be written. */ -xQueueHandle xStartLCDTask( void ); +QueueHandle_t xStartLCDTask( void ); typedef struct { /* The minimum amount of time the message should remain on the LCD without being overwritten. */ - portTickType xMinDisplayTime; + TickType_t xMinDisplayTime; /* A pointer to the string to be displayed. */ char *pcMessage; diff --git a/FreeRTOS/Demo/PIC24_MPLAB/main.c b/FreeRTOS/Demo/PIC24_MPLAB/main.c index 66cd2853d7..931860a429 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/main.c @@ -123,7 +123,7 @@ #define mainCHECK_TAKS_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 ) /* The execution period of the check task. */ -#define mainCHECK_TASK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS ) +#define mainCHECK_TASK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) /* The number of flash co-routines to create. */ #define mainNUM_FLASH_COROUTINES ( 5 ) @@ -164,7 +164,7 @@ static void prvSetupHardware( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /*-----------------------------------------------------------*/ @@ -211,7 +211,7 @@ static void prvSetupHardware( void ) static void vCheckTask( void *pvParameters ) { /* Used to wake the task at the correct frequency. */ -portTickType xLastExecutionTime; +TickType_t xLastExecutionTime; /* The maximum jitter time measured by the fast interrupt test. */ extern unsigned short usMaxJitter ; diff --git a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c index 2304f14d13..b4c15941e1 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c @@ -105,8 +105,8 @@ an example of an efficient driver. */ /* The queues used to communicate between tasks and ISR's. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; static portBASE_TYPE xTxHasEnded; /*-----------------------------------------------------------*/ @@ -164,7 +164,7 @@ char cChar; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -182,7 +182,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h index be9647ac0f..a1da2bc78b 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h @@ -84,7 +84,7 @@ #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( 80000000UL ) #define configPERIPHERAL_CLOCK_HZ ( 40000000UL ) #define configMAX_PRIORITIES ( 5UL ) diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c index 78dc307a6f..bd47053d85 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c @@ -106,8 +106,8 @@ static void prvLCDClear( void ); /* Brief delay to permit the LCD to catch up with commands. */ #define lcdVERY_SHORT_DELAY ( 1 ) -#define lcdSHORT_DELAY ( 8 / portTICK_RATE_MS ) -#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS ) +#define lcdSHORT_DELAY ( 8 / portTICK_PERIOD_MS ) +#define lcdLONG_DELAY ( 15 / portTICK_PERIOD_MS ) /* LCD specific definitions. */ #define LCD_CLEAR_DISPLAY_CMD 0x01 @@ -130,7 +130,7 @@ static void prvLCDClear( void ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -xQueueHandle xLCDQueue; +QueueHandle_t xLCDQueue; /* LCD access functions. */ static void prvLCDCommand( char cCommand ); @@ -138,7 +138,7 @@ static void prvLCDData( char cChar ); /*-----------------------------------------------------------*/ -xQueueHandle xStartLCDTask( void ) +QueueHandle_t xStartLCDTask( void ) { /* Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h index c0d26445e6..650316652a 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h @@ -68,13 +68,13 @@ /* Create the task that will control the LCD. Returned is a handle to the queue on which messages to get written to the LCD should be written. */ -xQueueHandle xStartLCDTask( void ); +QueueHandle_t xStartLCDTask( void ); typedef struct { /* The minimum amount of time the message should remain on the LCD without being overwritten. */ - portTickType xMinDisplayTime; + TickType_t xMinDisplayTime; /* A pointer to the string to be displayed. */ char *pcMessage; diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c index 35705e12d5..b4df4e01b2 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c @@ -190,7 +190,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c index db3abe4484..70bbba7d9f 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c @@ -121,8 +121,8 @@ #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -135,8 +135,8 @@ functionality. */ #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) /* The period of the blinky software timer. The period is specified in ms and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS ) /* The LED used by the communicating tasks and the blinky timer respectively. */ #define mainTASKS_LED ( 0 ) @@ -157,7 +157,7 @@ static void prvQueueSendTask( void *pvParameters ); * The callback function for the blinky software timer, as described at the top * of this file. */ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ); +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the simply blinky style application if @@ -168,13 +168,13 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ void main_blinky( void ) { -xTimerHandle xTimer; +TimerHandle_t xTimer; /* Create the queue. */ xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); @@ -221,7 +221,7 @@ xTimerHandle xTimer; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Check the task parameter is as expected. */ @@ -272,7 +272,7 @@ unsigned long ulReceivedValue; } /*-----------------------------------------------------------*/ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ) +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ) { /* This function is called when the blinky software time expires. All the function does is toggle the LED. LED mainTIMER_LED should therefore toggle diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c index fd824a4422..f2c0645832 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c @@ -151,13 +151,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The priorities of the various demo application tasks. */ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) @@ -207,7 +207,7 @@ is one less flash timer so the check task can use the third LED. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * It is important to ensure the high frequency timer test does not start before @@ -216,7 +216,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ); * executing. A one-shot timer is used, so the callback function will only * execute once (unless it is manually reset/restarted). */ -static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ); +static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer ); /* * Tasks that test the context switch mechanism by filling the processor @@ -231,7 +231,7 @@ static void prvRegTestTask2( void *pvParameters ); /*-----------------------------------------------------------*/ /* The queue used to send messages to the LCD task. */ -static xQueueHandle xLCDQueue; +static QueueHandle_t xLCDQueue; /* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on each iteration of their function. This is used to detect either task stopping @@ -245,7 +245,7 @@ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; */ int main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; /* Create the LCD task - this returns the queue to use when writing messages to the LCD. */ @@ -337,7 +337,7 @@ extern void vRegTest2( volatile unsigned long * ); } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; @@ -347,7 +347,7 @@ static char cStringBuffer[ mainMAX_STRING_LENGTH ]; /* The count of the high frequency timer interrupts. */ extern unsigned long ulHighFrequencyTimerInterrupts; -static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; +static xLCDMessage xMessage = { ( 200 / portTICK_PERIOD_MS ), cStringBuffer }; /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1Cycles ) @@ -425,7 +425,7 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; } /*-----------------------------------------------------------*/ -static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ) +static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer ) { /* Setup the high frequency, high priority, timer test. It is setup in this software timer callback to ensure it does not start before the kernel does. diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c index b6db6ea69a..404f7f3d7a 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c @@ -86,8 +86,8 @@ an example of an efficient driver. */ #define serSET_FLAG ( 1 ) /* The queues used to communicate between tasks and ISR's. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Flag used to indicate the tx status. */ static volatile portBASE_TYPE xTxHasEnded; @@ -122,7 +122,7 @@ unsigned short usBRG; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -140,7 +140,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { signed portBASE_TYPE xReturn; diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h index 9f21a0c95c..3c55e87808 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_QUEUE_SETS 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1 -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configCPU_CLOCK_HZ ( 200000000UL ) #define configPERIPHERAL_CLOCK_HZ ( 40000000UL ) #define configMAX_PRIORITIES ( 5UL ) diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c index 285d997e83..9834d10c2b 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c @@ -126,7 +126,7 @@ void __attribute__( (interrupt(ipl3), vector(_TIMER_5_VECTOR))) vT5InterruptWrap /* The semaphore given by the T5 interrupt to unblock the task implemented by the prvISRTriggeredTask() function. */ -static xSemaphoreHandle xBlockSemaphore = NULL; +static SemaphoreHandle_t xBlockSemaphore = NULL; /*-----------------------------------------------------------*/ void vStartISRTriggeredTask( void ) diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c index d1955e3801..3bab108c2b 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c @@ -193,7 +193,7 @@ void vApplicationIdleHook( void ) } /*-----------------------------------------------------------*/ -void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) { ( void ) pcTaskName; ( void ) pxTask; diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c index 034272e1f8..067ef46c19 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c @@ -113,8 +113,8 @@ #define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_RATE_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS ) +to ticks using the portTICK_PERIOD_MS constant. */ +#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) /* The number of items the queue can hold. This is 1 as the receive task will remove items as they are added, meaning the send task should always find @@ -127,8 +127,8 @@ functionality. */ #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) /* The period of the blinky software timer. The period is specified in ms and -converted to ticks using the portTICK_RATE_MS constant. */ -#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS ) +converted to ticks using the portTICK_PERIOD_MS constant. */ +#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS ) /* The LED used by the communicating tasks and the blinky timer respectively. */ #define mainTASKS_LED ( 0 ) @@ -149,7 +149,7 @@ static void prvQueueSendTask( void *pvParameters ); * The callback function for the blinky software timer, as described at the top * of this file. */ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ); +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ); /* * Called by main() to create the simply blinky style application if @@ -160,13 +160,13 @@ void main_blinky( void ); /*-----------------------------------------------------------*/ /* The queue used by both tasks. */ -static xQueueHandle xQueue = NULL; +static QueueHandle_t xQueue = NULL; /*-----------------------------------------------------------*/ void main_blinky( void ) { -xTimerHandle xTimer; +TimerHandle_t xTimer; /* Create the queue. */ xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); @@ -214,7 +214,7 @@ xTimerHandle xTimer; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Remove compiler warnigns in the case that configASSERT() is not dfined. */ @@ -271,7 +271,7 @@ unsigned long ulReceivedValue; } /*-----------------------------------------------------------*/ -static void prvBlinkyTimerCallback( xTimerHandle xTimer ) +static void prvBlinkyTimerCallback( TimerHandle_t xTimer ) { /* Avoid compiler warnings. */ ( void ) xTimer; diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c index 6daed0fb18..b358e10718 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c @@ -143,13 +143,13 @@ /* The period after which the check timer will expire, in ms, provided no errors have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_RATE_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS ) +equivalent in ticks using the portTICK_PERIOD_MS constant. */ +#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) /* The period at which the check timer will expire, in ms, if an error has been reported in one of the standard demo tasks. ms are converted to the equivalent -in ticks using the portTICK_RATE_MS constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS ) +in ticks using the portTICK_PERIOD_MS constant. */ +#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) /* The priorities of the various demo application tasks. */ #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) @@ -180,7 +180,7 @@ occur. */ /* * The check timer callback function, as described at the top of this file. */ -static void prvCheckTimerCallback( xTimerHandle xTimer ); +static void prvCheckTimerCallback( TimerHandle_t xTimer ); /* * It is important to ensure the high frequency timer test does not start before @@ -189,7 +189,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer ); * executing. A one-shot timer is used, so the callback function will only * execute once (unless it is manually reset/restarted). */ -static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ); +static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer ); /* * Tasks that test the context switch mechanism by filling the processor @@ -221,7 +221,7 @@ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; */ int main_full( void ) { -xTimerHandle xTimer = NULL; +TimerHandle_t xTimer = NULL; /* Create all the other standard demo tasks. */ vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS ); @@ -313,7 +313,7 @@ extern void vRegTest2( volatile unsigned long * ); } /*-----------------------------------------------------------*/ -static void prvCheckTimerCallback( xTimerHandle xTimer ) +static void prvCheckTimerCallback( TimerHandle_t xTimer ) { static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulLastHighFrequencyTimerInterrupts = 0; @@ -415,7 +415,7 @@ extern unsigned long ulHighFrequencyTimerInterrupts; } /*-----------------------------------------------------------*/ -static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer ) +static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer ) { void vSetupTimerTest( unsigned short usFrequencyHz ); diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h index 829994b298..5115633649 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_TICK_HOOK 0 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c index 1e73f13861..20f3fe9392 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c @@ -135,7 +135,7 @@ static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0; void vStartFlopRegTests( void ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Fill the arrays into which the flop registers are to be saved with diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c index c5caff1132..825d41a775 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c @@ -114,7 +114,7 @@ static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTE void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; portBASE_TYPE x, y; /* Place known values into the buffers into which the flop registers are diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c index f1abba473b..d862a27445 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c @@ -137,8 +137,8 @@ baud rate parameters passed into the comtest initialisation has no effect. */ the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an error has been found at any time then the toggle rate will increase to mainERROR_CHECK_DELAY milliseconds. */ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* @@ -332,7 +332,7 @@ static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; volatile unsigned portBASE_TYPE uxFreeStack; /* Just to remove compiler warning. */ @@ -691,11 +691,11 @@ static void prvRegTestTask2( void *pvParameters ) /* This hook function will get called if there is a suspected stack overflow. An overflow can cause the task name to be corrupted, in which case the task handle needs to be used to determine the offending task. */ -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ); -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) { /* To prevent the optimiser removing the variables. */ -volatile xTaskHandle xTaskIn = xTask; +volatile TaskHandle_t xTaskIn = xTask; volatile signed char *pcTaskNameIn = pcTaskName; /* Remove compiler warnings. */ diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c index 6838120ece..a79f2c5942 100644 --- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c @@ -85,8 +85,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Structure that maintains information on the UART being used. */ static XUartLite xUART; @@ -133,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -151,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h index 255b5e1aaf..b3c7d66706 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h @@ -83,7 +83,7 @@ #define configUSE_TICK_HOOK 0 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c index 1e73f13861..20f3fe9392 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c @@ -135,7 +135,7 @@ static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0; void vStartFlopRegTests( void ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Fill the arrays into which the flop registers are to be saved with diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c index c5caff1132..825d41a775 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c @@ -114,7 +114,7 @@ static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTE void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; portBASE_TYPE x, y; /* Place known values into the buffers into which the flop registers are diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c index 58592da68e..00418e11f8 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c @@ -137,8 +137,8 @@ baud rate parameters passed into the comtest initialisation has no effect. */ the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an error has been found at any time then the toggle rate will increase to mainERROR_CHECK_DELAY milliseconds. */ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* @@ -338,7 +338,7 @@ static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; volatile unsigned portBASE_TYPE uxFreeStack; /* Just to remove compiler warning. */ @@ -697,11 +697,11 @@ static void prvRegTestTask2( void *pvParameters ) /* This hook function will get called if there is a suspected stack overflow. An overflow can cause the task name to be corrupted, in which case the task handle needs to be used to determine the offending task. */ -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ); -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) { /* To prevent the optimiser removing the variables. */ -volatile xTaskHandle xTaskIn = xTask; +volatile TaskHandle_t xTaskIn = xTask; volatile signed char *pcTaskNameIn = pcTaskName; /* Remove compiler warnings. */ diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c index 6838120ece..a79f2c5942 100644 --- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c @@ -85,8 +85,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Structure that maintains information on the UART being used. */ static XUartLite xUART; @@ -133,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -151,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index 97aa4a3b23..35035165dd 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_TICK_HOOK 0 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index a200dd9110..c51962c1c7 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -135,7 +135,7 @@ static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0; void vStartFlopRegTests( void ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; unsigned portBASE_TYPE x, y; portDOUBLE z = flopSTART_VALUE; diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index 7147badade..50e978b247 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -114,7 +114,7 @@ static portDOUBLE dFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_T void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; portBASE_TYPE x, y; /* Place known values into the buffers into which the flop registers are diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index 1d73cca4db..a679ab1211 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -137,8 +137,8 @@ baud rate parameters passed into the comtest initialisation has no effect. */ the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an error has been found at any time then the toggle rate will increase to mainERROR_CHECK_DELAY milliseconds. */ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* @@ -332,7 +332,7 @@ static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; volatile unsigned portBASE_TYPE uxFreeStack; /* Just to remove compiler warning. */ @@ -691,11 +691,11 @@ static void prvRegTestTask2( void *pvParameters ) /* This hook function will get called if there is a suspected stack overflow. An overflow can cause the task name to be corrupted, in which case the task handle needs to be used to determine the offending task. */ -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ); -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) { /* To prevent the optimiser removing the variables. */ -volatile xTaskHandle xTaskIn = xTask; +volatile TaskHandle_t xTaskIn = xTask; volatile signed char *pcTaskNameIn = pcTaskName; /* Remove compiler warnings. */ diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index bad03dde29..affbd33ded 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -85,8 +85,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Structure that maintains information on the UART being used. */ static XUartLite xUART; @@ -133,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -151,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index 97aa4a3b23..35035165dd 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_TICK_HOOK 0 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 1e73f13861..20f3fe9392 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -135,7 +135,7 @@ static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0; void vStartFlopRegTests( void ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Fill the arrays into which the flop registers are to be saved with diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index c5caff1132..825d41a775 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -114,7 +114,7 @@ static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTE void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; portBASE_TYPE x, y; /* Place known values into the buffers into which the flop registers are diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index f1abba473b..d862a27445 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -137,8 +137,8 @@ baud rate parameters passed into the comtest initialisation has no effect. */ the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an error has been found at any time then the toggle rate will increase to mainERROR_CHECK_DELAY milliseconds. */ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* @@ -332,7 +332,7 @@ static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; volatile unsigned portBASE_TYPE uxFreeStack; /* Just to remove compiler warning. */ @@ -691,11 +691,11 @@ static void prvRegTestTask2( void *pvParameters ) /* This hook function will get called if there is a suspected stack overflow. An overflow can cause the task name to be corrupted, in which case the task handle needs to be used to determine the offending task. */ -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ); -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) { /* To prevent the optimiser removing the variables. */ -volatile xTaskHandle xTaskIn = xTask; +volatile TaskHandle_t xTaskIn = xTask; volatile signed char *pcTaskNameIn = pcTaskName; /* Remove compiler warnings. */ diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index bad03dde29..affbd33ded 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -85,8 +85,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Structure that maintains information on the UART being used. */ static XUartLite xUART; @@ -133,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -151,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index 737e4bc07a..17f1d88115 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_TICK_HOOK 0 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */ -#define configTICK_RATE_HZ ( (portTickType) 1000 ) +#define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES ( 6 ) #define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 1e73f13861..20f3fe9392 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -135,7 +135,7 @@ static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0; void vStartFlopRegTests( void ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; unsigned portBASE_TYPE x, y, z = flopSTART_VALUE; /* Fill the arrays into which the flop registers are to be saved with diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index c5caff1132..825d41a775 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -114,7 +114,7 @@ static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTE void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) { -xTaskHandle xTaskJustCreated; +TaskHandle_t xTaskJustCreated; portBASE_TYPE x, y; /* Place known values into the buffers into which the flop registers are diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c index 58592da68e..00418e11f8 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -137,8 +137,8 @@ baud rate parameters passed into the comtest initialisation has no effect. */ the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an error has been found at any time then the toggle rate will increase to mainERROR_CHECK_DELAY milliseconds. */ -#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) -#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) +#define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS ) +#define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS ) /* @@ -338,7 +338,7 @@ static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static void prvErrorChecks( void *pvParameters ) { -portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; +TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; volatile unsigned portBASE_TYPE uxFreeStack; /* Just to remove compiler warning. */ @@ -697,11 +697,11 @@ static void prvRegTestTask2( void *pvParameters ) /* This hook function will get called if there is a suspected stack overflow. An overflow can cause the task name to be corrupted, in which case the task handle needs to be used to determine the offending task. */ -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ); -void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName ) +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); +void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) { /* To prevent the optimiser removing the variables. */ -volatile xTaskHandle xTaskIn = xTask; +volatile TaskHandle_t xTaskIn = xTask; volatile signed char *pcTaskNameIn = pcTaskName; /* Remove compiler warnings. */ diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index bad03dde29..affbd33ded 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -85,8 +85,8 @@ /* Queues used to hold received characters, and characters waiting to be transmitted. */ -static xQueueHandle xRxedChars; -static xQueueHandle xCharsForTx; +static QueueHandle_t xRxedChars; +static QueueHandle_t xCharsForTx; /* Structure that maintains information on the UART being used. */ static XUartLite xUART; @@ -133,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ) { /* The port handle is not required as this driver only supports one UART. */ ( void ) pxPort; @@ -151,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ) { portBASE_TYPE xReturn = pdTRUE; diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject b/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject index 0c575035e8..6eddd27a35 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject @@ -63,7 +63,7 @@