diff --git a/components/esp32/test/test_ahb_arb.c b/components/esp32/test/test_ahb_arb.c index a4a8f87fd..3b4227927 100644 --- a/components/esp32/test/test_ahb_arb.c +++ b/components/esp32/test/test_ahb_arb.c @@ -5,7 +5,7 @@ #include "esp32/rom/ets_sys.h" #include "esp32/rom/lldesc.h" #include "esp32/rom/gpio.h" - +#include "driver/periph_ctrl.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" @@ -33,8 +33,7 @@ the point where they happened to do what I want. static void lcdIfaceInit(void) { - DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_I2S0_CLK_EN); - DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST); + periph_module_enable(PERIPH_I2S0_MODULE); //Init pins to i2s functions SET_PERI_REG_MASK(GPIO_ENABLE_W1TS_REG, (1 << 11) | (1 << 3) | (1 << 0) | (1 << 2) | (1 << 5) | (1 << 16) | (1 << 17) | (1 << 18) | (1 << 19) | (1 << 20)); //ENABLE GPIO oe_enable diff --git a/components/esp32/test/test_unal_dma.c b/components/esp32/test/test_unal_dma.c index 91c22c6c4..5e07105c9 100644 --- a/components/esp32/test/test_unal_dma.c +++ b/components/esp32/test/test_unal_dma.c @@ -6,7 +6,7 @@ #include "esp32/rom/ets_sys.h" #include "esp32/rom/lldesc.h" #include "esp32/rom/gpio.h" - +#include "driver/periph_ctrl.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" @@ -29,8 +29,7 @@ static volatile lldesc_t dmaDesc[2]; static void dmaMemcpy(void *in, void *out, int len) { volatile int i; - DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_I2S0_CLK_EN); - DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST); + periph_module_enable(PERIPH_I2S0_MODULE); //Init pins to i2s functions SET_PERI_REG_MASK(GPIO_ENABLE_W1TS_REG, (1 << 11) | (1 << 3) | (1 << 0) | (1 << 2) | (1 << 5) | (1 << 16) | (1 << 17) | (1 << 18) | (1 << 19) | (1 << 20)); //ENABLE GPIO oe_enable