Issue st77xx.py generic driver

lv_binding_micropython/driver/generic/st77xx.py in a recent commit
Now uses a buffer area created with lv.disp_create(width, height).

I got an error when flashing the screen, so I saw it with the help command.

def disp_drv_flush_cb(self,disp_drv,area,color):
         # print(f"({area.x1},{area.y1}..{area.x2},{area.y2})")
         self.rp2_wait_dma() # wait if not yet done and DMA is being used
         # blit in background
         self.blit(area.x1,area.y1,w:=(area.x2-area.x1+1),h:=(area.y2-area.y1+1),disp_drv.draw_buf.buf_act.__dereference__( 2*w*h),is_blocking=False)
         self.disp_drv.flush_ready()

disp_drv.draw_buf.buf_act.dereference(2wh)
disp_drv.draw_buf_act.dereference(2wh)
It worked when I changed to

thanks.

Thank you for reporting this!

I’ve opened a GitHub issue:

draw_buf_act is a private LVGL member and is not exposed to the user, so I’m surprised it worked when you tried it. Are you using the latest master branch of lv_micropython from GitHub?

The correct way is to use color argument which represents the buffer. Could you try it instead?

(CC: @kisvegabor I’m not sure “color_p” is the best name to describe a buffer…)

With the rp2 firmware built with lv_micropython commit 43ac037, advanced_demo worked after fixing the draw_buf.buf_act.dereference variable for buffer reading.

With the latest lv_micropython commit 70c5d61, which I fetched/merged again today, draw_buf* is no longer visible and advanced_demo no longer works.

When I started lv_micropython on Raspberry Pi Pico, I created and used the ili9341 version derived from the st77xx.py generic driver.
This st77xx.py was very helpful when I started with the rp2 port. I hope it will be fixed and working in the future.

I tried to fix whether it works with color_p.

disp_drv.draw_buf.buf_act.__dereference__(2*w*h)

of

color.__dereference__(2*w*h)

advanced_demo now works even with lv_micropython commit 70c5d61. Thank you for your advice.

Thank you for checking this.
I’ve updated lv_micropython with the fix.

True. What about color_buf?

That’s a good option. Same discussion here: