More formatting!
This commit is contained in:
parent
58edefff6e
commit
a345dd9e2b
1 changed files with 6 additions and 9 deletions
|
@ -24,8 +24,7 @@ pub trait Spi<Word> {
|
||||||
type Error;
|
type Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait FullDuplex<Word> : Spi<Word> + Write<Word> + Read<Word> {
|
pub trait FullDuplex<Word>: Spi<Word> + Write<Word> + Read<Word> {
|
||||||
|
|
||||||
type WriteReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
type WriteReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
||||||
where
|
where
|
||||||
Self: 'a;
|
Self: 'a;
|
||||||
|
@ -37,20 +36,18 @@ pub trait FullDuplex<Word> : Spi<Word> + Write<Word> + Read<Word> {
|
||||||
) -> Self::WriteReadFuture<'a>;
|
) -> Self::WriteReadFuture<'a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Write<Word> : Spi<Word>{
|
pub trait Write<Word>: Spi<Word> {
|
||||||
|
|
||||||
type WriteFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
type WriteFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
||||||
where
|
where
|
||||||
Self: 'a;
|
Self: 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, data: &'a [Word]) -> Self::WriteFuture<'a>;
|
fn write<'a>(&'a mut self, data: &'a [Word]) -> Self::WriteFuture<'a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Read<Word> : Spi<Word>{
|
pub trait Read<Word>: Spi<Word> {
|
||||||
|
|
||||||
type ReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
type ReadFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
||||||
where
|
where
|
||||||
Self: 'a;
|
Self: 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, data: &'a mut [Word]) -> Self::ReadFuture<'a>;
|
fn read<'a>(&'a mut self, data: &'a mut [Word]) -> Self::ReadFuture<'a>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue