drivers: ssd16xx: Clean up ssd16xx_clear_cntlr_mem
Remove the optional call to ssd16xx_update_display() in ssd16xx_clear_cntlr_mem(). This doesn't really belong in that function and just adds a non-obvious boolean argument to the function. Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
This commit is contained in:
parent
5ca33e20a8
commit
400ced3501
|
@ -605,8 +605,7 @@ static int ssd16xx_set_pixel_format(const struct device *dev,
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ssd16xx_clear_cntlr_mem(const struct device *dev, uint8_t ram_cmd,
|
static int ssd16xx_clear_cntlr_mem(const struct device *dev, uint8_t ram_cmd)
|
||||||
bool update)
|
|
||||||
{
|
{
|
||||||
const struct ssd16xx_config *config = dev->config;
|
const struct ssd16xx_config *config = dev->config;
|
||||||
uint16_t panel_h = config->height / EPD_PANEL_NUMOF_ROWS_PER_PAGE;
|
uint16_t panel_h = config->height / EPD_PANEL_NUMOF_ROWS_PER_PAGE;
|
||||||
|
@ -655,10 +654,6 @@ static int ssd16xx_clear_cntlr_mem(const struct device *dev, uint8_t ram_cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update) {
|
|
||||||
return ssd16xx_update_display(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -873,13 +868,17 @@ static int ssd16xx_controller_init(const struct device *dev)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ssd16xx_clear_cntlr_mem(dev, SSD16XX_CMD_WRITE_RAM, true);
|
err = ssd16xx_clear_cntlr_mem(dev, SSD16XX_CMD_WRITE_RAM);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ssd16xx_clear_cntlr_mem(dev, SSD16XX_CMD_WRITE_RED_RAM,
|
err = ssd16xx_clear_cntlr_mem(dev, SSD16XX_CMD_WRITE_RED_RAM);
|
||||||
false);
|
if (err < 0) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = ssd16xx_update_display(dev);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue