aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Viktor Sonesten <v@tmplt.dev> 2021-11-21 01:26:07 +0100
committerGravatar Viktor Sonesten <v@tmplt.dev> 2021-11-21 01:35:23 +0100
commit09929b156b3919aefd640086de68517b00c43722 (patch)
treea52459c39f6988d2e34f1809ba0afa502d8451e2 /src
parent633a631af6906421c087f1961c3880a93f69fd91 (diff)
downloadcortex-m-09929b156b3919aefd640086de68517b00c43722.tar.gz
cortex-m-09929b156b3919aefd640086de68517b00c43722.tar.zst
cortex-m-09929b156b3919aefd640086de68517b00c43722.zip
dwt: mark ComparatorFunction, DwtError as non-exhaustive
A DWT unit can do much more than just comparing addresses. PC comparison, for example, which is only possible with the first DWT unit.
Diffstat (limited to 'src')
-rw-r--r--src/peripheral/dwt.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peripheral/dwt.rs b/src/peripheral/dwt.rs
index bf770d2..0769e96 100644
--- a/src/peripheral/dwt.rs
+++ b/src/peripheral/dwt.rs
@@ -346,6 +346,7 @@ pub struct ComparatorAddressSettings {
/// The available functions of a DWT comparator.
#[derive(Debug)]
+#[non_exhaustive]
pub enum ComparatorFunction {
/// Compare accessed memory addresses.
Address(ComparatorAddressSettings),
@@ -353,6 +354,7 @@ pub enum ComparatorFunction {
/// Possible error values returned on [Comparator::configure].
#[derive(Debug)]
+#[non_exhaustive]
pub enum DwtError {
/// Invalid combination of [AccessType] and [EmitOption].
InvalidFunction,