diff options
author | 2021-04-30 00:35:15 +0200 | |
---|---|---|
committer | 2021-04-30 00:35:15 +0200 | |
commit | 8c53e6069b319d8d7e2c9b4a5bb58eba6dd31226 (patch) | |
tree | 48e5e576a984520ee71fc1f90dbff12075d75b06 /src | |
parent | f75f17f764bded9a75475683ac12a55ed1925d67 (diff) | |
download | cortex-m-8c53e6069b319d8d7e2c9b4a5bb58eba6dd31226.tar.gz cortex-m-8c53e6069b319d8d7e2c9b4a5bb58eba6dd31226.tar.zst cortex-m-8c53e6069b319d8d7e2c9b4a5bb58eba6dd31226.zip |
tpiu: fix always-zero field-comparison
Diffstat (limited to 'src')
-rw-r--r-- | src/peripheral/tpiu.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/peripheral/tpiu.rs b/src/peripheral/tpiu.rs index ab8f710..694204d 100644 --- a/src/peripheral/tpiu.rs +++ b/src/peripheral/tpiu.rs @@ -92,9 +92,9 @@ impl TPIU { pub fn get_swo_supports() -> SWOSupports { let _type = unsafe { (*Self::ptr())._type.read() }; SWOSupports { - nrz_encoding: (_type & (1 << 11)) == 1, // NRZVALID - manchester_encoding: (_type & (1 << 10)) == 1, // MANCVALID - parallel_operation: (_type & (1 << 9)) == 1, // PTINVALID + nrz_encoding: (_type & (1 << 11)) != 0, // NRZVALID + manchester_encoding: (_type & (1 << 10)) != 0, // MANCVALID + parallel_operation: (_type & (1 << 9)) != 0, // PTINVALID min_queue_size: (_type & (0b111 << 6)) as u8, // FIFOSZ } } |