Merge #546
546: Update rust-toolchain r=Dirbaio a=lulf Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
This commit is contained in:
commit
23c16903db
@ -23,5 +23,5 @@ futures = { version = "0.3.17", default-features = false, features = [ "async-aw
|
|||||||
embedded-hal = { version = "0.2", features = ["unproven"] }
|
embedded-hal = { version = "0.2", features = ["unproven"] }
|
||||||
bit_field = { version = "0.10" }
|
bit_field = { version = "0.10" }
|
||||||
|
|
||||||
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["async"] }
|
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false, features = ["async"] }
|
||||||
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false }
|
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false }
|
||||||
|
@ -89,8 +89,15 @@ where
|
|||||||
{
|
{
|
||||||
type PhyError = Sx127xError;
|
type PhyError = Sx127xError;
|
||||||
|
|
||||||
#[rustfmt::skip]
|
type TxFuture<'m>
|
||||||
type TxFuture<'m> where SPI: 'm, CS: 'm, RESET: 'm, E: 'm, I: 'm, RFS: 'm = impl Future<Output = Result<u32, Self::PhyError>> + 'm;
|
where
|
||||||
|
SPI: 'm,
|
||||||
|
CS: 'm,
|
||||||
|
RESET: 'm,
|
||||||
|
E: 'm,
|
||||||
|
I: 'm,
|
||||||
|
RFS: 'm,
|
||||||
|
= impl Future<Output = Result<u32, Self::PhyError>> + 'm;
|
||||||
|
|
||||||
fn tx<'m>(&'m mut self, config: TxConfig, buf: &'m [u8]) -> Self::TxFuture<'m> {
|
fn tx<'m>(&'m mut self, config: TxConfig, buf: &'m [u8]) -> Self::TxFuture<'m> {
|
||||||
trace!("TX START");
|
trace!("TX START");
|
||||||
@ -130,8 +137,15 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustfmt::skip]
|
type RxFuture<'m>
|
||||||
type RxFuture<'m> where SPI: 'm, CS: 'm, RESET: 'm, E: 'm, I: 'm, RFS: 'm = impl Future<Output = Result<(usize, RxQuality), Self::PhyError>> + 'm;
|
where
|
||||||
|
SPI: 'm,
|
||||||
|
CS: 'm,
|
||||||
|
RESET: 'm,
|
||||||
|
E: 'm,
|
||||||
|
I: 'm,
|
||||||
|
RFS: 'm,
|
||||||
|
= impl Future<Output = Result<(usize, RxQuality), Self::PhyError>> + 'm;
|
||||||
|
|
||||||
fn rx<'m>(&'m mut self, config: RfConfig, buf: &'m mut [u8]) -> Self::RxFuture<'m> {
|
fn rx<'m>(&'m mut self, config: RfConfig, buf: &'m mut [u8]) -> Self::RxFuture<'m> {
|
||||||
trace!("RX START");
|
trace!("RX START");
|
||||||
|
@ -288,6 +288,7 @@ struct MainArgs {
|
|||||||
#[darling(default)]
|
#[darling(default)]
|
||||||
embassy_prefix: ModulePrefix,
|
embassy_prefix: ModulePrefix,
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
#[darling(default)]
|
#[darling(default)]
|
||||||
config: Option<syn::LitStr>,
|
config: Option<syn::LitStr>,
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,10 @@ impl<'d, T: Pin> InputPin for Input<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
self.pin.conf().modify(|_, w| w.sense().high());
|
self.pin.conf().modify(|_, w| w.sense().high());
|
||||||
@ -90,8 +92,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
self.pin.conf().modify(|_, w| w.sense().low());
|
self.pin.conf().modify(|_, w| w.sense().low());
|
||||||
@ -105,8 +109,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for Input<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for Input<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
if self.is_high().ok().unwrap() {
|
if self.is_high().ok().unwrap() {
|
||||||
@ -328,8 +334,10 @@ impl<'d, T: Pin> StatefulOutputPin for FlexPin<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
self.pin.conf().modify(|_, w| w.sense().high());
|
self.pin.conf().modify(|_, w| w.sense().high());
|
||||||
@ -343,8 +351,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
self.pin.conf().modify(|_, w| w.sense().low());
|
self.pin.conf().modify(|_, w| w.sense().low());
|
||||||
@ -358,8 +368,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> {
|
|||||||
|
|
||||||
#[cfg(feature = "gpiote")]
|
#[cfg(feature = "gpiote")]
|
||||||
impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for FlexPin<'d, T> {
|
impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for FlexPin<'d, T> {
|
||||||
#[rustfmt::skip]
|
type Future<'a>
|
||||||
type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = ()> + Unpin + 'a;
|
||||||
|
|
||||||
fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> {
|
fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> {
|
||||||
if self.is_high().ok().unwrap() {
|
if self.is_high().ok().unwrap() {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(generic_associated_types)]
|
#![feature(generic_associated_types)]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
|
@ -286,12 +286,18 @@ impl<'d, T: Instance> Drop for Qspi<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Flash for Qspi<'d, T> {
|
impl<'d, T: Instance> Flash for Qspi<'d, T> {
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Error>> + 'a;
|
where
|
||||||
#[rustfmt::skip]
|
Self: 'a,
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Error>> + 'a;
|
= impl Future<Output = Result<(), Error>> + 'a;
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type ErasePageFuture<'a> where Self: 'a = impl Future<Output = Result<(), Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Error>> + 'a;
|
||||||
|
type ErasePageFuture<'a>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, address: usize, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, address: usize, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
|
@ -157,8 +157,10 @@ impl<'d> Drop for Rng<'d> {
|
|||||||
impl<'d> traits::rng::Rng for Rng<'d> {
|
impl<'d> traits::rng::Rng for Rng<'d> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
#[rustfmt::skip] // For some reason rustfmt removes the where clause
|
type RngFuture<'a>
|
||||||
type RngFuture<'a> where 'd: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
'd: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> {
|
fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
|
@ -182,8 +182,10 @@ impl<'d, T: Instance> Spi<u8> for Spim<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Read<u8> for Spim<'d, T> {
|
impl<'d, T: Instance> Read<u8> for Spim<'d, T> {
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output=Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
self.read_write(data, &[])
|
self.read_write(data, &[])
|
||||||
@ -191,8 +193,10 @@ impl<'d, T: Instance> Read<u8> for Spim<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Write<u8> for Spim<'d, T> {
|
impl<'d, T: Instance> Write<u8> for Spim<'d, T> {
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output=Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
self.read_write(&mut [], data)
|
self.read_write(&mut [], data)
|
||||||
@ -200,8 +204,10 @@ impl<'d, T: Instance> Write<u8> for Spim<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> FullDuplex<u8> for Spim<'d, T> {
|
impl<'d, T: Instance> FullDuplex<u8> for Spim<'d, T> {
|
||||||
#[rustfmt::skip]
|
type WriteReadFuture<'a>
|
||||||
type WriteReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read_write<'a>(&'a mut self, rx: &'a mut [u8], tx: &'a [u8]) -> Self::WriteReadFuture<'a> {
|
fn read_write<'a>(&'a mut self, rx: &'a mut [u8], tx: &'a [u8]) -> Self::WriteReadFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
|
@ -469,12 +469,18 @@ where
|
|||||||
{
|
{
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
|
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
#[rustfmt::skip]
|
Self: 'a,
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type WriteReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
type WriteReadFuture<'a>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
|
@ -167,8 +167,10 @@ impl<'d, T: Instance> Uarte<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Read for Uarte<'d, T> {
|
impl<'d, T: Instance> Read for Uarte<'d, T> {
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
self.rx.read(rx_buffer)
|
self.rx.read(rx_buffer)
|
||||||
@ -176,8 +178,10 @@ impl<'d, T: Instance> Read for Uarte<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Write for Uarte<'d, T> {
|
impl<'d, T: Instance> Write for Uarte<'d, T> {
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
self.tx.write(tx_buffer)
|
self.tx.write(tx_buffer)
|
||||||
@ -193,8 +197,10 @@ impl<'d, T: Instance> UarteTx<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Write for UarteTx<'d, T> {
|
impl<'d, T: Instance> Write for UarteTx<'d, T> {
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
@ -274,8 +280,10 @@ impl<'d, T: Instance> UarteRx<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> Read for UarteRx<'d, T> {
|
impl<'d, T: Instance> Read for UarteRx<'d, T> {
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
@ -490,8 +498,10 @@ impl<'d, U: Instance, T: TimerInstance> UarteWithIdle<'d, U, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T> {
|
impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T> {
|
||||||
#[rustfmt::skip]
|
type ReadUntilIdleFuture<'a>
|
||||||
type ReadUntilIdleFuture<'a> where Self: 'a = impl Future<Output = Result<usize, TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<usize, TraitError>> + 'a;
|
||||||
fn read_until_idle<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadUntilIdleFuture<'a> {
|
fn read_until_idle<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadUntilIdleFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
let ptr = rx_buffer.as_ptr();
|
let ptr = rx_buffer.as_ptr();
|
||||||
@ -550,8 +560,10 @@ impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> {
|
impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> {
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
async move {
|
async move {
|
||||||
self.ppi_ch1.disable();
|
self.ppi_ch1.disable();
|
||||||
@ -563,8 +575,10 @@ impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: Instance, T: TimerInstance> Write for UarteWithIdle<'d, U, T> {
|
impl<'d, U: Instance, T: TimerInstance> Write for UarteWithIdle<'d, U, T> {
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), TraitError>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
self.uarte.write(tx_buffer)
|
self.uarte.write(tx_buffer)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(generic_associated_types)]
|
#![feature(generic_associated_types)]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[cfg(feature = "unstable-pac")]
|
#[cfg(feature = "unstable-pac")]
|
||||||
|
@ -858,12 +858,27 @@ impl<'d, T: Instance, TXDMA: super::TxDma<T>, RXDMA: super::RxDma<T>> I2cTrait<u
|
|||||||
{
|
{
|
||||||
type Error = super::Error;
|
type Error = super::Error;
|
||||||
|
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
#[rustfmt::skip]
|
'd: 'a,
|
||||||
type ReadFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
T: 'a,
|
||||||
#[rustfmt::skip]
|
TXDMA: 'a,
|
||||||
type WriteReadFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
RXDMA: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
type ReadFuture<'a>
|
||||||
|
where
|
||||||
|
'd: 'a,
|
||||||
|
T: 'a,
|
||||||
|
TXDMA: 'a,
|
||||||
|
RXDMA: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
type WriteReadFuture<'a>
|
||||||
|
where
|
||||||
|
'd: 'a,
|
||||||
|
T: 'a,
|
||||||
|
TXDMA: 'a,
|
||||||
|
RXDMA: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
self.read_dma(address, buffer, false)
|
self.read_dma(address, buffer, false)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(generic_associated_types)]
|
#![feature(generic_associated_types)]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[cfg(feature = "unstable-pac")]
|
#[cfg(feature = "unstable-pac")]
|
||||||
|
@ -85,8 +85,10 @@ impl<T: Instance> CryptoRng for Rng<T> {}
|
|||||||
|
|
||||||
impl<T: Instance> traits::rng::Rng for Rng<T> {
|
impl<T: Instance> traits::rng::Rng for Rng<T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
#[rustfmt::skip]
|
type RngFuture<'a>
|
||||||
type RngFuture<'a> where Self: 'a = impl Future<Output=Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> {
|
fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -1545,10 +1545,14 @@ mod sdmmc_rs {
|
|||||||
|
|
||||||
impl<'d, T: Instance, P: Pins<T>> BlockDevice for Sdmmc<'d, T, P> {
|
impl<'d, T: Instance, P: Pins<T>> BlockDevice for Sdmmc<'d, T, P> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
#[rustfmt::skip]
|
Self: 'a,
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
type WriteFuture<'a>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(
|
fn read<'a>(
|
||||||
&'a mut self,
|
&'a mut self,
|
||||||
|
@ -545,8 +545,10 @@ impl<'d, T: Instance, Tx, Rx> traits::Spi<u8> for Spi<'d, T, Tx, Rx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T, Tx, Rx> {
|
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T, Tx, Rx> {
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
self.write_dma_u8(data)
|
self.write_dma_u8(data)
|
||||||
@ -556,8 +558,10 @@ impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T,
|
|||||||
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8>
|
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8>
|
||||||
for Spi<'d, T, Tx, Rx>
|
for Spi<'d, T, Tx, Rx>
|
||||||
{
|
{
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
self.read_dma_u8(data)
|
self.read_dma_u8(data)
|
||||||
@ -567,8 +571,10 @@ impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8>
|
|||||||
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::FullDuplex<u8>
|
impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::FullDuplex<u8>
|
||||||
for Spi<'d, T, Tx, Rx>
|
for Spi<'d, T, Tx, Rx>
|
||||||
{
|
{
|
||||||
#[rustfmt::skip]
|
type WriteReadFuture<'a>
|
||||||
type WriteReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||||
|
|
||||||
fn read_write<'a>(
|
fn read_write<'a>(
|
||||||
&'a mut self,
|
&'a mut self,
|
||||||
|
@ -219,8 +219,10 @@ impl<'d, T: Instance, TxDma, RxDma> embassy_traits::uart::Write for Uart<'d, T,
|
|||||||
where
|
where
|
||||||
TxDma: crate::usart::TxDma<T>,
|
TxDma: crate::usart::TxDma<T>,
|
||||||
{
|
{
|
||||||
#[rustfmt::skip]
|
type WriteFuture<'a>
|
||||||
type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a;
|
||||||
|
|
||||||
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> {
|
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> {
|
||||||
self.write_dma(buf)
|
self.write_dma(buf)
|
||||||
@ -232,8 +234,10 @@ impl<'d, T: Instance, TxDma, RxDma> embassy_traits::uart::Read for Uart<'d, T, T
|
|||||||
where
|
where
|
||||||
RxDma: crate::usart::RxDma<T>,
|
RxDma: crate::usart::RxDma<T>,
|
||||||
{
|
{
|
||||||
#[rustfmt::skip]
|
type ReadFuture<'a>
|
||||||
type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a;
|
where
|
||||||
|
Self: 'a,
|
||||||
|
= impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a;
|
||||||
|
|
||||||
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> {
|
||||||
self.read_dma(buf)
|
self.read_dma(buf)
|
||||||
|
@ -4,7 +4,6 @@ use core::future::Future;
|
|||||||
pub trait Rng {
|
pub trait Rng {
|
||||||
type Error;
|
type Error;
|
||||||
|
|
||||||
#[rustfmt::skip]
|
|
||||||
type RngFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
type RngFuture<'a>: Future<Output = Result<(), Self::Error>> + 'a
|
||||||
where
|
where
|
||||||
Self: 'a;
|
Self: 'a;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[path = "../example_common.rs"]
|
#[path = "../example_common.rs"]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[path = "../example_common.rs"]
|
#[path = "../example_common.rs"]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[path = "../example_common.rs"]
|
#[path = "../example_common.rs"]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[path = "../example_common.rs"]
|
#[path = "../example_common.rs"]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![feature(asm)]
|
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
#[path = "../example_common.rs"]
|
#[path = "../example_common.rs"]
|
||||||
|
@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
|
|||||||
|
|
||||||
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time", "defmt"] }
|
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time", "defmt"] }
|
||||||
|
|
||||||
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["async"] }
|
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false, features = ["async"] }
|
||||||
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["default-crypto"] }
|
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false, features = ["default-crypto"] }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
defmt-rtt = "0.3"
|
defmt-rtt = "0.3"
|
||||||
|
@ -11,8 +11,8 @@ embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features =
|
|||||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] }
|
||||||
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time"] }
|
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time"] }
|
||||||
|
|
||||||
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["async"] }
|
lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false, features = ["async"] }
|
||||||
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["default-crypto"] }
|
lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "0de1a2a31933f7c97887b5718c1755fa5ab93a42", default-features = false, features = ["default-crypto"] }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
defmt-rtt = "0.3"
|
defmt-rtt = "0.3"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Before upgrading check that everything is available on all tier1 targets here:
|
# Before upgrading check that everything is available on all tier1 targets here:
|
||||||
# https://rust-lang.github.io/rustup-components-history
|
# https://rust-lang.github.io/rustup-components-history
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2021-10-16"
|
channel = "nightly-2021-12-16"
|
||||||
components = [ "rust-src", "rustfmt" ]
|
components = [ "rust-src", "rustfmt" ]
|
||||||
targets = [ "thumbv7em-none-eabi", "thumbv7m-none-eabi", "thumbv6m-none-eabi", "thumbv7em-none-eabihf", "thumbv8m.main-none-eabihf", "wasm32-unknown-unknown" ]
|
targets = [ "thumbv7em-none-eabi", "thumbv7m-none-eabi", "thumbv6m-none-eabi", "thumbv7em-none-eabihf", "thumbv8m.main-none-eabihf", "wasm32-unknown-unknown" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user