drivers: Allow to set supported pix format in ssd drivers
Allow to set supported pixel format in ssd1306 & ssd1673 drivers Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
This commit is contained in:
parent
7bd108b0e9
commit
9607dd9a16
2 changed files with 7 additions and 0 deletions
|
@ -340,6 +340,9 @@ static void ssd1306_get_capabilities(const struct device *dev,
|
||||||
static int ssd1306_set_pixel_format(const struct device *dev,
|
static int ssd1306_set_pixel_format(const struct device *dev,
|
||||||
const enum display_pixel_format pf)
|
const enum display_pixel_format pf)
|
||||||
{
|
{
|
||||||
|
if (pf == PIXEL_FORMAT_MONO10) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
LOG_ERR("Unsupported");
|
LOG_ERR("Unsupported");
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,6 +386,10 @@ static void ssd1673_get_capabilities(const struct device *dev,
|
||||||
static int ssd1673_set_pixel_format(const struct device *dev,
|
static int ssd1673_set_pixel_format(const struct device *dev,
|
||||||
const enum display_pixel_format pf)
|
const enum display_pixel_format pf)
|
||||||
{
|
{
|
||||||
|
if (pf == PIXEL_FORMAT_MONO10) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_ERR("not supported");
|
LOG_ERR("not supported");
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue