Skip to content

Commit

Permalink
Remove circular DMA for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Draaijer committed Jun 21, 2021
1 parent 340db1e commit fa2137c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub struct ADC {
pub enum DmaMode {
Disabled = 0,
Oneshot = 1,
Circular = 2,
// FIXME: Figure out how to get circular DMA to function properly (requires circbuffer?)
// Circular = 2,
}

#[derive(PartialEq, PartialOrd, Clone, Copy)]
Expand Down
3 changes: 2 additions & 1 deletion src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,10 +1085,11 @@ where
dma_mode: adc::DmaMode,
transfer_complete_interrupt: bool,
) -> Self {
assert!(dma_mode != DmaMode::Disabled);

let (enable, circular) = match dma_mode {
DmaMode::Disabled => (false, false),
DmaMode::Oneshot => (true, false),
DmaMode::Circular => (true, true),
};

adc.adc
Expand Down

0 comments on commit fa2137c

Please sign in to comment.