video_sync(dev->parent, false);
}
+#if CONFIG_IS_ENABLED(VIDEO_BPP16) || CONFIG_IS_ENABLED(VIDEO_BPP32)
static const struct vid_rgb colors[VID_COLOR_COUNT] = {
{ 0x00, 0x00, 0x00 }, /* black */
{ 0xc0, 0x00, 0x00 }, /* red */
{ 0x00, 0xff, 0xff }, /* bright cyan */
{ 0xff, 0xff, 0xff }, /* white */
};
+#endif
u32 vid_console_color(struct video_priv *priv, unsigned int idx)
{
switch (priv->bpix) {
+#if CONFIG_IS_ENABLED(VIDEO_BPP16)
case VIDEO_BPP16:
return ((colors[idx].r >> 3) << 11) |
((colors[idx].g >> 2) << 5) |
((colors[idx].b >> 3) << 0);
+#endif
+#if CONFIG_IS_ENABLED(VIDEO_BPP32)
case VIDEO_BPP32:
return (colors[idx].r << 16) |
(colors[idx].g << 8) |
(colors[idx].b << 0);
+#endif
default:
/*
* For unknown bit arrangements just support
struct video_priv *priv = dev_get_uclass_priv(dev);
switch (priv->bpix) {
+#ifdef CONFIG_VIDEO_BPP16
case VIDEO_BPP16: {
u16 *ppix = priv->fb;
u16 *end = priv->fb + priv->fb_size;
*ppix++ = priv->colour_bg;
break;
}
+#endif
+#ifdef CONFIG_VIDEO_BPP32
case VIDEO_BPP32: {
u32 *ppix = priv->fb;
u32 *end = priv->fb + priv->fb_size;
*ppix++ = priv->colour_bg;
break;
}
+#endif
default:
memset(priv->fb, priv->colour_bg, priv->fb_size);
break;