diff options
| author | Bob McWhirter <[email protected]> | 2021-07-20 10:02:33 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-07-23 13:22:39 -0400 |
| commit | a345dd9e2baa7f3b3b249012cf69d39876658571 (patch) | |
| tree | a7750d790e9863590d57bd86925203bd79a60329 | |
| parent | 58edefff6ea8246c6b607d72546ee07878d2c98a (diff) | |
More formatting!
| -rw-r--r-- | embassy-traits/src/spi.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/embassy-traits/src/spi.rs b/embassy-traits/src/spi.rs index d19a1e58a..961da38c4 100644 --- a/embassy-traits/src/spi.rs +++ b/embassy-traits/src/spi.rs | |||
| @@ -24,8 +24,7 @@ pub trait Spi<Word> { | |||
| 24 | type Error; | 24 | type Error; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | pub trait FullDuplex<Word> : Spi<Word> + Write<Word> + Read<Word> { | 27 | pub trait FullDuplex<Word>: Spi<Word> + Write<Word> + Read<Word> { |
| 28 | |||
| 29 | type WriteReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a | 28 | type WriteReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a |
| 30 | where | 29 | where |
| 31 | Self: 'a; | 30 | Self: 'a; |
| @@ -37,20 +36,18 @@ pub trait FullDuplex<Word> : Spi<Word> + Write<Word> + Read<Word> { | |||
| 37 | ) -> Self::WriteReadFuture<'a>; | 36 | ) -> Self::WriteReadFuture<'a>; |
| 38 | } | 37 | } |
| 39 | 38 | ||
| 40 | pub trait Write<Word> : Spi<Word>{ | 39 | pub trait Write<Word>: Spi<Word> { |
| 41 | |||
| 42 | type WriteFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a | 40 | type WriteFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a |
| 43 | where | 41 | where |
| 44 | Self: 'a; | 42 | Self: 'a; |
| 45 | 43 | ||
| 46 | fn write<'a>(&'a mut self, data: &'a [Word]) -> Self::WriteFuture<'a>; | 44 | fn write<'a>(&'a mut self, data: &'a [Word]) -> Self::WriteFuture<'a>; |
| 47 | } | 45 | } |
| 48 | 46 | ||
| 49 | pub trait Read<Word> : Spi<Word>{ | 47 | pub trait Read<Word>: Spi<Word> { |
| 50 | |||
| 51 | type ReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a | 48 | type ReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a |
| 52 | where | 49 | where |
| 53 | Self: 'a; | 50 | Self: 'a; |
| 54 | 51 | ||
| 55 | fn read<'a>(&'a mut self, data: &'a mut [Word]) -> Self::ReadFuture<'a>; | 52 | fn read<'a>(&'a mut self, data: &'a mut [Word]) -> Self::ReadFuture<'a>; |
| 56 | } \ No newline at end of file | 53 | } |
