Skip to content

Commit

Permalink
support the esp32c2 (esp8684)
Browse files Browse the repository at this point in the history
  • Loading branch information
liebman committed Jun 29, 2024
1 parent 7bb4da6 commit 02a2534
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions esp-hal/src/dma/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,26 +384,34 @@ pub enum DmaPeripheral {
Spi2 = 0,
#[cfg(any(pdma, esp32s3))]
Spi3 = 1,
#[cfg(any(esp32c3, esp32c6, esp32h2))]
#[cfg(any(esp32c2, esp32c3, esp32c6, esp32h2))]
Mem2Mem1 = 1,
#[cfg(any(esp32c3, esp32c6, esp32h2, esp32s3))]
Uhci0 = 2,
#[cfg(esp32c2)]
Mem2Mem2 = 2,
#[cfg(any(esp32, esp32s2, esp32c3, esp32c6, esp32h2, esp32s3))]
I2s0 = 3,
#[cfg(esp32c2)]
Mem2Mem3 = 3,
#[cfg(any(esp32, esp32s3))]
I2s1 = 4,
#[cfg(any(esp32c3, esp32c6, esp32h2))]
#[cfg(any(esp32c2, esp32c3, esp32c6, esp32h2))]
Mem2Mem4 = 4,
#[cfg(esp32s3)]
LcdCam = 5,
#[cfg(any(esp32c3, esp32c6, esp32h2))]
#[cfg(any(esp32c2, esp32c3, esp32c6, esp32h2))]
Mem2Mem5 = 5,
#[cfg(not(esp32c2))]
Aes = 6,
#[cfg(esp32c2)]
Mem2Mem6 = 6,
#[cfg(gdma)]
Sha = 7,
#[cfg(any(esp32c3, esp32c6, esp32h2, esp32s3))]
Adc = 8,
#[cfg(esp32c2)]
Mem2Mem8 = 8,
#[cfg(esp32s3)]
Rmt = 9,
#[cfg(parl_io)]
Expand Down
4 changes: 2 additions & 2 deletions examples/src/bin/dma_mem2mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//% FEATURES: esp-hal/log
//% CHIPS: esp32s3 esp32c3 esp32c6 esp32h2
//% CHIPS: esp32s3 esp32c2 esp32c3 esp32c6 esp32h2

#![no_std]
#![no_main]
Expand All @@ -19,7 +19,7 @@ use esp_hal::{
};
use log::{error, info};

const DATA_SIZE: usize = 1024 * 100;
const DATA_SIZE: usize = 1024 * 10;
#[cfg(feature = "esp32s3")]
const DMA_PERIPHERAL: DmaPeripheral = DmaPeripheral::Adc;
#[cfg(not(feature = "esp32s3"))]
Expand Down

0 comments on commit 02a2534

Please sign in to comment.