@@ -61,61 +61,3 @@ pub trait Read<W> {
61
61
/// by this trait. Some hardware can configure what values (e.g. all zeroes, all ones), some cannot.
62
62
fn read < ' a > ( & ' a mut self , words : & ' a mut [ MaybeUninit < W > ] ) -> Self :: ReadFuture < ' a > ;
63
63
}
64
-
65
- // /// Operation for transactional SPI trait
66
- // ///
67
- // /// This allows composition of SPI operations into a single bus transaction
68
- // #[derive(Debug, PartialEq)]
69
- // pub enum Operation<'a, W: 'static> {
70
- // /// Write data from the provided buffer, discarding read data
71
- // Write(&'a [W]),
72
- // /// Write data out while reading data into the provided buffer
73
- // Transfer(&'a mut [W]),
74
- // }
75
-
76
- // /// Transactional trait allows multiple actions to be executed
77
- // /// as part of a single SPI transaction
78
- // pub trait Transactional<W: 'static> {
79
- // /// Associated error type
80
- // type Error;
81
- // /// Future associated with the `exec` method.
82
- // type ExecFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
83
- // where
84
- // Self: 'a;
85
-
86
- // /// Execute the provided transactions
87
- // fn exec<'a>(&'a mut self, operations: &'a mut [Operation<'a, W>]) -> Self::ExecFuture<'a>;
88
- // }
89
-
90
- // /// Blocking transactional impl over spi::Write and spi::Transfer
91
- // pub mod transactional {
92
- // use core::future::Future;
93
-
94
- // use super::{Operation, Transfer, Write};
95
-
96
- // /// Default implementation of `blocking::spi::Transactional<W>` for implementers of
97
- // /// `spi::Write<W>` and `spi::Transfer<W>`
98
- // pub trait Default<W: 'static>: Write<W> + Transfer<W> {}
99
-
100
- // impl<W: 'static, E, S> super::Transactional<W> for S
101
- // where
102
- // S: self::Default<W> + Write<W, Error = E> + Transfer<W, Error = E>,
103
- // W: Copy + Clone,
104
- // {
105
- // type Error = E;
106
- // type ExecFuture<'a> where Self: 'a = impl Future<Output=Result<(), E>> + 'a;
107
-
108
- // fn exec<'a>(&'a mut self, operations: &'a mut [super::Operation<'a, W>]) -> Self::ExecFuture<'a> {
109
- // async move {
110
- // for op in operations {
111
- // match op {
112
- // Operation::Write(w) => self.write(w).await?,
113
- // Operation::Transfer(t) => self.transfer(t).await.map(|_| ())?,
114
- // }
115
- // }
116
-
117
- // Ok(())
118
- // }
119
- // }
120
- // }
121
- // }
0 commit comments