Hi Alan,

I'm no expert on this stuff either but as I understand things the nx_callback/redraw, is for when nx requests that the client redraws a portion of the screen (See 2.3.4.1 of the NX Graphics Subsystem manual). I want to go the other way - when the application has decided that a new display is 'stable', it requests for it to be put on the screen.

I don't really see how to do that in a standard way yet, so I've added a new method to lcd.c::struct lcd_dev_s called 'redraw', but I don't want to be making extensions to APIs without there being some element of discussion first...

Regards

DAVE


On 17/12/2019 11:34, Alan Carvalho de Assis wrote:
Hi Dave,

On 12/17/19, Dave Marples <d...@marples.net> wrote:
Folks,

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.

Other guy already used ePaper with NX Graphic libs, if I'm not wrong
it was Petteri Aimonen.

He also used NuttX nxgl in his Master Thesis:

http://jpa.kapsi.fi/stuff/other/diplomityo.pdf

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.

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...

I'm not expert on graphics, but I think you can use the redraw in the
nx_callback to do it.

Please take a look at apps/examples/nxlines, mainly on it:

const struct nx_callback_s g_nxlinescb =
{
   nxlines_redraw,   /* redraw */
...

BR,

Alan

Reply via email to