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

Add 1.75 MSRV, optimise and unit test EEPROM reader #134

Merged
merged 68 commits into from
Dec 31, 2023
Merged

Conversation

jamwaffles
Copy link
Collaborator

@jamwaffles jamwaffles commented Nov 20, 2023

Reorganises code to allow providing an EEPROM data provider that reads from a file instead of a physical device.

Useful for unit testing the EEPROM code, and decoding/debugging EEPROM images.

This branch currently requires nightly due to async fn in trait usage. This PR will probably stay as a draft until all the features it depends on are stabilised. This PR bumps EtherCrab's MSRV to 1.75 to be able to use some async-fn-in-trait stuff.

This PR also optimises the EEPROM reader so skips no longer have to read and discard all the data between the current pointer and the new offset.

TODO

  • Dump an EEPROM image from a real device...
  • ...and write a few unit tests against it to prove out the design
  • Refactor EEPROM reader to be more efficient, e.g. calculating skip addresses instead of reading and discarding until the right address is reached.
  • Upgrade everything when embedded-hal(-async) 1.0 is released I'm not even using e-h wth 🤦
  • Change channel in rust-toolchain.toml to stable
  • Testing
    • Embassy
    • Multiple groups
    • Thread pounder demo on NIC hardware machine

Closes #24

@jamwaffles jamwaffles marked this pull request as ready for review December 31, 2023 00:08
@jamwaffles jamwaffles changed the title EEPROM mock interface Add 1.75 MSRV, optimise and unit test EEPROM reader Dec 31, 2023
@jamwaffles jamwaffles merged commit d5a0b04 into master Dec 31, 2023
7 checks passed
@jamwaffles jamwaffles deleted the eeprom-mock-2 branch December 31, 2023 16:50
jamwaffles added a commit that referenced this pull request Jan 7, 2024
I believe this was accidentally broken after the merge of #134. The CI
should've caught the error before this moment in time. Maybe something
to do with adding the `--workspace` flag to cargo test? Unsure.
jamwaffles added a commit that referenced this pull request Jan 7, 2024
I believe this was accidentally broken after the merge of #134. The CI
should've caught the error before this moment in time. Maybe something
to do with adding the `--workspace` flag to cargo test? Unsure.
jamwaffles added a commit that referenced this pull request Jan 7, 2024
I believe this was accidentally broken after the merge of #134. The CI
should've caught the error before this moment in time. Maybe something
to do with adding the `--workspace` flag to cargo test? Unsure.
jamwaffles added a commit that referenced this pull request Jan 7, 2024
I believe this was accidentally broken after the merge of #134. The CI
should've caught the error before this moment in time. Maybe something
to do with adding the `--workspace` flag to cargo test? Unsure.
jamwaffles added a commit that referenced this pull request Jan 7, 2024
I believe this was accidentally broken after the merge of #134. The CI
should've caught the error before this moment in time. Maybe something
to do with adding the `--workspace` flag to cargo test? Unsure.
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.

Create EEPROM test harness
1 participant