initial commit
This commit is contained in:
commit
cff2a21efc
550 files changed
+154887
No files matched your search
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @file lv_nuttx_cache.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_CACHE_H
|
||||
#define LV_NUTTX_CACHE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void lv_nuttx_cache_init(void);
|
||||
|
||||
void lv_nuttx_cache_deinit(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_NUTTX_CACHE_H*/
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* @file lv_nuttx_entry.h
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#ifndef LV_NUTTX_ENTRY_H
|
||||
#define LV_NUTTX_ENTRY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../lv_conf_internal.h"
|
||||
#include "../../display/lv_display.h"
|
||||
#include "../../indev/lv_indev.h"
|
||||
|
||||
#if LV_USE_NUTTX
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef struct {
|
||||
const char * fb_path;
|
||||
const char * input_path;
|
||||
const char * utouch_path;
|
||||
} lv_nuttx_dsc_t;
|
||||
|
||||
typedef struct {
|
||||
lv_display_t * disp;
|
||||
lv_indev_t * indev;
|
||||
lv_indev_t * utouch_indev;
|
||||
} lv_nuttx_result_t;
|
||||
|
||||
typedef struct _lv_nuttx_ctx_t {
|
||||
void * image_cache;
|
||||
} lv_nuttx_ctx_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Initialize the lv_nuttx_dsc_t structure with default values for the NuttX port of LVGL.
|
||||
* @param dsc Pointer to the lv_nuttx_dsc_t structure to be initialized.
|
||||
*/
|
||||
void lv_nuttx_dsc_init(lv_nuttx_dsc_t * dsc);
|
||||
|
||||
/**
|
||||
* Initialize the LVGL display driver for NuttX using the provided configuration information.
|
||||
* @param dsc Pointer to the lv_nuttx_dsc_t structure containing the configuration information for the display driver.
|
||||
* @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler.
|
||||
*/
|
||||
void lv_nuttx_init(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result);
|
||||
|
||||
/**
|
||||
* Deinitialize the LVGL display driver for NuttX.
|
||||
* @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler.
|
||||
*/
|
||||
void lv_nuttx_deinit(lv_nuttx_result_t * result);
|
||||
|
||||
#if LV_USE_NUTTX_CUSTOM_INIT
|
||||
/**
|
||||
* Initialize the LVGL display driver for NuttX using the provided custom configuration information.
|
||||
* @param dsc Pointer to the lv_nuttx_dsc_t structure containing the custom configuration for the display driver.
|
||||
* @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler.
|
||||
*/
|
||||
void lv_nuttx_init_custom(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result);
|
||||
|
||||
/**
|
||||
* Deinitialize the LVGL display driver for NuttX using the provided custom configuration information.
|
||||
* @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler.
|
||||
*/
|
||||
void lv_nuttx_deinit_custom(lv_nuttx_result_t * result);
|
||||
#endif /* LV_USE_NUTTX_CUSTOM_INIT */
|
||||
|
||||
/**
|
||||
* Call `lv_timer_handler()` (LVGL's super loop) in an endless loop.
|
||||
* If LV_USE_NUTTX_LIBUV is enabled an UV timer will be created,
|
||||
* else `lv_timer_handler()` will be called in a loop with some sleep.
|
||||
* @param result pointer to a variable initialized by `lv_nuttx_init()` or `lv_nuttx_init_custom()`
|
||||
*/
|
||||
void lv_nuttx_run(lv_nuttx_result_t * result);
|
||||
|
||||
/**
|
||||
* Get the idle percentage of the system.
|
||||
* @return The idle percentage of the system.
|
||||
*/
|
||||
uint32_t lv_nuttx_get_idle(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /* LV_USE_NUTTX*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* LV_NUTTX_ENTRY_H */
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @file lv_nuttx_fbdev.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_FBDEV_H
|
||||
#define LV_NUTTX_FBDEV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../display/lv_display.h"
|
||||
|
||||
#if LV_USE_NUTTX
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Create a new display with NuttX backend.
|
||||
*/
|
||||
lv_display_t * lv_nuttx_fbdev_create(void);
|
||||
|
||||
/**
|
||||
* Initialize display with specified framebuffer device
|
||||
* @param disp pointer to display with NuttX backend
|
||||
* @param file the name of framebuffer device
|
||||
*/
|
||||
int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /* LV_USE_NUTTX */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* LV_NUTTX_FBDEV_H */
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file lv_nuttx_image_cache.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_IMAGE_CACHE_H
|
||||
#define LV_NUTTX_IMAGE_CACHE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../lv_conf_internal.h"
|
||||
#include LV_STDBOOL_INCLUDE
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void lv_nuttx_image_cache_init(bool use_independent_image_heap);
|
||||
|
||||
void lv_nuttx_image_cache_deinit(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_NUTTX_IMAGE_CACHE_H*/
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @file lv_nuttx_lcd.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_LCD_H
|
||||
#define LV_NUTTX_LCD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../display/lv_display.h"
|
||||
|
||||
#if LV_USE_NUTTX
|
||||
|
||||
#if LV_USE_NUTTX_LCD
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
lv_display_t * lv_nuttx_lcd_create(const char * dev_path);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /* LV_USE_NUTTX_LCD */
|
||||
|
||||
#endif /* LV_USE_NUTTX*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* LV_NUTTX_LCD_H */
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* @file lv_nuttx_libuv.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_LIBUV_H
|
||||
#define LV_NUTTX_LIBUV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../display/lv_display.h"
|
||||
#include "../../indev/lv_indev.h"
|
||||
|
||||
#if LV_USE_NUTTX
|
||||
|
||||
#if LV_USE_NUTTX_LIBUV
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct {
|
||||
void * loop;
|
||||
lv_display_t * disp;
|
||||
lv_indev_t * indev;
|
||||
} lv_nuttx_uv_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Initialize the uv_loop using the provided configuration information.
|
||||
* @param uv_info Pointer to the lv_nuttx_uv_t structure to be initialized.
|
||||
*/
|
||||
void * lv_nuttx_uv_init(lv_nuttx_uv_t * uv_info);
|
||||
|
||||
/**
|
||||
* Deinitialize the uv_loop configuration for NuttX porting layer.
|
||||
* @param data Pointer to user data.
|
||||
*/
|
||||
void lv_nuttx_uv_deinit(void ** data);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*LV_USE_NUTTX_LIBUV*/
|
||||
|
||||
#endif /*LV_USE_NUTTX*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /*LV_NUTTX_LIBUV_H*/
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @file lv_nuttx_profiler.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_NUTTX_PROFILER_H
|
||||
#define LV_NUTTX_PROFILER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void lv_nuttx_profiler_init(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_NUTTX_PROFILER_H*/
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @file lv_nuttx_touchscreen.h
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#ifndef LV_NUTTX_TOUCHSCREEN_H
|
||||
#define LV_NUTTX_TOUCHSCREEN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "../../indev/lv_indev.h"
|
||||
|
||||
#if LV_USE_NUTTX
|
||||
|
||||
#if LV_USE_NUTTX_TOUCHSCREEN
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Initialize indev with specified input device.
|
||||
* @param dev_path path of input device
|
||||
*/
|
||||
lv_indev_t * lv_nuttx_touchscreen_create(const char * dev_path);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /* LV_USE_NUTTX_TOUCHSCREEN */
|
||||
|
||||
#endif /* LV_USE_NUTTX*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* LV_NUTTX_TOUCHSCREEN_H */
|
||||
Reference in new issue
Block a user