5
5
//! Implementing that marker trait will opt in your type into a blanket implementation.
6
6
7
7
/// Blocking transfer
8
- pub trait Transfer < W > {
8
+ pub trait Transfer < W = u8 > {
9
9
/// Error type
10
10
type Error : crate :: spi:: Error ;
11
11
@@ -24,7 +24,7 @@ impl<T: Transfer<W>, W> Transfer<W> for &mut T {
24
24
}
25
25
26
26
/// Blocking write
27
- pub trait Write < W > {
27
+ pub trait Write < W = u8 > {
28
28
/// Error type
29
29
type Error : crate :: spi:: Error ;
30
30
@@ -41,7 +41,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
41
41
}
42
42
43
43
/// Blocking write (iterator version)
44
- pub trait WriteIter < W > {
44
+ pub trait WriteIter < W = u8 > {
45
45
/// Error type
46
46
type Error : crate :: spi:: Error ;
47
47
@@ -66,7 +66,7 @@ impl<T: WriteIter<W>, W> WriteIter<W> for &mut T {
66
66
///
67
67
/// This allows composition of SPI operations into a single bus transaction
68
68
#[ derive( Debug , PartialEq ) ]
69
- pub enum Operation < ' a , W : ' static > {
69
+ pub enum Operation < ' a , W : ' static = u8 > {
70
70
/// Write data from the provided buffer, discarding read data
71
71
Write ( & ' a [ W ] ) ,
72
72
/// Write data out while reading data into the provided buffer
@@ -75,7 +75,7 @@ pub enum Operation<'a, W: 'static> {
75
75
76
76
/// Transactional trait allows multiple actions to be executed
77
77
/// as part of a single SPI transaction
78
- pub trait Transactional < W : ' static > {
78
+ pub trait Transactional < W : ' static = u8 > {
79
79
/// Associated error type
80
80
type Error : crate :: spi:: Error ;
81
81
0 commit comments