Skip to content
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

drivers/lcd: slightly rework params to expose offset values to ili9341 driver #17925

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Apr 13, 2022

Contribution description

This is a follow-up of #16176 that reworks the ili9341 parameters to also expose X/Y offset values. The idea behind this PR is about the adafruit-clue display that was not oriented correctly.
Setting the orientation parameter to the right value (LCD_ROTATION_VERT) raised an offset issue with the ili9341.

It seems that the offset values can be handled in a similar way as for the st7735 driver. So this PR unifies all this.

What is not done by this PR is to add the possibility to play with the ST7735 orientation parameters (they are actually still hard coded) but I couldn't find a combination that works for all possible values.

Testing procedure

  • tests/driver_ili9341 display is correctly oriented on adafruit-clue (tested and it works)
  • Green Murdock

Issues/PRs references

Follow-up of #16176

@github-actions github-actions bot added Area: boards Area: Board ports Area: drivers Area: Device drivers Area: sys Area: System Area: tests Area: tests and testing framework labels Apr 13, 2022
@aabadie aabadie force-pushed the pr/drivers/lcd_params_rework branch 2 times, most recently from d8f14f3 to 25aa562 Compare April 13, 2022 10:53
@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 13, 2022
@aabadie aabadie force-pushed the pr/drivers/lcd_params_rework branch 2 times, most recently from c0d532d to cef72ba Compare April 13, 2022 10:54
@aabadie aabadie force-pushed the pr/drivers/lcd_params_rework branch from cef72ba to d060f47 Compare April 13, 2022 10:55
@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 13, 2022
@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 13, 2022
@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 14, 2022
@@ -107,7 +107,8 @@ extern "C" {
#define ILI9341_PARAM_NUM_LINES (240U) /**< Number of screen lines */
#define ILI9341_PARAM_RGB (1) /**< RGB configuration */
#define ILI9341_PARAM_INVERTED (1) /**< Inversion configuration */
#define ILI9341_PARAM_ROTATION (LCD_ROTATION_HORZ_FLIP) /**< Rotation mode */
#define ILI9341_PARAM_ROTATION (LCD_ROTATION_VERT) /**< Rotation mode */
#define ILI9341_PARAM_OFFSET_X (80) /**< Vertical rotation requires a 80 pixel offset */
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems a bit weird, are you able to correctly draw in the whole screen? the 80 offset makes me think it has something to do with the display being 240X320 and with the flip you want to treat it as 320x240, but its strange that this is not handled by the driver.

If you are able to correctly draw to the whole display I'm ok as it is, although it still seems a bit weird to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the adafruit clue, the display is 240x240 and yes it draws correctly with the 80 pixels offset. I also tested this on the pinetime (also 240x240) and to rotate by 180°, I also had to add an offset (on Y this time).

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK, trusting @aabadie testing

@aabadie aabadie merged commit 646fb11 into RIOT-OS:master Apr 19, 2022
@aabadie aabadie deleted the pr/drivers/lcd_params_rework branch April 19, 2022 14:21
@aabadie
Copy link
Contributor Author

aabadie commented Apr 19, 2022

Thanks!

@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: drivers Area: Device drivers Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants