refactor: disp->display, res->result/resolution, hor/ver->horizontal/vertical, txt->text, angle->rotation, zoom->scale
This commit is contained in:
@@ -63,9 +63,9 @@ static void prvTestAndDecrement(lv_thread_sync_t * pxCond,
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
lv_res_t lv_thread_init(lv_thread_t * pxThread, lv_thread_prio_t xSchedPriority,
|
||||
void (*pvStartRoutine)(void *), size_t usStackSize,
|
||||
void * xAttr)
|
||||
lv_result_t lv_thread_init(lv_thread_t * pxThread, lv_thread_prio_t xSchedPriority,
|
||||
void (*pvStartRoutine)(void *), size_t usStackSize,
|
||||
void * xAttr)
|
||||
{
|
||||
pxThread->xTaskArg = xAttr;
|
||||
pxThread->pvStartRoutine = pvStartRoutine;
|
||||
@@ -81,27 +81,27 @@ lv_res_t lv_thread_init(lv_thread_t * pxThread, lv_thread_prio_t xSchedPriority,
|
||||
/* Ensure that the FreeRTOS task was successfully created. */
|
||||
if(xTaskCreateStatus != pdPASS) {
|
||||
LV_LOG_ERROR("xTaskCreate failed!");
|
||||
return LV_RES_INV;
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_thread_delete(lv_thread_t * pxThread)
|
||||
lv_result_t lv_thread_delete(lv_thread_t * pxThread)
|
||||
{
|
||||
vTaskDelete(pxThread->xTaskHandle);
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_mutex_init(lv_mutex_t * pxMutex)
|
||||
lv_result_t lv_mutex_init(lv_mutex_t * pxMutex)
|
||||
{
|
||||
prvMutexInit(pxMutex);
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_mutex_lock(lv_mutex_t * pxMutex)
|
||||
lv_result_t lv_mutex_lock(lv_mutex_t * pxMutex)
|
||||
{
|
||||
/* If mutex in uninitialized, perform initialization. */
|
||||
prvCheckMutexInit(pxMutex);
|
||||
@@ -109,13 +109,13 @@ lv_res_t lv_mutex_lock(lv_mutex_t * pxMutex)
|
||||
BaseType_t xMutexTakeStatus = xSemaphoreTake(pxMutex->xMutex, portMAX_DELAY);
|
||||
if(xMutexTakeStatus != pdTRUE) {
|
||||
LV_LOG_ERROR("xSemaphoreTake failed!");
|
||||
return LV_RES_INV;
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_mutex_lock_isr(lv_mutex_t * pxMutex)
|
||||
lv_result_t lv_mutex_lock_isr(lv_mutex_t * pxMutex)
|
||||
{
|
||||
/* If mutex in uninitialized, perform initialization. */
|
||||
prvCheckMutexInit(pxMutex);
|
||||
@@ -125,7 +125,7 @@ lv_res_t lv_mutex_lock_isr(lv_mutex_t * pxMutex)
|
||||
BaseType_t xMutexTakeStatus = xSemaphoreTakeFromISR(pxMutex->xMutex, &xHigherPriorityTaskWoken);
|
||||
if(xMutexTakeStatus != pdTRUE) {
|
||||
LV_LOG_ERROR("xSemaphoreTake failed!");
|
||||
return LV_RES_INV;
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
/* If xHigherPriorityTaskWoken is now set to pdTRUE then a context switch
|
||||
@@ -134,10 +134,10 @@ lv_res_t lv_mutex_lock_isr(lv_mutex_t * pxMutex)
|
||||
use and may be called portEND_SWITCHING_ISR(). */
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_mutex_unlock(lv_mutex_t * pxMutex)
|
||||
lv_result_t lv_mutex_unlock(lv_mutex_t * pxMutex)
|
||||
{
|
||||
/* If mutex in uninitialized, perform initialization. */
|
||||
prvCheckMutexInit(pxMutex);
|
||||
@@ -145,21 +145,21 @@ lv_res_t lv_mutex_unlock(lv_mutex_t * pxMutex)
|
||||
BaseType_t xMutexGiveStatus = xSemaphoreGive(pxMutex->xMutex);
|
||||
if(xMutexGiveStatus != pdTRUE) {
|
||||
LV_LOG_ERROR("xSemaphoreGive failed!");
|
||||
return LV_RES_INV;
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_mutex_delete(lv_mutex_t * pxMutex)
|
||||
lv_result_t lv_mutex_delete(lv_mutex_t * pxMutex)
|
||||
{
|
||||
vSemaphoreDelete(pxMutex->xMutex);
|
||||
pxMutex->xIsInitialized = pdFALSE;
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_thread_sync_init(lv_thread_sync_t * pxCond)
|
||||
lv_result_t lv_thread_sync_init(lv_thread_sync_t * pxCond)
|
||||
{
|
||||
#if USE_FREERTOS_TASK_NOTIFY
|
||||
/* Store the handle of the calling task. */
|
||||
@@ -168,12 +168,12 @@ lv_res_t lv_thread_sync_init(lv_thread_sync_t * pxCond)
|
||||
prvCondInit(pxCond);
|
||||
#endif
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
|
||||
lv_result_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
|
||||
{
|
||||
lv_res_t lvRes = LV_RES_OK;
|
||||
lv_result_t lvRes = LV_RESULT_OK;
|
||||
|
||||
#if USE_FREERTOS_TASK_NOTIFY
|
||||
LV_UNUSED(pxCond);
|
||||
@@ -210,7 +210,7 @@ lv_res_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
|
||||
|
||||
if(xCondWaitStatus != pdTRUE) {
|
||||
LV_LOG_ERROR("xSemaphoreTake(xCondWaitSemaphore) failed!");
|
||||
lvRes = LV_RES_INV;
|
||||
lvRes = LV_RESULT_INVALID;
|
||||
|
||||
/* Atomically decrements thread waiting by 1.
|
||||
* If iLocalWaitingThreads is updated by other thread(s) in between,
|
||||
@@ -221,7 +221,7 @@ lv_res_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
|
||||
}
|
||||
else {
|
||||
LV_LOG_ERROR("xSemaphoreGive(xSyncMutex) failed!");
|
||||
lvRes = LV_RES_INV;
|
||||
lvRes = LV_RESULT_INVALID;
|
||||
|
||||
/* Atomically decrements thread waiting by 1.
|
||||
* If iLocalWaitingThreads is updated by other thread(s) in between,
|
||||
@@ -240,7 +240,7 @@ lv_res_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
|
||||
return lvRes;
|
||||
}
|
||||
|
||||
lv_res_t lv_thread_sync_signal(lv_thread_sync_t * pxCond)
|
||||
lv_result_t lv_thread_sync_signal(lv_thread_sync_t * pxCond)
|
||||
{
|
||||
#if USE_FREERTOS_TASK_NOTIFY
|
||||
/* Send a notification to the task waiting. */
|
||||
@@ -281,10 +281,10 @@ lv_res_t lv_thread_sync_signal(lv_thread_sync_t * pxCond)
|
||||
xSemaphoreGive(pxCond->xSyncMutex);
|
||||
#endif
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
lv_res_t lv_thread_sync_delete(lv_thread_sync_t * pxCond)
|
||||
lv_result_t lv_thread_sync_delete(lv_thread_sync_t * pxCond)
|
||||
{
|
||||
#if USE_FREERTOS_TASK_NOTIFY
|
||||
LV_UNUSED(pxCond);
|
||||
@@ -297,7 +297,7 @@ lv_res_t lv_thread_sync_delete(lv_thread_sync_t * pxCond)
|
||||
pxCond->xIsInitialized = pdFALSE;
|
||||
#endif
|
||||
|
||||
return LV_RES_OK;
|
||||
return LV_RESULT_OK;
|
||||
}
|
||||
|
||||
/**********************
|
||||
|
||||
Reference in New Issue
Block a user