Skip to content

Commit 3dcb672

Browse files
bors[bot]Sh3Rm4n
andauthored
Merge #306
306: Add Debug to all spi mode types r=ryankurte a=Sh3Rm4n I've noticed that these were missing, and I see no reason why to not implement `Debug`. Co-authored-by: Fabian Viöl <[email protected]>
2 parents ecd9898 + 347622d commit 3dcb672

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Added
1111
- Added `IoPin` trait for pins that can change between being inputs or outputs
1212
dynamically.
13+
- Added `Debug` to all spi mode types.
1314

1415
### Changed
1516
- Swap PWM channel arguments to references

src/nb/spi.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait FullDuplex<Word> {
3131
}
3232

3333
/// Clock polarity
34-
#[derive(Clone, Copy, PartialEq, Eq)]
34+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3535
pub enum Polarity {
3636
/// Clock signal low when idle
3737
IdleLow,
@@ -40,7 +40,7 @@ pub enum Polarity {
4040
}
4141

4242
/// Clock phase
43-
#[derive(Clone, Copy, PartialEq, Eq)]
43+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4444
pub enum Phase {
4545
/// Data in "captured" on the first clock transition
4646
CaptureOnFirstTransition,
@@ -49,7 +49,7 @@ pub enum Phase {
4949
}
5050

5151
/// SPI mode
52-
#[derive(Clone, Copy, PartialEq, Eq)]
52+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5353
pub struct Mode {
5454
/// Clock polarity
5555
pub polarity: Polarity,

0 commit comments

Comments
 (0)