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

Factorize memory interfaces implementations #2705

Merged

Conversation

ithinuel
Copy link
Contributor

@ithinuel ithinuel commented Jul 25, 2024

Probe-rs implements in several locations quasi identical version of probe_rs::memory::MemoryInterface.
This factorizes (some of) these ocurrences and reduces code duplication.

While doing this, it was noted that the default implementation of MemoryInterface::write didn’t pass all architecture::arm::memory::adi_v5_memory_interface::test::*. This fixes the issue by moving the implementation from AdiMemoryInterface::write back to MemoryInterface.

Follows:

@ithinuel ithinuel force-pushed the factorize-memory-interfaces-impls branch from 0586b04 to f1f7b98 Compare July 25, 2024 21:10
probe-rs/src/memory/mod.rs Outdated Show resolved Hide resolved
probe-rs/src/memory/mod.rs Outdated Show resolved Hide resolved
This also "backports" `fn write()` from ArmMemoryInterface (formerly
ArmProbe) to MemoryInterface as relying on the default implementation
showed some test failures.

Co-Authored-By: Dániel Buga <bugadani@gmail.com>
@ithinuel ithinuel force-pushed the factorize-memory-interfaces-impls branch from f1f7b98 to eb208ca Compare July 25, 2024 21:29
@bugadani bugadani enabled auto-merge July 25, 2024 21:32
@bugadani bugadani added this pull request to the merge queue Jul 25, 2024
Merged via the queue into probe-rs:master with commit c5ecd40 Jul 25, 2024
19 of 20 checks passed
@ithinuel ithinuel deleted the factorize-memory-interfaces-impls branch July 25, 2024 21:41
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.

2 participants