Generate timestamps if available#10
Merged
bugadani merged 1 commit intoprobe-rs:masterfrom Jan 12, 2026
Merged
Conversation
Dirbaio
approved these changes
Jan 12, 2026
There was a problem hiding this comment.
Pull request overview
This PR implements optional timestamp support for CMSIS-DAP by adding infrastructure to query timer availability and retrieve timestamps. The implementation adds new trait methods with default implementations to maintain backward compatibility.
Changes:
- Added
timer_available()to theDependenciestrait to query timer support - Added
timestamp()methods to bothSwdandJtagtraits to retrieve current timestamps - Integrated timestamp functionality into DAP transfer operations, replacing TODO placeholders
- Updated capability flags to advertise timer support when available
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/swj.rs | Added timer_available() method to Dependencies trait with default false return |
| src/swd.rs | Added timestamp() method to Swd trait with default zero return |
| src/jtag.rs | Added timestamp() method to Jtag trait with default zero return |
| src/mock_device.rs | Added timer_available forwarding to mock device implementation |
| src/dap.rs | Integrated timestamp calls into SWD and JTAG transfer operations, enabled TEST_DOMAIN_TIMER capability flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements optional timestamp support by adding a function to Dependencies (to query whether a timer is available) and one function to Swd and Jtag each to get the current timestamp.