Skip to content

Generate timestamps if available#10

Merged
bugadani merged 1 commit intoprobe-rs:masterfrom
bugadani:timestamp
Jan 12, 2026
Merged

Generate timestamps if available#10
bugadani merged 1 commit intoprobe-rs:masterfrom
bugadani:timestamp

Conversation

@bugadani
Copy link
Contributor

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.

@bugadani bugadani marked this pull request as ready for review January 12, 2026 16:58
Copilot AI review requested due to automatic review settings January 12, 2026 16:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the Dependencies trait to query timer support
  • Added timestamp() methods to both Swd and Jtag traits 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.

@bugadani bugadani merged commit 7c56604 into probe-rs:master Jan 12, 2026
6 checks passed
@bugadani bugadani deleted the timestamp branch January 12, 2026 17:08
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