I need to understand more before I could comment.

I've implemented an ePaper driver under nxgl, but as some of you are probably aware there needs to be an explicit redraw request to update an ePaper display.
What is the interface to the ePaper device?  Is it through a serial interface?  Or a framebuffer interface?
I'm not quite sure how to do that under nxgl as normally it would be driven automatically. It also takes a fair bit of time (~14 seconds for a colour display) during which period access to the ePaper is 'locked out' so the application really does need to be aware of what is going on.

What do you might by NXGL?  It is library of simply drawing helpers.  I take it you are not using NX, the full graphics system.  It would update automatically and we would not be having this discussion.

Since you are redrawing something that was not drawn by NX, it must be something that you drew in your application?  True?  Are you using a software framebuffer?

The correct way to implement a software framebuffer driver for a serial graphics device is via drivers/lcd/lcd_framebuffer.c.  That driver will allocate the software framebuffer and export a standard NuttX framebuffer driver interface.  The framebuffer driver at drivers/video/fb.c will expose the framebuffer driver to the application.  From the framebuffer driver you can use the FIOC_MMAP IOCTL command to get the address of the framebuffer. You would need enable CONFIG_LCD_UPDATE, then you can use FBIO_UPDATE command to force the software software framebuffer to be written to the serial hardware.

Here are some examples:

$ find boards -name defconfig | xargs grep CONFIG_LCD_FRAMEBUFFER
boards/arm/stm32/stm3240g-eval/configs/fb/defconfig:CONFIG_LCD_FRAMEBUFFER=y
boards/arm/stm32/stm32f4discovery/configs/max7219/defconfig:CONFIG_LCD_FRAMEBUFFER=y
boards/arm/stm32l4/nucleo-l476rg/configs/nxdemo/defconfig:CONFIG_LCD_FRAMEBUFFER=y

My intention is to add an nx_updatedisplay() API...but is there a better, or already available, way to do this? It could be done via a call to nx_setvisibility on the background window I guess, but personally I don't like overlaid semantics like that...

Now, that sounds like you are using NX.  NX will automatically update the display.

I cannot imagine a situation where that would be necessary. Let's talk more before you waste your time.  I would have to understand what you are really doing to be able to help you.

Greg


Reply via email to