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

Split API into one distinct type per device variant. #17

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

reitermarkus
Copy link
Contributor

Needs to be rebased after #16 is merged.

@reitermarkus reitermarkus marked this pull request as draft January 19, 2024 12:36
@reitermarkus reitermarkus force-pushed the split-api branch 5 times, most recently from df5f9a1 to f52e787 Compare January 19, 2024 17:05
@coveralls
Copy link

Coverage Status

coverage: 94.118% (+12.4%) from 81.739%
when pulling 1a8bd6e on reitermarkus:split-api
into 00830f4 on eldruin:master.

@reitermarkus reitermarkus marked this pull request as ready for review June 24, 2024 21:36
@coveralls
Copy link

Coverage Status

coverage: 95.699% (+14.0%) from 81.739%
when pulling f390eac on reitermarkus:split-api
into 00830f4 on eldruin:master.

@coveralls
Copy link

Coverage Status

coverage: 95.699% (+14.0%) from 81.739%
when pulling e091545 on reitermarkus:split-api
into 00830f4 on eldruin:master.

@coveralls
Copy link

Coverage Status

coverage: 96.196% (+14.5%) from 81.739%
when pulling f49cd40 on reitermarkus:split-api
into 00830f4 on eldruin:master.

@eldruin
Copy link
Owner

eldruin commented Jul 31, 2024

Sorry, I'm coming back to this after a long time. What is the actual benefit of this API change?

@reitermarkus
Copy link
Contributor Author

reitermarkus commented Sep 9, 2024

I think the main benefits are:

  • Unified constructor/destructor API, i.e. new/release instead of new_ads1x1x/destroy_ads1x1x, which allows using type aliases to easily switch between variants.
  • Impossible Error::InvalidInputData for 16-bit variants is removed.

@eldruin
Copy link
Owner

eldruin commented Sep 19, 2024

Thanks! As it stands this PR contains many other changes, though. Are you still willing to push this forward?
For a start, would you create a new PR with just the doc changes here?

@reitermarkus
Copy link
Contributor Author

@eldruin, opened a new PR with only the doc changes.

# Conflicts:
#	README.md
#	examples/all_channels.rs
#	examples/linux.rs
#	examples/typed.rs
#	src/construction.rs
#	src/devices/features/tier2.rs
#	src/lib.rs
#	tests/common/mod.rs

# Conflicts:
#	src/channel.rs
#	src/devices/common.rs
#	src/devices/features/tier1.rs
#	src/devices/features/tier2.rs
#	src/devices/mode/continuous.rs
#	src/devices/mode/oneshot.rs
#	src/lib.rs
#	src/types.rs
# Conflicts:
#	src/lib.rs
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.

3 participants