Move traits to separate crate.

This commit is contained in:
xoviat
2021-03-02 00:32:23 +01:00
committed by Dario Nieuwenhuis
parent 084b64053a
commit 9626aee7db
20 changed files with 53 additions and 22 deletions

View File

@ -4,7 +4,7 @@ use core::ops::Deref;
use core::pin::Pin;
use core::ptr;
use core::task::{Context, Poll};
use embassy::gpio::{WaitForHigh, WaitForLow};
use embassy::traits::gpio::{WaitForHigh, WaitForLow};
use embassy::interrupt::InterruptExt;
use embassy::util::Signal;

View File

@ -23,7 +23,7 @@ use crate::util::peripheral::{PeripheralMutex, PeripheralState};
// - activate/deactivate
// - set gpio in high drive
use embassy::flash::{Error, Flash};
use embassy::traits::flash::{Error, Flash};
use embassy::util::{DropBomb, WakerRegistration};
use futures::future::poll_fn;

View File

@ -207,7 +207,7 @@ where
}
}
impl<T: Instance> embassy::uart::Uart for Uarte<T> {
impl<T: Instance> embassy::traits::uart::Uart for Uarte<T> {
type ReceiveFuture<'a> = ReceiveFuture<'a, T>;
type SendFuture<'a> = SendFuture<'a, T>;
@ -287,7 +287,7 @@ impl<'a, T> Future for SendFuture<'a, T>
where
T: Instance,
{
type Output = Result<(), embassy::uart::Error>;
type Output = Result<(), embassy::traits::uart::Error>;
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let Self { uarte, buf } = unsafe { self.get_unchecked_mut() };
@ -355,7 +355,7 @@ impl<'a, T> Future for ReceiveFuture<'a, T>
where
T: Instance,
{
type Output = Result<(), embassy::uart::Error>;
type Output = Result<(), embassy::traits::uart::Error>;
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let Self { uarte, buf } = unsafe { self.get_unchecked_mut() };