1
1
//! Blocking SPI API
2
2
3
3
/// Blocking transfer
4
- pub trait Transfer < W > {
4
+ pub trait Transfer < W = u8 > {
5
5
/// Error type
6
6
type Error : crate :: spi:: Error ;
7
7
@@ -20,7 +20,7 @@ impl<T: Transfer<W>, W> Transfer<W> for &mut T {
20
20
}
21
21
22
22
/// Blocking write
23
- pub trait Write < W > {
23
+ pub trait Write < W = u8 > {
24
24
/// Error type
25
25
type Error : crate :: spi:: Error ;
26
26
@@ -37,7 +37,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
37
37
}
38
38
39
39
/// Blocking write (iterator version)
40
- pub trait WriteIter < W > {
40
+ pub trait WriteIter < W = u8 > {
41
41
/// Error type
42
42
type Error : crate :: spi:: Error ;
43
43
@@ -62,7 +62,7 @@ impl<T: WriteIter<W>, W> WriteIter<W> for &mut T {
62
62
///
63
63
/// This allows composition of SPI operations into a single bus transaction
64
64
#[ derive( Debug , PartialEq ) ]
65
- pub enum Operation < ' a , W : ' static > {
65
+ pub enum Operation < ' a , W : ' static = u8 > {
66
66
/// Write data from the provided buffer, discarding read data
67
67
Write ( & ' a [ W ] ) ,
68
68
/// Write data out while reading data into the provided buffer
@@ -71,7 +71,7 @@ pub enum Operation<'a, W: 'static> {
71
71
72
72
/// Transactional trait allows multiple actions to be executed
73
73
/// as part of a single SPI transaction
74
- pub trait Transactional < W : ' static > {
74
+ pub trait Transactional < W : ' static = u8 > {
75
75
/// Associated error type
76
76
type Error : crate :: spi:: Error ;
77
77
0 commit comments