mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 08:42:32 +00:00
Remove gratuitous NoDmaMarker.
This commit is contained in:
parent
38b1359c40
commit
43cb8de434
@ -21,12 +21,8 @@ pub trait ReadDma<T> {
|
|||||||
T: 'a;
|
T: 'a;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait NoDmaMarker {}
|
|
||||||
|
|
||||||
pub struct NoDma;
|
pub struct NoDma;
|
||||||
|
|
||||||
impl NoDmaMarker for NoDma {}
|
|
||||||
|
|
||||||
unsafe impl Unborrow for NoDma {
|
unsafe impl Unborrow for NoDma {
|
||||||
type Target = NoDma;
|
type Target = NoDma;
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ use core::future::Future;
|
|||||||
use futures::TryFutureExt;
|
use futures::TryFutureExt;
|
||||||
|
|
||||||
use crate::dma_traits::NoDma;
|
use crate::dma_traits::NoDma;
|
||||||
use crate::dma_traits::NoDmaMarker;
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub struct Uart<'d, T: Instance, TxDma = NoDma, RxDma = NoDma> {
|
pub struct Uart<'d, T: Instance, TxDma = NoDma, RxDma = NoDma> {
|
||||||
@ -114,10 +113,8 @@ impl<'d, T: Instance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance, TxDma, RxDma> embedded_hal::blocking::serial::Write<u8>
|
impl<'d, T: Instance, RxDma> embedded_hal::blocking::serial::Write<u8>
|
||||||
for Uart<'d, T, TxDma, RxDma>
|
for Uart<'d, T, NoDma, RxDma>
|
||||||
where
|
|
||||||
TxDma: NoDmaMarker,
|
|
||||||
{
|
{
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
fn bwrite_all(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
|
fn bwrite_all(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
|
||||||
|
Loading…
Reference in New Issue
Block a user