mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
Fixed DMA CI build issues.
This commit is contained in:
parent
e92094986d
commit
50a7ada0bb
@ -10,8 +10,7 @@ use super::ringbuffer::{DmaCtrl, OverrunError, ReadableDmaRingBuffer, WritableDm
|
|||||||
use super::word::{Word, WordSize};
|
use super::word::{Word, WordSize};
|
||||||
use super::{AnyChannel, Channel, Dir, Request, STATE};
|
use super::{AnyChannel, Channel, Dir, Request, STATE};
|
||||||
use crate::interrupt::typelevel::Interrupt;
|
use crate::interrupt::typelevel::Interrupt;
|
||||||
use crate::interrupt;
|
use crate::{interrupt, pac};
|
||||||
use crate::pac;
|
|
||||||
|
|
||||||
pub(crate) struct ChannelInfo {
|
pub(crate) struct ChannelInfo {
|
||||||
pub(crate) dma: DmaInfo,
|
pub(crate) dma: DmaInfo,
|
||||||
@ -78,6 +77,44 @@ impl Default for TransferOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// DMA request priority
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
|
pub enum Priority {
|
||||||
|
/// Low Priority
|
||||||
|
Low,
|
||||||
|
/// Medium Priority
|
||||||
|
Medium,
|
||||||
|
/// High Priority
|
||||||
|
High,
|
||||||
|
/// Very High Priority
|
||||||
|
VeryHigh,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(dma)]
|
||||||
|
impl From<Priority> for pac::dma::vals::Pl {
|
||||||
|
fn from(value: Priority) -> Self {
|
||||||
|
match value {
|
||||||
|
Priority::Low => pac::dma::vals::Pl::LOW,
|
||||||
|
Priority::Medium => pac::dma::vals::Pl::MEDIUM,
|
||||||
|
Priority::High => pac::dma::vals::Pl::HIGH,
|
||||||
|
Priority::VeryHigh => pac::dma::vals::Pl::VERYHIGH,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(bdma)]
|
||||||
|
impl From<Priority> for pac::bdma::vals::Pl {
|
||||||
|
fn from(value: Priority) -> Self {
|
||||||
|
match value {
|
||||||
|
Priority::Low => pac::bdma::vals::Pl::LOW,
|
||||||
|
Priority::Medium => pac::bdma::vals::Pl::MEDIUM,
|
||||||
|
Priority::High => pac::bdma::vals::Pl::HIGH,
|
||||||
|
Priority::VeryHigh => pac::bdma::vals::Pl::VERYHIGH,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(dma)]
|
#[cfg(dma)]
|
||||||
pub use dma_only::*;
|
pub use dma_only::*;
|
||||||
#[cfg(dma)]
|
#[cfg(dma)]
|
||||||
@ -173,31 +210,6 @@ mod dma_only {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// DMA request priority
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
||||||
pub enum Priority {
|
|
||||||
/// Low Priority
|
|
||||||
Low,
|
|
||||||
/// Medium Priority
|
|
||||||
Medium,
|
|
||||||
/// High Priority
|
|
||||||
High,
|
|
||||||
/// Very High Priority
|
|
||||||
VeryHigh,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<Priority> for vals::Pl {
|
|
||||||
fn from(value: Priority) -> Self {
|
|
||||||
match value {
|
|
||||||
Priority::Low => vals::Pl::LOW,
|
|
||||||
Priority::Medium => vals::Pl::MEDIUM,
|
|
||||||
Priority::High => vals::Pl::HIGH,
|
|
||||||
Priority::VeryHigh => vals::Pl::VERYHIGH,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(bdma)]
|
#[cfg(bdma)]
|
||||||
@ -224,31 +236,6 @@ mod bdma_only {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// DMA request priority
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
||||||
pub enum Priority {
|
|
||||||
/// Low Priority
|
|
||||||
Low,
|
|
||||||
/// Medium Priority
|
|
||||||
Medium,
|
|
||||||
/// High Priority
|
|
||||||
High,
|
|
||||||
/// Very High Priority
|
|
||||||
VeryHigh,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<Priority> for vals::Pl {
|
|
||||||
fn from(value: Priority) -> Self {
|
|
||||||
match value {
|
|
||||||
Priority::Low => vals::Pl::LOW,
|
|
||||||
Priority::Medium => vals::Pl::MEDIUM,
|
|
||||||
Priority::High => vals::Pl::HIGH,
|
|
||||||
Priority::VeryHigh => vals::Pl::VERYHIGH,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) struct ChannelState {
|
pub(crate) struct ChannelState {
|
||||||
|
Loading…
Reference in New Issue
Block a user