55//! Implementing that marker trait will opt in your type into a blanket implementation.
66
77/// Blocking transfer
8- pub trait Transfer < W > {
8+ pub trait Transfer < W = u8 > {
99 /// Error type
1010 type Error : crate :: spi:: Error ;
1111
@@ -24,7 +24,7 @@ impl<T: Transfer<W>, W> Transfer<W> for &mut T {
2424}
2525
2626/// Blocking write
27- pub trait Write < W > {
27+ pub trait Write < W = u8 > {
2828 /// Error type
2929 type Error : crate :: spi:: Error ;
3030
@@ -41,7 +41,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
4141}
4242
4343/// Blocking write (iterator version)
44- pub trait WriteIter < W > {
44+ pub trait WriteIter < W = u8 > {
4545 /// Error type
4646 type Error : crate :: spi:: Error ;
4747
@@ -66,7 +66,7 @@ impl<T: WriteIter<W>, W> WriteIter<W> for &mut T {
6666///
6767/// This allows composition of SPI operations into a single bus transaction
6868#[ derive( Debug , PartialEq ) ]
69- pub enum Operation < ' a , W : ' static > {
69+ pub enum Operation < ' a , W : ' static = u8 > {
7070 /// Write data from the provided buffer, discarding read data
7171 Write ( & ' a [ W ] ) ,
7272 /// Write data out while reading data into the provided buffer
@@ -75,7 +75,7 @@ pub enum Operation<'a, W: 'static> {
7575
7676/// Transactional trait allows multiple actions to be executed
7777/// as part of a single SPI transaction
78- pub trait Transactional < W : ' static > {
78+ pub trait Transactional < W : ' static = u8 > {
7979 /// Associated error type
8080 type Error : crate :: spi:: Error ;
8181
0 commit comments