diff --git a/machine/src/platform/rpi3/gpio.rs b/machine/src/platform/rpi3/gpio.rs index 3e4b09c..06d4509 100644 --- a/machine/src/platform/rpi3/gpio.rs +++ b/machine/src/platform/rpi3/gpio.rs @@ -221,7 +221,7 @@ impl Pin { self.registers.PUDCLK[bank].modify(FieldValue::::new( 0b1, off, - if pull == PullUpDown::Up { 1 } else { 0 }, + (pull == PullUpDown::Up).into(), )); loop_delay(2000); diff --git a/machine/src/platform/rpi3/mailbox.rs b/machine/src/platform/rpi3/mailbox.rs index 470b68e..1e09660 100644 --- a/machine/src/platform/rpi3/mailbox.rs +++ b/machine/src/platform/rpi3/mailbox.rs @@ -461,7 +461,7 @@ impl Mailbox< buf[index + 1] = 8; // Buffer size // val buf size buf[index + 2] = 0; // Response size // val size buf[index + 3] = 130; // Pin Number - buf[index + 4] = if enable { 1 } else { 0 }; + buf[index + 4] = enable.into(); index + 5 }