zephyr/modules/lvgl/include/lvgl_zephyr_osal.h
Fabian Blatz 9a4ae67f7b modules: lvgl: Add zephyr OSAL implementation
This patch adds the OSAL implementation of dynamic thread creation, mutex
and thread syncronization primitive (semaphore) enabling the use of the
parallel rendering architecture provided with LVGL 9.0. To use it, set
`CONFIG_LV_Z_USE_OSAL` and your preferred dynamic thread stack allocation
method (pool or heap).

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-04 14:17:10 +01:00

30 lines
515 B
C

/*
* Copyright (c) 2024 Fabian Blatz <fabianblatz@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_MODULES_LVGL_ZEPHYR_OSAL_H_
#define ZEPHYR_MODULES_LVGL_ZEPHYR_OSAL_H_
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
k_tid_t tid;
k_thread_stack_t *stack;
struct k_thread thread;
} lv_thread_t;
typedef struct k_mutex lv_mutex_t;
typedef struct k_sem lv_thread_sync_t;
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_MODULES_LVGL_ZEPHYR_OSAL_H_ */