Skip to content

Remove more probe-specific functions from Core#692

Open
mkeeter wants to merge 5 commits into
mkeeter/only-load-with-a-probefrom
mkeeter/more-core-cleanup
Open

Remove more probe-specific functions from Core#692
mkeeter wants to merge 5 commits into
mkeeter/only-load-with-a-probefrom
mkeeter/more-core-cleanup

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented Jun 3, 2026

This PR removes reset, reset_and_halt, and wait_for_halt from the Core trait. These functions are only implemented on ProbeCore (and UnattachedCore::reset), so removing them from the trait lets us be more precise with our APIs.

(wait_for_halt is not used anywhere, so it's been fully deleted).

The only tricky part is AuxFlashHandler, which only sometimes needs a full ProbeCore – basically only when writing. I added a new struct AuxFlashWriter, then an AuxFlashWorker trait to unify common functions (e.g. getting slot count, and active slot). This is a bit annoying, but minimizes boilerplate; I couldn't find a way to write a type which accepts either a &mut dyn Core or a concrete C: Core without replumbing everything.

This comment was marked as resolved.

@mkeeter mkeeter force-pushed the mkeeter/more-core-cleanup branch from 78185e4 to d8ec344 Compare June 3, 2026 20:29
@mkeeter mkeeter force-pushed the mkeeter/only-load-with-a-probe branch from b2d785b to dd14be6 Compare June 3, 2026 20:31
@mkeeter mkeeter force-pushed the mkeeter/more-core-cleanup branch from d8ec344 to f8afcff Compare June 3, 2026 20:31
@mkeeter mkeeter force-pushed the mkeeter/only-load-with-a-probe branch from dd14be6 to e4e0918 Compare June 3, 2026 20:35
@mkeeter mkeeter force-pushed the mkeeter/more-core-cleanup branch from f8afcff to 403b7a0 Compare June 3, 2026 20:35
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