glcd driver updates:

1. Remove connection type header files and put prototypes locally and in
   glcd-drivers.h. Don't fall into the pitfall of too many header files again.
2. Create a separate frame buffer structure (this allows easier re-use of
   the frame buffer functions).
3. Add a function to retrieve pixel values from framebuffer.
4. Add the 'serdisplib' connection type.
5. Support display width that are not a multiple of 8 (e.g. 122x32).
This commit is contained in:
mmdolze
2011-11-22 23:14:45 +00:00
parent 85241c253d
commit eac9d590a8
12 changed files with 348 additions and 83 deletions
+11 -4
View File
@@ -1,7 +1,7 @@
/** \file server/drivers/glcd-drivers.h
* Connection type registry for glcd driver.
*
* File file contains includes and pointers to the connection type's init()
* File file contains prototypes and pointers to the connection type's init()
* function.
*/
@@ -12,18 +12,22 @@
# include "config.h"
#endif
/* Include connection type header below */
/* Include prototypes for initialization functions below */
#ifdef HAVE_PCSTYLE_LPT_CONTROL
# include "glcd-t6963.h"
int glcd_t6963_init(Driver *drvthis);
#endif
#ifdef HAVE_LIBPNG
# include "glcd-png.h"
int glcd_png_init(Driver *drvthis);
#endif
#ifdef HAVE_SERDISPLIB
int glcd_serdisp_init(Driver *drvthis);
#endif
/* symbolic names for connection types */
#define GLCD_CT_UNKNOWN 0
#define GLCD_CT_T6963 1
#define GLCD_CT_PNG 2
#define GLCD_CT_SERDISP 3
/** Structure linking symbolic names to initialization routines */
typedef struct ConnectionMapping {
@@ -44,6 +48,9 @@ static const ConnectionMapping connectionMapping[] = {
#endif
#ifdef HAVE_LIBPNG
{"png", GLCD_CT_PNG, glcd_png_init},
#endif
#ifdef HAVE_SERDISPLIB
{"serdisplib", GLCD_CT_SERDISP, glcd_serdisp_init},
#endif
/* default, end of structure element (do not delete) */
{NULL, GLCD_CT_UNKNOWN, NULL}