refactor(small): rename method and trait

This commit is contained in:
doryan 2025-03-20 21:49:18 +04:00
parent 2cbcf9637b
commit 87adfdf08f

View File

@ -45,7 +45,7 @@ pub enum ReadByteError {
pub trait SoftSerial<P>
where
P: PinOps + StaticPin,
P: PinOps + StaticPinOps,
{
fn poll(&self) -> PollResult;
fn response(&self);
@ -59,7 +59,7 @@ where
impl<P> HalfDuplexSerial<P>
where
P: PinOps + StaticPin,
P: PinOps + StaticPinOps,
{
#[inline]
pub fn new(_pin: Pin<Input<PullUp>, P>, exint: &EXINT) -> Self {
@ -71,7 +71,7 @@ where
impl<P> SoftSerial<P> for HalfDuplexSerial<P>
where
P: PinOps + StaticPin,
P: PinOps + StaticPinOps,
{
fn poll(&self) -> PollResult {
let pin_pos = 1u8 << P::PIN_NUM;
@ -99,8 +99,8 @@ where
P::into_output();
delay_us(4);
P::into_pull_up_input();
P::into_pullup_input();
}
fn write_byte(&self, data: u8) {
@ -139,7 +139,7 @@ where
delay_us(SERIAL_TRANSMIT_DELAY_US);
P::into_pullup_input();
P::into_pull_up_input();
}
fn read_byte(&self) -> ReadByteResult {