Skip to content

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

Open
reitermarkus wants to merge 12 commits intoeldruin:masterfrom
reitermarkus:split-api
Open

Split API into one distinct type per device variant.#17
reitermarkus wants to merge 12 commits intoeldruin:masterfrom
reitermarkus:split-api

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.

@reitermarkus reitermarkus force-pushed the split-api branch 2 times, most recently from c6f5bc1 to 1d5c6b5 Compare November 22, 2024 09:15
# 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