Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions os/board/rtl8730e/src/rtl8730e_mipi_lcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ static void rtl8730e_control_backlight(uint8_t level)
/* TO-DO: Move LCD IC Power ON flow */
InterruptEn(lcdc_irq_info.num, lcdc_irq_info.priority);
}
#if defined(CONFIG_LCD_ST7701SN)
#if defined(CONFIG_LCD_ST7701SN) || defined(CONFIG_LCD_ST7785_TYPEA)
Copy link
Contributor

@Taejun-Kwon Taejun-Kwon Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should refer to my comment in your another PR, #6910 (comment)
so below style can be applied. we hide h/w from this code.

static void rtl8730e_control_backlight(float level)
{
	...
	pwmout_write(&g_rtl8730e_config_dev_s.pwm_led, level);
	...
}

static int lcd_setpower(FAR struct lcd_dev_s *dev, int power)
{
	FAR struct mipi_lcd_dev_s *priv = (FAR struct mipi_lcd_dev_s *)dev;
	struct mipi_dsi_device *dsi = dev->dsi_dev;
	...
	dsi->lcd_setpower(priv->config, power);
	...
}

static void st7785_lcd_setpower(struct mipi_lcd_config_s *config, int power)
{
	float level = level/100.0
	config->backlight(level);
}

static void st7701SN_lcd_setpower(struct mipi_lcd_config_s *config, int power)
	float level = 1.0 - (level/100.0);
	config->backlight(level);
}

pwmout_write(&g_rtl8730e_config_dev_s.pwm_led, 1.0-pwm_level);
#elif defined(CONFIG_LCD_ST7785)
#elif defined(CONFIG_LCD_ST7785_TYPEB)
pwmout_write(&g_rtl8730e_config_dev_s.pwm_led, pwm_level);
#endif
g_rtl8730e_config_dev_s.pwm_level = level;
Expand Down