feat: remove SoftSerial trait
This commit is contained in:
parent
caa1ff9f24
commit
6991e5611e
22
src/lib.rs
22
src/lib.rs
|
@ -46,28 +46,6 @@ where
|
||||||
_pin: PhantomData {},
|
_pin: PhantomData {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pub trait SoftSerial<P>
|
|
||||||
where
|
|
||||||
P: PinOps + StaticPinOps,
|
|
||||||
{
|
|
||||||
fn poll(&self) -> PollResult;
|
|
||||||
fn response(&self);
|
|
||||||
|
|
||||||
fn sync_reciever(&self);
|
|
||||||
fn sync_transmitter(&self);
|
|
||||||
|
|
||||||
fn write_byte(&self, data: u8);
|
|
||||||
fn read_byte(&self) -> ReadByteResult;
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn finish_write(&self) {
|
|
||||||
P::into_pull_up_input();
|
|
||||||
while P::is_low() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn poll(&self) -> PollResult {
|
pub fn poll(&self) -> PollResult {
|
||||||
P::into_output();
|
P::into_output();
|
||||||
|
|
Loading…
Reference in New Issue