From 222d9c98cd6e71ed6dceeaf3343592094ba0d6d5 Mon Sep 17 00:00:00 2001 From: Viktor Sonesten Date: Tue, 4 Jan 2022 11:22:45 +0100 Subject: [PATCH 1/3] tpiu: make SWOSupports fields public --- src/peripheral/tpiu.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/peripheral/tpiu.rs b/src/peripheral/tpiu.rs index 3ff5f550..c098d36c 100644 --- a/src/peripheral/tpiu.rs +++ b/src/peripheral/tpiu.rs @@ -91,13 +91,13 @@ impl core::convert::TryFrom for TraceProtocol { #[derive(Debug, Eq, PartialEq, Copy, Clone)] pub struct SWOSupports { /// Whether UART/NRZ encoding is supported for SWO. - nrz_encoding: bool, + pub nrz_encoding: bool, /// Whether Manchester encoding is supported for SWO. - manchester_encoding: bool, + pub manchester_encoding: bool, /// Whether parallel trace port operation is supported. - parallel_operation: bool, + pub parallel_operation: bool, /// The minimum implemented FIFO queue size of the TPIU for trace data. - min_queue_size: u8, + pub min_queue_size: u8, } impl TPIU { From 0f5ee69ee83d9b68c11323f367424e7841f392e5 Mon Sep 17 00:00:00 2001 From: Viktor Sonesten Date: Tue, 4 Jan 2022 11:31:24 +0100 Subject: [PATCH 2/3] CHANGELOG: document TPIU::swo_supports --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e61b6b..6ff0e1f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - DWT: add `configure` API for address, cycle count comparison (#342, #367). - ITM: add `configure` API (#342). - TPIU: add API for *Formatter and Flush Control* (FFCR) and *Selected Pin Control* (SPPR) registers (#342). +- TPIU: add `swo_supports` for checking what SWO configurations the target supports. (#381) - Add `std` and `serde` crate features for improved host-side ITM decode functionality when working with the downstream `itm`, `cargo-rtic-scope` crates (#363, #366). ## [v0.7.4] - 2021-12-31 From a66e4a6db41533ad12b8a6936d31b80a4d7f015d Mon Sep 17 00:00:00 2001 From: Viktor Sonesten Date: Tue, 4 Jan 2022 11:32:31 +0100 Subject: [PATCH 3/3] TPIU: improve SWOSupports documentation --- src/peripheral/tpiu.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/peripheral/tpiu.rs b/src/peripheral/tpiu.rs index c098d36c..5d2c2bb6 100644 --- a/src/peripheral/tpiu.rs +++ b/src/peripheral/tpiu.rs @@ -87,7 +87,8 @@ impl core::convert::TryFrom for TraceProtocol { } } -/// The SWO options supported by the TPIU. +/// The SWO options supported by the TPIU, and the mimimum size of the +/// FIFO output queue for trace data. #[derive(Debug, Eq, PartialEq, Copy, Clone)] pub struct SWOSupports { /// Whether UART/NRZ encoding is supported for SWO.