Skip to content

Commit 454e804

Browse files
authored
Merge pull request #58 from umi-eng/timestamp-accessibility
Allow timestamp to be accessed from all modes
2 parents 38372c8 + 72e73bb commit 454e804

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
* Update MSRV to 1.60
6+
* Allow timestamp to be accessed in all modes
67

78
## [v0.2.1] 2024-09-04
89

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,12 @@ where
542542
) -> Self {
543543
Self::create_can(t.0.config, t.0.instance)
544544
}
545+
546+
/// Returns the current FdCan timestamp counter
547+
#[inline]
548+
pub fn timestamp(&self) -> u16 {
549+
self.control.timestamp()
550+
}
545551
}
546552

547553
impl<I> FdCan<I, PoweredDownMode>
@@ -882,12 +888,6 @@ where
882888
.bit(filter.reject_remote_extended_frames)
883889
});
884890
}
885-
886-
/// Returns the current FdCan timestamp counter
887-
#[inline]
888-
pub fn timestamp(&self) -> u16 {
889-
self.control.timestamp()
890-
}
891891
}
892892

893893
impl<I> FdCan<I, InternalLoopbackMode>

0 commit comments

Comments
 (0)