aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Viktor Sonesten <v@tmplt.dev> 2021-04-30 00:35:15 +0200
committerGravatar Viktor Sonesten <v@tmplt.dev> 2021-04-30 00:35:15 +0200
commit8c53e6069b319d8d7e2c9b4a5bb58eba6dd31226 (patch)
tree48e5e576a984520ee71fc1f90dbff12075d75b06 /src
parentf75f17f764bded9a75475683ac12a55ed1925d67 (diff)
downloadcortex-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.rs6
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
}
}