tock: Add hold/release_low to {Virtual}SpiMasterDevice
Original-Author: Alex Van Damme <atv@google.com>
Change-Id: I992c3cce0fdc3a1b84400e5e0487d22630b7f900
diff --git a/capsules/src/virtual_spi.rs b/capsules/src/virtual_spi.rs
index 949b1a5..076bb39 100644
--- a/capsules/src/virtual_spi.rs
+++ b/capsules/src/virtual_spi.rs
@@ -189,6 +189,14 @@
fn get_rate(&self) -> u32 {
self.mux.spi.get_rate()
}
+
+ fn hold_low(&self) {
+ self.mux.spi.hold_low();
+ }
+
+ fn release_low(&self) {
+ self.mux.spi.release_low();
+ }
}
pub struct VirtualSpiSlaveDevice<'a, Spi: hil::spi::SpiSlave> {
diff --git a/kernel/src/hil/spi.rs b/kernel/src/hil/spi.rs
index 0ef47e8..23b5165 100644
--- a/kernel/src/hil/spi.rs
+++ b/kernel/src/hil/spi.rs
@@ -149,6 +149,9 @@
fn get_polarity(&self) -> ClockPolarity;
fn get_phase(&self) -> ClockPhase;
fn get_rate(&self) -> u32;
+
+ fn hold_low(&self);
+ fn release_low(&self);
}
pub trait SpiSlaveClient {