Don't copy header outside of LVGL, export LVGL, add README, fix example
This commit is contained in:
parent
4758151b86
commit
d85cbea7f8
@ -86,11 +86,8 @@ endif
|
||||
|
||||
MAINSRC = lvgldemo.c
|
||||
|
||||
LVGL_SRC_DIR=$(APPDIR)/graphics/lvgl/lvgl
|
||||
LVGL_DIR=$(APPDIR)/graphics/lvgl
|
||||
|
||||
CFLAGS += ${shell $(INCDIR) "$(CC)" "$(LVGL_SRC_DIR)" "$(LVGL_DIR)"}
|
||||
CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(LVGL_SRC_DIR)" "$(LVGL_DIR)"}
|
||||
CFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE}
|
||||
CXXFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE}
|
||||
|
||||
$(LVGL_EXAMPLES_TARBALL):
|
||||
@echo "Downloading: $(LVGL_EXAMPLES_TARBALL)"
|
||||
|
@ -41,7 +41,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <graphics/lvgl.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <pthread.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <graphics/lvgl.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include "fbdev.h"
|
||||
#include "tp.h"
|
||||
|
@ -41,7 +41,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <graphics/lvgl.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <graphics/lvgl.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "tp.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -35,4 +35,14 @@
|
||||
|
||||
ifeq ($(CONFIG_GRAPHICS_LVGL),y)
|
||||
CONFIGURED_APPS += $(APPDIR)/graphics/lvgl
|
||||
|
||||
# It allows `<lvgl/lvgl.h>` import.
|
||||
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/graphics/lvgl}
|
||||
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/graphics/lvgl}
|
||||
|
||||
# It allows `<lvgl.h>` import.
|
||||
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/graphics/lvgl/lvgl}
|
||||
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/graphics/lvgl/lvgl}
|
||||
endif
|
||||
|
@ -66,8 +66,6 @@ UNPACK ?= unzip -o
|
||||
|
||||
LVGL_UNPACKDIR = $(WD)/$(LVGL_UNPACKNAME)
|
||||
|
||||
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/graphics/lvgl}
|
||||
|
||||
$(LVGL_TARBALL):
|
||||
@echo "Downloading: $(LVGL_TARBALL)"
|
||||
$(Q) $(WGET) $(CONFIG_GRAPH_LVGL_URL)/$(LVGL_TARBALL)
|
||||
@ -78,13 +76,7 @@ $(LVGL_UNPACKNAME): $(LVGL_TARBALL)
|
||||
$(Q) mv lvgl-$(LVGL_VERSION) $(LVGL_UNPACKNAME)
|
||||
$(Q) touch $(LVGL_UNPACKNAME)
|
||||
|
||||
lvgl/lvgl.h: $(LVGL_UNPACKNAME)
|
||||
|
||||
$(APPDIR)/include/graphics/lvgl.h: lvgl/lvgl.h
|
||||
@echo "CP: lvgl/lvgl.h"
|
||||
$(Q) cp lvgl/lvgl.h $(APPDIR)/include/graphics/lvgl.h
|
||||
|
||||
context:: $(LVGL_UNPACKNAME) $(APPDIR)/include/graphics/lvgl.h
|
||||
context:: $(LVGL_UNPACKNAME)
|
||||
|
||||
clean::
|
||||
$(call DELDIR, build)
|
||||
@ -92,6 +84,5 @@ clean::
|
||||
distclean::
|
||||
$(call DELDIR, $(LVGL_UNPACKNAME))
|
||||
$(call DELFILE, $(LVGL_TARBALL))
|
||||
$(call DELFILE, $(APPDIR)/include/graphics/lvgl.h)
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
21
graphics/lvgl/README.md
Normal file
21
graphics/lvgl/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Usage
|
||||
|
||||
Import with `#include <lvgl/lvgl.h>` or `#include <lvgl.h>`.
|
||||
|
||||
Upstream example ported to NuttX is present at `examples/lvgldemo`.
|
||||
|
||||
LVGL can be used with framebuffer device. To find example boards with this
|
||||
preconfigured, search for `CONFIG_GRAPHICS_LVGL=y` in `defconfig` files.
|
||||
All of them have also `CONFIG_VIDEO_FB=y` present.
|
||||
|
||||
As a second option, LVGL can talk to a display driver and explicitly draw line by line.
|
||||
For this case, there is no preconfigured board present. Go to _Porting_ section
|
||||
of upstream documentation for more hints.
|
||||
|
||||
# Resources
|
||||
|
||||
* [API documentation with examples](https://docs.lvgl.io/latest/en/html/index.html)
|
||||
* [GitHub / LVGL / LVGL library](https://github.com/lvgl/lvgl)
|
||||
* [GitHub / LVGL / Examples, tutorials, applications](https://github.com/lvgl/lv_examples)
|
||||
* [GitHub / LVGL / Desktop simulator](https://github.com/lvgl/lv_sim_eclipse_sdl)
|
||||
* [GitHub / LVGL / Web simulator](https://github.com/lvgl/lv_sim_emscripten)
|
1
include/graphics/.gitignore
vendored
1
include/graphics/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/lvgl.h
|
Loading…
x
Reference in New Issue
Block a user