From: Scott F. <sc...@st...> - 2009-05-17 09:25:15
|
On Sun, May 17, 2009 at 2:24 AM, Scott Flynn <sc...@st...> wrote: >> Ok, good point. I went the route you suggested by clearing the FB, and >> it brought up another intrusive point about the patch. It defaulted >> all layouts to a timeout. That causes the framebuffer to be cleared, >> interrupting the timing, and causing a noticeable change in the >> display. I defaulted the timeout to 0 (no timeout), but that can be >> overridden in the Display section. >> >> Display CF635 { >> Icons 2 >> Driver 'Crystalfontz' >> Model '635' >> Port '/dev/ttyUSB1' >> Speed 115200 >> Contrast 120 >> Backlight 100 >> DefaultTimeout 5000 >> } >> >>> > > I found that not all drivers use a text framebuffer. I made that > assumption and didn't check to see if the text framebuffer existed > before trying to clear it. It caused a crash of course. Attached is > the updated patch that checks like it should and it also clears any > graphic displays. I pulled a fresh copy off the SVN repo for it. > Oops. Sorry, I shouldn't be programming C. Or at least I should be reading more of your code (and more C documentation) before writing anything. ;) Make that: void drv_generic_text_clear(void) { if(LayoutFB == NULL) { return; } memset(LayoutFB, ' ', LROWS * LCOLS * sizeof(*LayoutFB)); drv_generic_text_blit(0, 0, LROWS, LCOLS); } |