apps/pdcur34: Define pdc_color_t based on pixel depth, not on specific color format.

This commit is contained in:
Gregory Nutt 2017-11-22 07:22:03 -06:00
parent 63e3af2d62
commit 49dab79a30
5 changed files with 4 additions and 9 deletions

View File

@ -43,7 +43,6 @@
#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
#include <ctype.h>
#include <stdlib.h>
#include <time.h>

View File

@ -45,7 +45,6 @@
****************************************************************************/
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

View File

@ -55,8 +55,6 @@
* Included Files
****************************************************************************/
#include <signal.h>
#include "graphics/curses.h"
/****************************************************************************

View File

@ -217,7 +217,7 @@ static inline void PDC_render_gyph(FAR struct pdc_fbstate_s *fbstate,
/* Then render the glyph into the allocated memory
*
* REVISIT: The case where visibility==1 is not yet handled. In that
* case, only the lowe quarter of the glyph should be reversed.
* case, only the lower quarter of the glyph should be reversed.
*/
ret = RENDERER((FAR pdc_color_t *)fbstart,

View File

@ -108,7 +108,6 @@
#endif
#if defined(CONFIG_PDCURSES_COLORFMT_Y1)
# warning CONFIG_PDCURSES_COLORFMT_Y1 not yet supported
# define PDCURSES_COLORFMT FB_FMT_Y1
# define PDCURSES_BPP 1
# define PDCURSES_INIT_COLOR PDCURSES_BGCOLOR_GREYLEVEL
@ -198,11 +197,11 @@ struct pdc_rgbcolor_s
/* Holds one framebuffer pixel */
#if defined(CONFIG_PDCURSES_COLORFMT_RGB332)
#if PDCURSES_BPP <= 8
typedef uint8_t pdc_color_t;
#elif defined(CONFIG_PDCURSES_COLORFMT_RGB565)
#elif PDCURSES_BPP <= 16
typedef uint16_t pdc_color_t;
#elif defined(CONFIG_PDCURSES_COLORFMT_RGB888)
#elif PDCURSES_BPP <= 32
typedef uint32_t pdc_color_t;
#endif