Skip to content

Commit fcbda9e

Browse files
committed
tpiu: swo_supports: use &self instead of unsafe Self::ptr
1 parent 50c7fd3 commit fcbda9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/peripheral/tpiu.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ impl TPIU {
148148
/// Reads the supported trace output modes and the minimum size of
149149
/// the TPIU FIFO queue for trace data.
150150
#[inline]
151-
pub fn swo_supports() -> SWOSupports {
152-
let _type = unsafe { (*Self::ptr())._type.read() };
151+
pub fn swo_supports(&self) -> SWOSupports {
152+
let _type = self._type.read();
153153
SWOSupports {
154154
nrz_encoding: _type.nrzvalid(),
155155
manchester_encoding: _type.mancvalid(),

0 commit comments

Comments
 (0)