I want to use sharp memory LCD with lvgl. I see that there is a driver for this type of displays, but it’s not clear to me how to use the driver. I read the porting guide, maybe I didn’t understand it well.
What MCU/Processor/Board and compiler are you using?
nRF52840, Keil MDK
What do you want to achieve?
Set up a project with FreeRTOS that drives Sharp MIP display
What have you tried so far?
I have a driver that transfers the display buffer data to the display using DAM, but my port of lvgl doesn’t drive the display yet.
Code to reproduce
Add the relevant code snippets here.
The code block(s) should be between ```c and ``` tags:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
#include "lv_conf.h"
#include "lvgl.h"
int main(void)
{
static lv_disp_buf_t disp_buf; /*A static or global variable to store the buffers*/
static lv_color_t buf_1[LV_HOR_RES_MAX * 10]; /*Static or global buffer(s). The second buffer is optional*/
static lv_color_t buf_2[LV_HOR_RES_MAX * 10];
lv_disp_buf_init(&disp_buf, buf_1, buf_2, LV_HOR_RES_MAX*10);/*Initialize `disp_buf` with the buffer(s) */
lv_disp_drv_t disp_drv; /*A variable to hold the drivers. Can be local variable*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.buffer = &disp_buf; /*Set an initialized buffer*/
disp_drv.flush_cb = sharp_mip_flush; /*Set a flush callback to draw to the display*/
disp_drv.rounder_cb = sharp_mip_rounder;
disp_drv.set_px_cb = sharp_mip_set_px;
lv_disp_t * disp;
disp = lv_disp_drv_register(&disp_drv); /*Register the driver and save the created display objects*/
}
When I try to compile it I get:
..\..\..\main.c(113): error: #20: identifier "sharp_mip_flush" is undefined ..\..\..\main.c(114): error: #20: identifier "sharp_mip_rounder" is undefined ..\..\..\main.c(115): error: #20: identifier "sharp_mip_set_px" is undefined
If I add #include "SHARP_MIP.h" in the include section I get this error:
..\..\..\main.c(58): error: #130: expected a "{"
It looks to my like there is a typo in SHARP_MIP.h
I know my code is not complete, I’m building after each step from the porting guide. Does this make any sense?
Okay, the error doesn’t show. I searched all lvgl and lv_driver filex for sharp_mip.h and it’s not included enywhere. Then the “my build test” error is normal not to show.
If I add #include "SHARP_MIP".h in the main.c include section I get this error: