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/ft5x06: use a pointer to config parameters instead of copying them #19866

Merged
merged 1 commit into from Aug 24, 2023

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Aug 9, 2023

Contribution description

There is no need to copy the configuration parameter set to the device descriptor. A const pointer to the configuration parameter set in ROM is sufficient. It saves 16 byte of RAM.

Includes PR #19860 for the moment to be compilable.

Testing procedure

Use

CFLAGS='-DNDEBUG' BOARD=stm32f723e-disco make -j8 -C tests/drivers/touch_dev/

with and w/o this PR and compare the sizes.

Without the PR the sizes are:

  text	   data	    bss	    dec
  14652	    136	   2704	  17492

With the PR the sizes are:

  text	   data	    bss	    dec
  14676	    136	   2688	  17500

Issues/PRs references

Depends on PR #19860

@github-actions github-actions bot added the Area: drivers Area: Device drivers label Aug 9, 2023
@gschorcht gschorcht added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation State: waiting for other PR State: The PR requires another PR to be merged first CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 9, 2023
@riot-ci
Copy link

riot-ci commented Aug 9, 2023

Murdock results

✔️ PASSED

d88e46b drivers/ft5x06: use a const pointer to params instead of a copy

Success Failures Total Runtime
7939 0 7939 13m:34s

Artifacts

@benpicco benpicco removed the State: waiting for other PR State: The PR requires another PR to be merged first label Aug 23, 2023
@benpicco
Copy link
Contributor

This needs a rebase

There is no need to copy the configuration parameter set to the device descriptor. A const pointer to the configuration parameter set in ROM is sufficient. It saves some 16 byte of RAM.
@gschorcht gschorcht force-pushed the drivers/ft5x06_const_param_pointer branch from f472f19 to d88e46b Compare August 23, 2023 21:37
@benpicco
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 24, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit ce0ae8f into RIOT-OS:master Aug 24, 2023
26 checks passed
@gschorcht
Copy link
Contributor Author

Thanks for reviewing and merging 😄

@gschorcht gschorcht deleted the drivers/ft5x06_const_param_pointer branch August 25, 2023 15:31
bors bot added a commit that referenced this pull request Aug 27, 2023
19867: drivers/ft5x06: introduce conversion for X and Y coordinates r=aabadie a=gschorcht

### Contribution description

This PR provides the parameter option to define how the X and Y coordinates have to be converted.

To get coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch pannel by swapping and mirroring them. For the sake of simplicity, possible rotations are additionally defined.

The PR includes PRs #19860 and #19866 to be compilable.

### Testing procedure

`tests/pkg/lvgl_touch` should still work for the `stm32f746g-disco` board.
```
BOARD=stm32f746g-disco make -C tests/pkg/lvgl_touch
```

### Issues/PRs references

~Depends on PR #19860~
Depends on PR #19866 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants