-
Notifications
You must be signed in to change notification settings - Fork 205
feat(lcd): ST7796 Add Sleep command support (BSP-780) #719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -143,6 +143,7 @@ esp_err_t esp_lcd_new_panel_st7796_mipi(const esp_lcd_panel_io_handle_t io, | |||||
| panel_handle->mirror = panel_st7796_mirror; | ||||||
| panel_handle->invert_color = panel_st7796_invert_color; | ||||||
| panel_handle->disp_on_off = panel_st7796_disp_on_off; | ||||||
| panel_handle->disp_sleep = panel_st7796_disp_sleep; | ||||||
| panel_handle->user_data = st7796; | ||||||
| *ret_panel = panel_handle; | ||||||
| ESP_LOGD(TAG, "new st7796 panel @%p", st7796); | ||||||
|
|
@@ -323,4 +324,23 @@ static esp_err_t panel_st7796_disp_on_off(esp_lcd_panel_t *panel, bool on_off) | |||||
| ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); | ||||||
| return ESP_OK; | ||||||
| } | ||||||
|
|
||||||
| static esp_err_t panel_st7796_disp_sleep(esp_lcd_panel_t *panel, bool sleep) | ||||||
| { | ||||||
| st7796_panel_t *st7796 = __containerof(panel, st7796_panel_t, base); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong struct access pattern causes undefined behaviorHigh Severity The
|
||||||
| st7796_panel_t *st7796 = __containerof(panel, st7796_panel_t, base); | |
| st7796_panel_t *st7796 = (st7796_panel_t *)panel->user_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndreaGreco Please, could you apply this suggestion?


Uh oh!
There was an error while loading. Please reload this page.