Skip to content

Commit

Permalink
Remvo "dumprun" functions from various LCD drivers
Browse files Browse the repository at this point in the history
* It seems that they assume up_putc() and syslog() outputs to the
  same device. Depending on the system and configurations, it's wrong.

* They are wrapped with "#if 0" and unused.

Fixes apache#14694
  • Loading branch information
yamt committed Nov 12, 2024
1 parent d73815e commit 9e2a7cd
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 347 deletions.
33 changes: 0 additions & 33 deletions boards/arm/sam34/sam4e-ek/src/sam_ili9325.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,39 +537,6 @@ static void sam_set_cursor(uint16_t col, uint16_t row)
sam_write_reg(ILI9325_VERTICAL_GRAM_ADDR_SET, col);
}

/****************************************************************************
* Name: sam_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void sam_dumprun(const char *msg, uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: sam_disable_backlight
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/sam34/sam4e-ek/src/sam_ili9341.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,39 +571,6 @@ static inline sam_color_t sam_gram_read(void)
(sam_color_t)buffer[2]);
}

/****************************************************************************
* Name: sam_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void sam_dumprun(const char *msg, uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: sam_disable_backlight
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/samv7/samv71-xult/src/sam_ili9488.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,39 +691,6 @@ static int sam_setwindow(struct sam_dev_s *priv, sam_color_t row,
return sam_sendcmd(priv, ILI9488_CMD_NOP);
}

/****************************************************************************
* Name: sam_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void sam_dumprun(const char *msg, uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: sam_disable_backlight
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/stm32/shenzhou/src/stm32_ili93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,39 +808,6 @@ static void stm32_setcursor(struct stm32_dev_s *priv,
}
}

/****************************************************************************
* Name: stm32_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void stm32_dumprun(const char *msg,
uint16_t *run, size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: stm32_putrun
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,39 +669,6 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row)
stm3210e_writereg(LCD_REG_33, col); /* GRAM vertical address */
}

/****************************************************************************
* Name: stm3210e_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void stm3210e_dumprun(const char *msg, uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: stm3210e_putrun
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,39 +508,6 @@ static void stm3220g_setcursor(uint16_t col, uint16_t row)
stm3220g_writereg(LCD_REG_33, col); /* GRAM vertical address */
}

/****************************************************************************
* Name: stm3220g_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void stm3220g_dumprun(const char *msg,
uint16_t *run, size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: stm3220g_putrun
*
Expand Down
33 changes: 0 additions & 33 deletions boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,39 +507,6 @@ static void stm3240g_setcursor(uint16_t col, uint16_t row)
stm3240g_writereg(LCD_REG_33, col); /* GRAM vertical address */
}

/****************************************************************************
* Name: stm3240g_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void stm3240g_dumprun(const char *msg,
uint16_t *run, size_t npixels)
{
int i;
int j;

syslog(LOG_DEBUG, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_DEBUG, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_DEBUG, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: stm3240g_putrun
*
Expand Down
34 changes: 0 additions & 34 deletions drivers/lcd/mio283qt2.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,40 +475,6 @@ static void mio283qt2_setarea(FAR struct mio283qt2_lcd_s *lcd,
mio283qt2_putreg(lcd, 0x08, (y1 >> 8)); /* set y1 */
}

/****************************************************************************
* Name: mio283qt2_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void mio283qt2_dumprun(FAR const char *msg,
FAR uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_INFO, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_INFO, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_INFO, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: mio283qt2_putrun
*
Expand Down
34 changes: 0 additions & 34 deletions drivers/lcd/mio283qt9a.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,40 +378,6 @@ static void mio283qt9a_setarea(FAR struct mio283qt9a_lcd_s *lcd,
lcd->write(lcd, (y1 & 0xff)); /* Set y1 */
}

/****************************************************************************
* Name: mio283qt9a_dumprun
*
* Description:
* Dump the contexts of the run buffer:
*
* run - The buffer in containing the run read to be dumped
* npixels - The number of pixels to dump
*
****************************************************************************/

#if 0 /* Sometimes useful */
static void mio283qt9a_dumprun(FAR const char *msg,
FAR uint16_t *run,
size_t npixels)
{
int i;
int j;

syslog(LOG_INFO, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16)
{
up_putc(' ');
syslog(LOG_INFO, " ");
for (j = 0; j < 16; j++)
{
syslog(LOG_INFO, " %04x", *run++);
}

up_putc('\n');
}
}
#endif

/****************************************************************************
* Name: mio283qt9a_putrun
*
Expand Down
8 changes: 0 additions & 8 deletions drivers/lcd/ra8875.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,6 @@ static void ra8875_clearmem(FAR struct ra8875_lcd_s *lcd);

/* LCD Data Transfer Methods */

#if 0 /* Sometimes useful */
static void ra8875_dumprun(FAR const char *msg,
FAR uint16_t *run,
size_t npixels);
#else
# define ra8875_dumprun(m,r,n)
#endif

#ifdef CONFIG_DEBUG_LCD
static void ra8875_showrun(FAR struct ra8875_dev_s *priv, fb_coord_t row,
fb_coord_t col, size_t npixels, bool put);
Expand Down
Loading

0 comments on commit 9e2a7cd

Please sign in to comment.