source: packages/utils/lcd4linux/patches/171-allow-to-specify-drv_generic_graphic_real_clear.patch @ 30381

Last change on this file since 30381 was 30381, checked in by juhosg, 5 years ago

package/lcd4linux: add driver for the LCD of the TEW-673GRU board

File size: 1.4 KB
  • drv_generic_graphic.c

    a b  
    2424 * 
    2525 */ 
    2626 
    27 /*  
     27/* 
    2828 * 
    2929 * exported functions: 
    3030 * 
    static int INVERTED = 0; 
    9898/* must be implemented by the real driver */ 
    9999void (*drv_generic_graphic_real_blit) () = NULL; 
    100100 
     101/* can be implemented by the real driver */ 
     102void (*drv_generic_graphic_real_clear) () = NULL; 
     103 
    101104 
    102105/****************************************/ 
    103106/*** generic Framebuffer stuff        ***/ 
    int drv_generic_graphic_clear(void) 
    691694        for (i = 0; i < LCOLS * LROWS; i++) 
    692695            drv_generic_graphic_FB[l][i] = NO_COL; 
    693696 
    694     drv_generic_graphic_blit(0, 0, LROWS, LCOLS); 
     697    if (drv_generic_graphic_real_clear) 
     698        drv_generic_graphic_real_clear(NO_COL); 
     699    else 
     700        drv_generic_graphic_blit(0, 0, LROWS, LCOLS); 
    695701 
    696702    return 0; 
    697703} 
  • drv_generic_graphic.h

    a b extern RGBA NO_COL; /* no color (comple 
    4040/* these functions must be implemented by the real driver */ 
    4141extern void (*drv_generic_graphic_real_blit) (const int row, const int col, const int height, const int width); 
    4242 
     43/* these functions can be implemented by the real driver */ 
     44void (*drv_generic_graphic_real_clear) (const RGBA rgba); 
     45 
    4346/* helper function to get pixel color or gray value */ 
    4447extern RGBA drv_generic_graphic_rgb(const int row, const int col); 
    4548extern unsigned char drv_generic_graphic_gray(const int row, const int col); 
Note: See TracBrowser for help on using the repository browser.