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

core(system): split system accesser features #1121

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

gen2thomas
Copy link
Collaborator

@gen2thomas gen2thomas commented Jan 10, 2025

Solved issues and/or description of the change

Applying some system options was complicated. This means the right position in code to apply the option was not clearly visible and how to bubble/chain options from user to the system was complicated. Additionally each adaptor was build with all system access features, although they are not supported by the adaptor.

Additionally:

  • change functional options of system layer from function style (system.Optioner) to applier style (system.AccesserOptionApplier)
  • simplify option handling of digital pin adaptor, added in one of the former PR's
  • introduce options for SPI adaptor
  • move implementation for "WithSpiGpioAccess" from digital pin adaptor to SPI adaptor
  • prepare platforms without native SPI support (chip, dragonboard, etc.) to be able to use "WithSpiGpioAccess"
  • increase test coverage and fix findings (e.g. calculation of tclk in spi_gpio.go)
  • add debug flag in config for SPI and digital pin adaptor, provide this flags to system layer
  • fix some findings regarding wrong file names (try to apply common go style)

Manual test

  • OS and Version (Win/Mac/Linux): Linux
  • Adaptor(s) and/or driver(s):
    • nanopi NEO (digital pin)
    • Tinkerboard 2 (i2c)

Checklist

  • The PR's target branch is 'hybridgroup:dev'
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (e.g. by run make test_race)
  • No linter errors exist locally (e.g. by run make fmt_check)
  • I have performed a self-review of my own code

@gen2thomas gen2thomas force-pushed the feature/build_sysaccesser branch 2 times, most recently from 18db52e to 20e5099 Compare January 11, 2025 09:50
@gen2thomas gen2thomas changed the title core(system): build system access with options core(system): splitted system accesser features with options Jan 11, 2025
@gen2thomas gen2thomas changed the title core(system): splitted system accesser features with options core(system): split system accesser features with options Jan 11, 2025
@gen2thomas gen2thomas force-pushed the feature/build_sysaccesser branch 8 times, most recently from d0d6387 to 4f1d559 Compare January 11, 2025 15:19
@gen2thomas gen2thomas force-pushed the feature/build_sysaccesser branch from 4f1d559 to 121f4fc Compare January 11, 2025 17:47
@gen2thomas gen2thomas marked this pull request as ready for review January 11, 2025 18:02
@gen2thomas gen2thomas changed the title core(system): split system accesser features with options core(system): split system accesser features Jan 11, 2025
@gen2thomas gen2thomas merged commit 4e9c832 into hybridgroup:dev Jan 11, 2025
6 checks passed
@gen2thomas gen2thomas deleted the feature/build_sysaccesser branch January 11, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant