Upgrading to FreeRTOS V5.0.0
[API]
Important information on upgrading existing FreeRTOS application to FreeRTOS V5.0.0
The parameters to the functions xQueueSendFromISR(), xQueueSendToFrontFromISR(), xQueueSendToBackFromISR and xSemaphoreGiveFromISR() have changed.
The old functions all had similar prototypes of the form ...:
BaseType_t xQueueSendFromISR(
QueueHandle_t xQueue,
void *pvItemToQueue,
BaseType_t xTaskPreviouslyWoken
);
... returning pdTRUE if the send (or give in the case of the semaphores) caused a higher priority task to unblock.
The new functions all have prototypes of the form:
BaseType_t xQueueSendFromISR(
QueueHandle_t xQueue,
void *pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken
);
The major difference is the third parameter, which is now a pointer. If sending to the queue (or giving the semaphore) caused a
higher priority ask to unblock then xQueueSendFromISR will set *pxHigherPriorityTaskWoken to pdTRUE. The return value can now
be either pdPASS to indicate that the send was successful, or errQUEUE_FULL if the send was not successful.
Please read the FreeRTOS API documentation pages for full descriptions and examples. The demo applications within the FreeRTOS.org
download have also been updated to use this new scheme.
You must update all calls to xQueueSendFromISR(),
xQueueSendToFrontFromISR(), xQueueSendToBackFromISR()
and xSemaphoreGiveFromISR() as passing
pdFALSE in as the third parameter might not genereate a compiler warning - but could result in an assignment to NULL.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|