arch/arm/src/lpc54xx/lpc54_lcd.c: Appease nxstyle

This commit is contained in:
YAMAMOTO Takashi 2020-11-28 09:37:16 +09:00 committed by Xiang Xiao
parent b9b97348b2
commit a77b402f38

View File

@ -275,11 +275,11 @@ static int lpc54_getcmap(FAR struct fb_vtable_s *vtable,
{
/* Save the even palette value */
cmap->red[i+1] = (rgb & LCD_PAL_R1_MASK) >> LCD_PAL_R1_SHIFT;
cmap->green[i+1] = (rgb & LCD_PAL_G1_MASK) >> LCD_PAL_G1_SHIFT;
cmap->blue[i+1] = (rgb & LCD_PAL_B1_MASK) >> LCD_PAL_B1_SHIFT;
cmap->red[i + 1] = (rgb & LCD_PAL_R1_MASK) >> LCD_PAL_R1_SHIFT;
cmap->green[i + 1] = (rgb & LCD_PAL_G1_MASK) >> LCD_PAL_G1_SHIFT;
cmap->blue[i + 1] = (rgb & LCD_PAL_B1_MASK) >> LCD_PAL_B1_SHIFT;
#ifdef CONFIG_FB_TRANSPARENCY
cmap->transp[i+1] = 0;
cmap->transp[i + 1] = 0;
#endif
}
}
@ -316,7 +316,8 @@ static int lpc54_putcmap(FAR struct fb_vtable_s *vtable,
if ((i & 1) != 0)
{
rgb0 = *pal;
rgb0 &= (LCD_PAL_R0_MASK | LCD_PAL_G0_MASK | LCD_PAL_B0_MASK | LCD_PAL_I0);
rgb0 &= (LCD_PAL_R0_MASK | LCD_PAL_G0_MASK | LCD_PAL_B0_MASK |
LCD_PAL_I0);
rgb1 |= ((uint32_t)cmap->red[i] << LCD_PAL_R0_SHIFT |
(uint32_t)cmap->green[i] << LCD_PAL_G0_SHIFT |
(uint32_t)cmap->blue[i] << LCD_PAL_B0_SHIFT);
@ -340,13 +341,14 @@ static int lpc54_putcmap(FAR struct fb_vtable_s *vtable,
if ((i + 1) >= last)
{
rgb1 = *pal;
rgb1 &= (LCD_PAL_R1_MASK | LCD_PAL_G1_MASK | LCD_PAL_B1_MASK | LCD_PAL_I1);
rgb1 &= (LCD_PAL_R1_MASK | LCD_PAL_G1_MASK | LCD_PAL_B1_MASK |
LCD_PAL_I1);
}
else
{
rgb1 = ((uint32_t)cmap->red[i+1] << LCD_PAL_R1_SHIFT |
(uint32_t)cmap->green[i+1] << LCD_PAL_G1_SHIFT |
(uint32_t)cmap->blue[i+1] << LCD_PAL_B1_SHIFT);
rgb1 = ((uint32_t)cmap->red[i + 1] << LCD_PAL_R1_SHIFT |
(uint32_t)cmap->green[i + 1] << LCD_PAL_G1_SHIFT |
(uint32_t)cmap->blue[i + 1] << LCD_PAL_B1_SHIFT);
}
/* Save the new palette value */
@ -408,6 +410,7 @@ static int lpc54_setcursor(FAR struct fb_vtable_s *vtable,
g_cpos = settings->pos;
lcdinfo("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y);
}
#ifdef CONFIG_FB_HWCURSORSIZE
if ((flags & FB_CUR_SETSIZE) != 0)
{
@ -415,6 +418,7 @@ static int lpc54_setcursor(FAR struct fb_vtable_s *vtable,
lcdinfo("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w);
}
#endif
#ifdef CONFIG_FB_HWCURSORIMAGE
if ((flags & FB_CUR_SETIMAGE) != 0)
{
@ -423,6 +427,7 @@ static int lpc54_setcursor(FAR struct fb_vtable_s *vtable,
settings->img.image);
}
#endif
return OK;
}
@ -459,6 +464,7 @@ int up_fbinitialize(int display)
int i;
/* Configure pins */
/* LCD panel data. Pins used depend on the panel configuration:
*
* STN 4BPP: VD0-VD3 (single panel)
@ -650,7 +656,7 @@ int up_fbinitialize(int display)
putreg32(0, LPC54_LCD_TIMH);
regval = (((CONFIG_LPC54_LCD_HWIDTH/16) - 1) << LCD_TIMH_PPL_SHIFT |
regval = (((CONFIG_LPC54_LCD_HWIDTH / 16) - 1) << LCD_TIMH_PPL_SHIFT |
(CONFIG_LPC54_LCD_HPULSE - 1) << LCD_TIMH_HSW_SHIFT |
(CONFIG_LPC54_LCD_HFRONTPORCH - 1) << LCD_TIMH_HFP_SHIFT |
(CONFIG_LPC54_LCD_HBACKPORCH - 1) << LCD_TIMH_HBP_SHIFT);
@ -800,7 +806,8 @@ int up_fbinitialize(int display)
*
* Description:
* Return a a reference to the framebuffer object for the specified video
* plane of the specified plane. Many OSDs support multiple planes of video.
* plane of the specified plane. Many OSDs support multiple planes of
* video.
*
* Input Parameters:
* display - In the case of hardware with multiple displays, this
@ -897,14 +904,16 @@ void lpc54_lcdclear(nxgl_mxpixel_t color)
lcdinfo("Clearing display: color=%08x VRAM=%08x size=%d\n",
color, CONFIG_LPC54_LCD_VRAMBASE,
CONFIG_LPC54_LCD_HWIDTH * CONFIG_LPC54_LCD_VHEIGHT * sizeof(uint32_t));
CONFIG_LPC54_LCD_HWIDTH * CONFIG_LPC54_LCD_VHEIGHT *
sizeof(uint32_t));
#else
uint16_t *dest = (uint16_t *)CONFIG_LPC54_LCD_VRAMBASE;
lcdinfo("Clearing display: color=%08x VRAM=%08x size=%d\n",
color, CONFIG_LPC54_LCD_VRAMBASE,
CONFIG_LPC54_LCD_HWIDTH * CONFIG_LPC54_LCD_VHEIGHT * sizeof(uint16_t));
CONFIG_LPC54_LCD_HWIDTH * CONFIG_LPC54_LCD_VHEIGHT *
sizeof(uint16_t));
#endif
for (i = 0; i < (CONFIG_LPC54_LCD_HWIDTH * CONFIG_LPC54_LCD_VHEIGHT); i++)