diff --git a/configs/zp214xpa/README.txt b/configs/zp214xpa/README.txt index 99c0c18f269..d2943d62df1 100644 --- a/configs/zp214xpa/README.txt +++ b/configs/zp214xpa/README.txt @@ -344,5 +344,5 @@ Configurations: rot has set in. Now only random garbage appears on the OLED. Certainly a lot has changed since 2012, but I cannot see any change to either this configuration, to the LCD driver, or to the LPC2148 support that would - affect the operation of the LCD. + affect the operation of the LCD. The nsh configuration is still functional. diff --git a/drivers/lcd/Kconfig b/drivers/lcd/Kconfig index 3ca7b79cf09..96a1b2caccf 100644 --- a/drivers/lcd/Kconfig +++ b/drivers/lcd/Kconfig @@ -19,6 +19,10 @@ menuconfig LCD if LCD +config LCD_PACKEDFIRST + bool + default n + config LCD_UPDATE bool default n diff --git a/drivers/lcd/Make.defs b/drivers/lcd/Make.defs index d8cb8fddfdf..a1239afb2fb 100644 --- a/drivers/lcd/Make.defs +++ b/drivers/lcd/Make.defs @@ -114,7 +114,7 @@ endif ifeq ($(CONFIG_LCD_RA8875),y) CSRCS += ra8875.c endif -endif # CONFIG_NX_LCDDRIVER +endif # CONFIG_LCD ifeq ($(CONFIG_SLCD),y) diff --git a/drivers/lcd/max7219.c b/drivers/lcd/max7219.c index ab4c0cc411e..3f3a39bc834 100644 --- a/drivers/lcd/max7219.c +++ b/drivers/lcd/max7219.c @@ -101,12 +101,6 @@ # define CONFIG_LCD_MAXCONTRAST 15 #endif -/* Color is 1bpp monochrome with leftmost column contained in bits 0 */ - -#ifdef CONFIG_NX_DISABLE_1BPP -# warning "1 bit-per-pixel support needed" -#endif - /* Color Properties *********************************************************/ /* The MAX7219 chip can handle resolution of 8x8, 16x8, 8x16, 16x16, 24x8, * etc. @@ -459,13 +453,13 @@ static int max7219_putrun(fb_coord_t row, fb_coord_t col, row = newrow; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; #endif -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -485,7 +479,7 @@ static int max7219_putrun(fb_coord_t row, fb_coord_t col, __clear_bit(col % 8 + i, ptr); } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -578,7 +572,7 @@ static int max7219_getrun(fb_coord_t row, fb_coord_t col, return -EINVAL; } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -598,7 +592,7 @@ static int max7219_getrun(fb_coord_t row, fb_coord_t col, *buffer &= ~usrmask; } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/memlcd.c b/drivers/lcd/memlcd.c index 7cd379ca5b0..f5c2917ad89 100644 --- a/drivers/lcd/memlcd.c +++ b/drivers/lcd/memlcd.c @@ -419,7 +419,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col, DEBUGASSERT(buffer); lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -438,7 +438,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col, __clear_bit(col % 8 + i, p); } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -510,7 +510,7 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, DEBUGASSERT(buffer); lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -529,7 +529,7 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, *buffer &= ~usrmask; } -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/nokia6100.c b/drivers/lcd/nokia6100.c index cc28e027f74..ae28409347d 100644 --- a/drivers/lcd/nokia6100.c +++ b/drivers/lcd/nokia6100.c @@ -138,20 +138,6 @@ # endif #endif -#if CONFIG_NOKIA6100_BPP == 8 -# ifdef CONFIG_NX_DISABLE_8BPP -# warning "8-bit pixel support needed" -# endif -#elif CONFIG_NOKIA6100_BPP == 12 -# if defined(CONFIG_NX_DISABLE_12BPP) || !defined(CONFIG_NX_PACKEDMSFIRST) -# warning "12-bit, big-endian pixel support needed" -# endif -#elif CONFIG_NOKIA6100_BPP == 16 -# ifdef CONFIG_NX_DISABLE_16BPP -# warning "16-bit pixel support needed" -# endif -#endif - /* Exactly one LCD controller must be selected. "The Olimex boards have both display * controllers possible; if the LCD has a GE-12 sticker on it, it’s a Philips PCF8833. * If it has a GE-8 sticker, it’s an Epson controller." diff --git a/drivers/lcd/p14201.c b/drivers/lcd/p14201.c index 4461502c4fb..87f48d94b72 100644 --- a/drivers/lcd/p14201.c +++ b/drivers/lcd/p14201.c @@ -135,12 +135,6 @@ # define CONFIG_LCD_MAXPOWER 1 #endif -/* Color is 4bpp greyscale with leftmost column contained in bits 7:4 */ - -#if defined(CONFIG_NX_DISABLE_4BPP) || !defined(CONFIG_NX_PACKEDMSFIRST) -# warning "4-bit, big-endian pixel support needed" -#endif - /* Define the CONFIG_LCD_RITDEBUG to enable detailed debug output (stuff you would * never want to see unless you are debugging this file). * diff --git a/drivers/lcd/pcd8544.c b/drivers/lcd/pcd8544.c index c5d3c86fa1c..b3818792da4 100644 --- a/drivers/lcd/pcd8544.c +++ b/drivers/lcd/pcd8544.c @@ -156,12 +156,6 @@ # error "CONFIG_SPI_CMDDATA must be defined in your NuttX configuration" #endif -/* Color is 1bpp monochrome with leftmost column contained in bits 0 */ - -#ifdef CONFIG_NX_DISABLE_1BPP -# warning "1 bit-per-pixel support needed" -#endif - /* Color Properties *******************************************************************/ /* The PCD8544 display controller can handle a resolution of 84x48. */ @@ -503,7 +497,7 @@ static int pcd8544_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf fbmask = 1 << (row & 7); fbptr = &priv->fb[page * PCD8544_XRES + col]; ptr = fbptr; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -524,7 +518,7 @@ static int pcd8544_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -650,7 +644,7 @@ static int pcd8544_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * PCD8544_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -672,7 +666,7 @@ static int pcd8544_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, * this! */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/ssd1306_base.c b/drivers/lcd/ssd1306_base.c index 536cbbb67e7..9c3817f6067 100644 --- a/drivers/lcd/ssd1306_base.c +++ b/drivers/lcd/ssd1306_base.c @@ -361,7 +361,7 @@ static int ssd1306_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf ptr = fbptr; #endif -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -393,7 +393,7 @@ static int ssd1306_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -564,7 +564,7 @@ static int ssd1306_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * SSD1306_DEV_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -590,7 +590,7 @@ static int ssd1306_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Inc/Decrement to the next destination pixel. */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/ssd1351.c b/drivers/lcd/ssd1351.c index 791040eee5d..6c375e012e4 100644 --- a/drivers/lcd/ssd1351.c +++ b/drivers/lcd/ssd1351.c @@ -100,19 +100,8 @@ * CONFIG_SPI - enables support for SPI * CONFIG_SPI_CMDDATA - enables support for cmd/data selection * (if using 4-wire SPI) - * - * NX settings that must be undefined: - * CONFIG_NX_DISABLE_16BPP - disables 16 bpp support */ -/* Verify that all configuration requirements have been met */ - -/* Number of bits per pixel */ - -#ifdef CONFIG_NX_DISABLE_16BPP -# error "Requires support for 16 bits per pixel" -#endif - /* Max power */ #if CONFIG_LCD_MAXPOWER != 1 diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c index d25583a7452..3ae17f199c2 100644 --- a/drivers/lcd/st7565.c +++ b/drivers/lcd/st7565.c @@ -128,14 +128,6 @@ # warning "Optimal setting of CONFIG_LCD_MAXCONTRAST is 255" #endif -/* Check power setting */ - -/* Color is 1bpp monochrome with leftmost column contained in bits 0 */ - -#ifdef CONFIG_NX_DISABLE_1BPP -# warning "1 bit-per-pixel support needed" -#endif - /* Color Properties *******************************************************************/ /* The ST7565 display controller can handle a resolution of 128x64. @@ -515,7 +507,7 @@ static int st7565_putrun(fb_coord_t row, fb_coord_t col, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * ST7565_XRES + col]; ptr = fbptr; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -536,7 +528,7 @@ static int st7565_putrun(fb_coord_t row, fb_coord_t col, /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -667,7 +659,7 @@ static int st7565_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * ST7565_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -688,7 +680,7 @@ static int st7565_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, * logic could write past the end of the user buffer. Revisit this! */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/st7567.c b/drivers/lcd/st7567.c index 5de10bb7c3d..14f732fe5dd 100644 --- a/drivers/lcd/st7567.c +++ b/drivers/lcd/st7567.c @@ -164,12 +164,6 @@ # error "CONFIG_SPI_CMDDATA must be defined in your NuttX configuration" #endif -/* Color is 1bpp monochrome with leftmost column contained in bits 0 */ - -#ifdef CONFIG_NX_DISABLE_1BPP -# warning "1 bit-per-pixel support needed" -#endif - /* Color Properties *******************************************************************/ /* The ST7567 display controller can handle a resolution of 128x64. */ @@ -480,7 +474,7 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff fbmask = 1 << (row & 7); fbptr = &priv->fb[page * ST7567_XRES + col]; ptr = fbptr; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -501,7 +495,7 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -628,7 +622,7 @@ static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * ST7567_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -650,7 +644,7 @@ static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, * this! */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/ug-2864ambag01.c b/drivers/lcd/ug-2864ambag01.c index 1e6484f2561..b1633d1e2be 100644 --- a/drivers/lcd/ug-2864ambag01.c +++ b/drivers/lcd/ug-2864ambag01.c @@ -558,7 +558,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_ ptr = fbptr; #endif -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -590,7 +590,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_ /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -763,7 +763,7 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf fbmask = 1 << (row & 7); fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -789,7 +789,7 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf * this! */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/drivers/lcd/ug-9664hswag01.c b/drivers/lcd/ug-9664hswag01.c index 96d09aea999..d644ec03840 100644 --- a/drivers/lcd/ug-9664hswag01.c +++ b/drivers/lcd/ug-9664hswag01.c @@ -155,12 +155,6 @@ # error "CONFIG_SPI_CMDDATA must be defined in your NuttX configuration" #endif -/* Color is 1bpp monochrome with leftmost column contained in bits 0 */ - -#ifdef CONFIG_NX_DISABLE_1BPP -# warning "1 bit-per-pixel support needed" -#endif - /* Color Properties *******************************************************************/ /* The SSD1305 display controller can handle a resolution of 132x64. The OLED * on the base board is 96x64. @@ -547,7 +541,7 @@ static int ug_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, ptr = fbptr; #endif -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -579,7 +573,7 @@ static int ug_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, /* Inc/Decrement to the next source pixel */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; @@ -739,7 +733,7 @@ static int ug_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, fbmask = 1 << (row & 7); fbptr = &priv->fb[page * UG_XRES + col]; -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST usrmask = MS_BIT; #else usrmask = LS_BIT; @@ -766,7 +760,7 @@ static int ug_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, * this! */ -#ifdef CONFIG_NX_PACKEDMSFIRST +#ifdef CONFIG_LCD_PACKEDMSFIRST if (usrmask == LS_BIT) { buffer++; diff --git a/graphics/Kconfig b/graphics/Kconfig index 6ee3fc622c5..1bdea6a2a57 100644 --- a/graphics/Kconfig +++ b/graphics/Kconfig @@ -153,7 +153,7 @@ config NX_PACKEDMSFIRST bool "Packed MS First" default y select NXFONTS_PACKEDMSFIRST if NXFONTS - depends on NX_DISABLE_1BPP || NX_DISABLE_2BPP || NX_DISABLE_4BPP + select LCD_PACKEDFIRST if LCD ---help--- If a pixel depth of less than 8-bits is used, then NX needs to know if the pixels pack from the MS to LS or from LS to MS diff --git a/libnx/nxfonts/Kconfig b/libnx/nxfonts/Kconfig index 0c2c9307e1d..d08b700fd07 100644 --- a/libnx/nxfonts/Kconfig +++ b/libnx/nxfonts/Kconfig @@ -400,7 +400,7 @@ config NXFONTS_PACKEDMSFIRST bool "Packed MS First" default y if !NX || NX_PACKEDMSFIRST default n if NX && !NX_PACKEDMSFIRST - depends on NXFONTS_DISABLE_1BPP || NXFONTS_DISABLE_2BPP || NXFONTS_DISABLE_4BPP + select LCD_PACKEDFIRST if LCD ---help--- If a pixel depth of less than 8-bits is used, then NX needs to know if the pixels pack from the MS to LS or from LS to MS