samples: display: Added support for sitronix_st7735r
Requires a ST7735R based LCD Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk> Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
This commit is contained in:
parent
cc6f99dcb4
commit
48f5e746c8
1 changed files with 6 additions and 2 deletions
|
@ -30,6 +30,10 @@ LOG_MODULE_REGISTER(sample, LOG_LEVEL_INF);
|
||||||
#define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, sitronix_st7789v))
|
#define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, sitronix_st7789v))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_INST(0, sitronix_st7735r), okay)
|
||||||
|
#define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, sitronix_st7735r))
|
||||||
|
#endif
|
||||||
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_INST(0, fsl_imx6sx_lcdif), okay)
|
#if DT_NODE_HAS_STATUS(DT_INST(0, fsl_imx6sx_lcdif), okay)
|
||||||
#define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, fsl_imx6sx_lcdif))
|
#define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, fsl_imx6sx_lcdif))
|
||||||
#endif
|
#endif
|
||||||
|
@ -77,7 +81,7 @@ static void posix_exit_main(int exit_code)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void fill_buffer_argb8888(enum corner corner, uint8_t grey, uint8_t *buf,
|
static void fill_buffer_argb8888(enum corner corner, uint8_t grey, uint8_t *buf,
|
||||||
size_t buf_size)
|
size_t buf_size)
|
||||||
{
|
{
|
||||||
uint32_t color = 0;
|
uint32_t color = 0;
|
||||||
|
|
||||||
|
@ -219,7 +223,7 @@ void main(void)
|
||||||
|
|
||||||
display_get_capabilities(display_dev, &capabilities);
|
display_get_capabilities(display_dev, &capabilities);
|
||||||
|
|
||||||
if (capabilities.screen_info & SCREEN_INFO_MONO_VTILED) {
|
if (capabilities.screen_info & SCREEN_INFO_MONO_VTILED) {
|
||||||
rect_w = 16;
|
rect_w = 16;
|
||||||
rect_h = 8;
|
rect_h = 8;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue