diff options
| author | Ulf Lilleengen <[email protected]> | 2022-09-29 11:02:43 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-09-29 11:27:46 +0200 |
| commit | 72c2e985bb481fbc2e138a8e98b9dbb27878f370 (patch) | |
| tree | f573324f2449b68b7b1fef579b755a67dbb406d7 /embassy-nrf/src | |
| parent | 77ece3f903735b50f265ddd43520c50e0f28c1a1 (diff) | |
Update embedded-hal versions and explicitly pin
Diffstat (limited to 'embassy-nrf/src')
| -rw-r--r-- | embassy-nrf/src/gpio.rs | 12 | ||||
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/spim.rs | 8 | ||||
| -rw-r--r-- | embassy-nrf/src/twim.rs | 6 | ||||
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index 924629908..bb64e41e9 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs | |||
| @@ -574,7 +574,7 @@ mod eh1 { | |||
| 574 | type Error = Infallible; | 574 | type Error = Infallible; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Input<'d, T> { | 577 | impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Input<'d, T> { |
| 578 | fn is_high(&self) -> Result<bool, Self::Error> { | 578 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 579 | Ok(self.is_high()) | 579 | Ok(self.is_high()) |
| 580 | } | 580 | } |
| @@ -588,7 +588,7 @@ mod eh1 { | |||
| 588 | type Error = Infallible; | 588 | type Error = Infallible; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Output<'d, T> { | 591 | impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Output<'d, T> { |
| 592 | fn set_high(&mut self) -> Result<(), Self::Error> { | 592 | fn set_high(&mut self) -> Result<(), Self::Error> { |
| 593 | Ok(self.set_high()) | 593 | Ok(self.set_high()) |
| 594 | } | 594 | } |
| @@ -598,7 +598,7 @@ mod eh1 { | |||
| 598 | } | 598 | } |
| 599 | } | 599 | } |
| 600 | 600 | ||
| 601 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Output<'d, T> { | 601 | impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Output<'d, T> { |
| 602 | fn is_set_high(&self) -> Result<bool, Self::Error> { | 602 | fn is_set_high(&self) -> Result<bool, Self::Error> { |
| 603 | Ok(self.is_set_high()) | 603 | Ok(self.is_set_high()) |
| 604 | } | 604 | } |
| @@ -615,7 +615,7 @@ mod eh1 { | |||
| 615 | /// Implement [`InputPin`] for [`Flex`]; | 615 | /// Implement [`InputPin`] for [`Flex`]; |
| 616 | /// | 616 | /// |
| 617 | /// If the pin is not in input mode the result is unspecified. | 617 | /// If the pin is not in input mode the result is unspecified. |
| 618 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Flex<'d, T> { | 618 | impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Flex<'d, T> { |
| 619 | fn is_high(&self) -> Result<bool, Self::Error> { | 619 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 620 | Ok(self.is_high()) | 620 | Ok(self.is_high()) |
| 621 | } | 621 | } |
| @@ -625,7 +625,7 @@ mod eh1 { | |||
| 625 | } | 625 | } |
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Flex<'d, T> { | 628 | impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Flex<'d, T> { |
| 629 | fn set_high(&mut self) -> Result<(), Self::Error> { | 629 | fn set_high(&mut self) -> Result<(), Self::Error> { |
| 630 | Ok(self.set_high()) | 630 | Ok(self.set_high()) |
| 631 | } | 631 | } |
| @@ -635,7 +635,7 @@ mod eh1 { | |||
| 635 | } | 635 | } |
| 636 | } | 636 | } |
| 637 | 637 | ||
| 638 | impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Flex<'d, T> { | 638 | impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Flex<'d, T> { |
| 639 | fn is_set_high(&self) -> Result<bool, Self::Error> { | 639 | fn is_set_high(&self) -> Result<bool, Self::Error> { |
| 640 | Ok(self.is_set_high()) | 640 | Ok(self.is_set_high()) |
| 641 | } | 641 | } |
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index b418be9d5..25ad90496 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -457,7 +457,7 @@ mod eh1 { | |||
| 457 | type Error = Infallible; | 457 | type Error = Infallible; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::blocking::InputPin for InputChannel<'d, C, T> { | 460 | impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::InputPin for InputChannel<'d, C, T> { |
| 461 | fn is_high(&self) -> Result<bool, Self::Error> { | 461 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 462 | Ok(self.pin.is_high()) | 462 | Ok(self.pin.is_high()) |
| 463 | } | 463 | } |
diff --git a/embassy-nrf/src/spim.rs b/embassy-nrf/src/spim.rs index 51cd73a47..d821d2353 100644 --- a/embassy-nrf/src/spim.rs +++ b/embassy-nrf/src/spim.rs | |||
| @@ -446,25 +446,25 @@ mod eh1 { | |||
| 446 | type Error = Error; | 446 | type Error = Error; |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusFlush for Spim<'d, T> { | 449 | impl<'d, T: Instance> embedded_hal_1::spi::SpiBusFlush for Spim<'d, T> { |
| 450 | fn flush(&mut self) -> Result<(), Self::Error> { | 450 | fn flush(&mut self) -> Result<(), Self::Error> { |
| 451 | Ok(()) | 451 | Ok(()) |
| 452 | } | 452 | } |
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusRead<u8> for Spim<'d, T> { | 455 | impl<'d, T: Instance> embedded_hal_1::spi::SpiBusRead<u8> for Spim<'d, T> { |
| 456 | fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> { | 456 | fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> { |
| 457 | self.blocking_transfer(words, &[]) | 457 | self.blocking_transfer(words, &[]) |
| 458 | } | 458 | } |
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusWrite<u8> for Spim<'d, T> { | 461 | impl<'d, T: Instance> embedded_hal_1::spi::SpiBusWrite<u8> for Spim<'d, T> { |
| 462 | fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> { | 462 | fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> { |
| 463 | self.blocking_write(words) | 463 | self.blocking_write(words) |
| 464 | } | 464 | } |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBus<u8> for Spim<'d, T> { | 467 | impl<'d, T: Instance> embedded_hal_1::spi::SpiBus<u8> for Spim<'d, T> { |
| 468 | fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> { | 468 | fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> { |
| 469 | self.blocking_transfer(read, write) | 469 | self.blocking_transfer(read, write) |
| 470 | } | 470 | } |
diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index 7c6ca1d30..8d6171fac 100644 --- a/embassy-nrf/src/twim.rs +++ b/embassy-nrf/src/twim.rs | |||
| @@ -793,7 +793,7 @@ mod eh1 { | |||
| 793 | type Error = Error; | 793 | type Error = Error; |
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | impl<'d, T: Instance> embedded_hal_1::i2c::blocking::I2c for Twim<'d, T> { | 796 | impl<'d, T: Instance> embedded_hal_1::i2c::I2c for Twim<'d, T> { |
| 797 | fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { | 797 | fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { |
| 798 | self.blocking_read(address, buffer) | 798 | self.blocking_read(address, buffer) |
| 799 | } | 799 | } |
| @@ -823,14 +823,14 @@ mod eh1 { | |||
| 823 | fn transaction<'a>( | 823 | fn transaction<'a>( |
| 824 | &mut self, | 824 | &mut self, |
| 825 | _address: u8, | 825 | _address: u8, |
| 826 | _operations: &mut [embedded_hal_1::i2c::blocking::Operation<'a>], | 826 | _operations: &mut [embedded_hal_1::i2c::Operation<'a>], |
| 827 | ) -> Result<(), Self::Error> { | 827 | ) -> Result<(), Self::Error> { |
| 828 | todo!(); | 828 | todo!(); |
| 829 | } | 829 | } |
| 830 | 830 | ||
| 831 | fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error> | 831 | fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error> |
| 832 | where | 832 | where |
| 833 | O: IntoIterator<Item = embedded_hal_1::i2c::blocking::Operation<'a>>, | 833 | O: IntoIterator<Item = embedded_hal_1::i2c::Operation<'a>>, |
| 834 | { | 834 | { |
| 835 | todo!(); | 835 | todo!(); |
| 836 | } | 836 | } |
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 5f9c4f17d..d99599112 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -1040,7 +1040,7 @@ mod eh1 { | |||
| 1040 | type Error = Error; | 1040 | type Error = Error; |
| 1041 | } | 1041 | } |
| 1042 | 1042 | ||
| 1043 | impl<'d, T: Instance> embedded_hal_1::serial::blocking::Write for Uarte<'d, T> { | 1043 | impl<'d, T: Instance> embedded_hal_1::serial::Write for Uarte<'d, T> { |
| 1044 | fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { | 1044 | fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { |
| 1045 | self.blocking_write(buffer) | 1045 | self.blocking_write(buffer) |
| 1046 | } | 1046 | } |
| @@ -1054,7 +1054,7 @@ mod eh1 { | |||
| 1054 | type Error = Error; | 1054 | type Error = Error; |
| 1055 | } | 1055 | } |
| 1056 | 1056 | ||
| 1057 | impl<'d, T: Instance> embedded_hal_1::serial::blocking::Write for UarteTx<'d, T> { | 1057 | impl<'d, T: Instance> embedded_hal_1::serial::Write for UarteTx<'d, T> { |
| 1058 | fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { | 1058 | fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { |
| 1059 | self.blocking_write(buffer) | 1059 | self.blocking_write(buffer) |
| 1060 | } | 1060 | } |
