Skip to content

Commit 09929b1

Browse files
committed
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.
1 parent 633a631 commit 09929b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/peripheral/dwt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,15 @@ pub struct ComparatorAddressSettings {
346346

347347
/// The available functions of a DWT comparator.
348348
#[derive(Debug)]
349+
#[non_exhaustive]
349350
pub enum ComparatorFunction {
350351
/// Compare accessed memory addresses.
351352
Address(ComparatorAddressSettings),
352353
}
353354

354355
/// Possible error values returned on [Comparator::configure].
355356
#[derive(Debug)]
357+
#[non_exhaustive]
356358
pub enum DwtError {
357359
/// Invalid combination of [AccessType] and [EmitOption].
358360
InvalidFunction,

0 commit comments

Comments
 (0)