
Dear Mark Jackson,
In message 497EF0C4.3060907@mimc.co.uk you wrote:
This patch adds 16bpp BMP support to the common lcd code.
At the moment it's only been tested on the MIMC200 AVR32 board, but the hooks are in place to extend this to other platforms.
...
+#if defined(CONFIG_PXA250) +#error 16 bpp support not added for PXA250 +#elif defined(CONFIG_ATMEL_LCD)
- case 16:
for (i = 0; i < height; ++i) {
WATCHDOG_RESET();
for (j = 0; j < width; j++) {
+#if defined(CONFIG_ATMEL_LCD_BGR555)
*(fb++) = ((bmap[0] & 0x1f) << 2) | (bmap[1] & 0x03);
*(fb++) = (bmap[0] & 0xe0) | ((bmap[1] & 0x7c) >> 2);
bmap += 2;
+#else
*(fb++) = *(bmap++);
*(fb++) = *(bmap++);
+#endif
}
bmap += (padded_line - width) * 2;
fb -= (width * 2 + lcd_line_length);
}
break;
+#elif defined(CONFIG_MPC823) +#error 16 bpp support not added for MPC823 +#elif defined(CONFIG_MCC200) +#error 16 bpp support not added for MCC200 +#endif
No, this still makes no sense to me. Listing all the accrhitectures where this is implemented or not is error prone, and this file should definitely be as independent from specific hardware properties as possible.
Can we not agree on some generic name (like CONFIG_BMP_16BPP) and #define this only on those boards that can do it / need it? Then we can omit all the "elif" ... lists.
Best regards,
Wolfgang Denk