This sample runs the music player demo that comes with
LVGL: a screen full of artwork, text and
an animated spectrum that plays by itself and follows the touchscreen. It
enables the demo and the fonts it uses with LVGL’s own options in its
prj.conf, and what the board needs, such as its GPU, in
boards/<board>.conf.
Unlike the other samples it does not end.
pbl samples samples/third_party/lvgl/music
every board
#include <stdio.h>
#include <pbl/kernel/delay.h>
#include <demos/lv_demos.h>
#include <pbl_lvgl.h>
int main(void) {
int ret;
ret = pbl_lvgl_init();
if (ret != 0) {
fprintf(stderr, "lvgl: init failed (%d)\n", ret);
return ret;
}
/* The demos come with LVGL, each enabled by its CONFIG_LV_USE_DEMO_* option. */
lv_demo_music();
printf("lvgl: music player on %dx%d\n",
(int)lv_display_get_horizontal_resolution(pbl_lvgl_get_display()),
(int)lv_display_get_vertical_resolution(pbl_lvgl_get_display()));
while (true) {
pbl_sleep_ms(lv_timer_handler());
}
}
lvgl: music player on \d+x\d+
Generated from PebbleOS 4bbc630fa. This page is maintained in the pebbleos repository: docs/samples/third_party/lvgl/music.md.