1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(freertos) Application thread function returns void.

Don't try to cast it to void*. Avoid build warning.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>
This commit is contained in:
Nicușor Cîțu 2023-07-10 15:15:12 +03:00 committed by Gabor Kiss-Vamosi
parent 625cedcd5a
commit 141c70dba1
2 changed files with 3 additions and 4 deletions

View File

@ -62,7 +62,7 @@ lv_res_t lv_thread_init(lv_thread_t * pxThread, lv_thread_prio_t xSchedPriority,
void * xAttr)
{
pxThread->xTaskArg = xAttr;
pxThread->pvStartRoutine = (void * (*)(void *))pvStartRoutine;
pxThread->pvStartRoutine = pvStartRoutine;
BaseType_t xTaskCreateStatus = xTaskCreate(
prvRunThread,
@ -290,7 +290,7 @@ static void prvRunThread(void * pxArg)
lv_thread_t * pxThread = (lv_thread_t *)pxArg;
/* Run the thread routine. */
pxThread->xReturn = pxThread->pvStartRoutine((void *)pxThread->xTaskArg);
pxThread->pvStartRoutine((void *)pxThread->xTaskArg);
vTaskDelete(NULL);
}

View File

@ -34,10 +34,9 @@ extern "C" {
**********************/
typedef struct {
void * (*pvStartRoutine)(void *); /**< Application thread function. */
void (*pvStartRoutine)(void *); /**< Application thread function. */
void * xTaskArg; /**< Arguments for application thread function. */
TaskHandle_t xTaskHandle; /**< FreeRTOS task handle. */
void * xReturn; /**< Return value of pvStartRoutine. */
} lv_thread_t;
typedef struct {