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
13 changes: 12 additions & 1 deletion drivers/display/display_st7789v_tl019fqv01.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ void st7789v_lcd_init(struct st7789v_data *p_st7789v)
* display is 320x170, and so the effective LCD is offset
* by 35 "rows".
*/
st7789v_set_lcd_margins(p_st7789v, 0, 35);
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not make sense, this file is for TL019FQV01 display, everything here is hardcoded, it is not generic. Working on support for Waveshare display, I will remove it and replace with byte arrays in DT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree that it's corner implementation. Are you willing to remove whole file (display_st7789v_tl019fqv01.c)?

Copy link
Contributor

Choose a reason for hiding this comment

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

It will be moved to display_st7789v.c and should obtain the values from DT. I think we should not have a display_st7789v_xVARIANTx.c per display.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great. Sincerely, i do not like these display_name_variant.c implementations. Thank you for taking care of this. Closing PR

u16_t x_off = 0;
u16_t y_off = 0;

#ifdef DT_INST_0_SITRONIX_ST7789V_X_OFFSET
x_off = DT_INST_0_SITRONIX_ST7789V_X_OFFSET;
#endif

#ifdef DT_INST_0_SITRONIX_ST7789V_X_OFFSET
y_off = DT_INST_0_SITRONIX_ST7789V_Y_OFFSET;
#endif

st7789v_set_lcd_margins(p_st7789v, x_off, y_off);

u8_t cmd;
u8_t data[14];
Expand Down