Remove ESP32C3 experimental stuff.
ESP32-C3 doesn't actually support 'lcd mode' aka. parallel DMA, so it'll never be of use with this library and a HUB75 panel.
This commit is contained in:
parent
981d067063
commit
dd05550cc5
5 changed files with 25 additions and 42 deletions
|
@ -4,6 +4,12 @@
|
||||||
/* Core ESP32 hardware / idf includes! */
|
/* Core ESP32 hardware / idf includes! */
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/task.h"
|
||||||
|
#include "freertos/semphr.h"
|
||||||
|
#include "freertos/queue.h"
|
||||||
|
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "esp32_i2s_parallel_dma.h"
|
#include "esp32_i2s_parallel_dma.h"
|
||||||
|
|
||||||
|
|
|
@ -14,40 +14,16 @@
|
||||||
// Header
|
// Header
|
||||||
#include "esp32_i2s_parallel_dma.h"
|
#include "esp32_i2s_parallel_dma.h"
|
||||||
|
|
||||||
#if defined(ESP32_ORIG) || defined (ESP32_SXXX)
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#include <esp_err.h>
|
|
||||||
|
|
||||||
// Turn on and off a periphal
|
|
||||||
#include <driver/periph_ctrl.h>
|
|
||||||
|
|
||||||
// GPIO
|
|
||||||
#include <soc/gpio_periph.h>
|
|
||||||
#include <hal/gpio_types.h>
|
|
||||||
#include <driver/gpio.h>
|
#include <driver/gpio.h>
|
||||||
#include <driver/periph_ctrl.h>
|
#include <driver/periph_ctrl.h>
|
||||||
|
|
||||||
#include <rom/gpio.h>
|
#include <rom/gpio.h>
|
||||||
#include <soc/gpio_sig_map.h>
|
#include <soc/gpio_sig_map.h>
|
||||||
|
|
||||||
// DMA Linked List Struct
|
|
||||||
#include <soc/lldesc.h>
|
|
||||||
#include <soc/io_mux_reg.h>
|
|
||||||
|
|
||||||
// I2S
|
|
||||||
#include <soc/i2s_struct.h>
|
|
||||||
#include <soc/i2s_reg.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ESP32_CXXX
|
|
||||||
// GDMA
|
|
||||||
#include <soc/gdma_channel.h>
|
|
||||||
#include <soc/gdma_periph.h>
|
|
||||||
#include <soc/gdma_reg.h>
|
|
||||||
#include <soc/gdma_struct.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For I2S state management.
|
// For I2S state management.
|
||||||
static i2s_parallel_state_t *i2s_state = NULL;
|
static i2s_parallel_state_t *i2s_state = NULL;
|
||||||
|
|
||||||
|
@ -448,6 +424,3 @@ void i2s_parallel_flip_to_buffer(i2s_port_t port, int buffer_id) {
|
||||||
bool i2s_parallel_is_previous_buffer_free() {
|
bool i2s_parallel_is_previous_buffer_free() {
|
||||||
return previousBufferFree;
|
return previousBufferFree;
|
||||||
}
|
}
|
||||||
|
|
||||||
// End ESP32 original / S2, S3 check
|
|
||||||
#endif
|
|
|
@ -13,8 +13,12 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <esp_err.h>
|
#include <stdbool.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <freertos/FreeRTOS.h>
|
||||||
#include <driver/i2s.h>
|
#include <driver/i2s.h>
|
||||||
|
#include <esp_err.h>
|
||||||
#include <rom/lldesc.h>
|
#include <rom/lldesc.h>
|
||||||
|
|
||||||
// Get MCU Type and Max CLK Hz for MCU
|
// Get MCU Type and Max CLK Hz for MCU
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* Author: Mrfaptastic @ https://github.com/mrfaptastic/
|
* Author: Mrfaptastic @ https://github.com/mrfaptastic/
|
||||||
*
|
*
|
||||||
* Description: Multi-ESP32 product DMA setup functions for ESP32 C3/H2 RISC-V chips
|
* Description: Multi-ESP32 product DMA setup functions for ESP32 C3/H2 RISC-V chips
|
||||||
|
*
|
||||||
|
* ESP32C series doesn't support LCD mode / parallel DMA!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,17 +10,10 @@
|
||||||
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
||||||
|
|
||||||
#define ESP32_SXXX 1
|
#define ESP32_SXXX 1
|
||||||
|
|
||||||
#define I2S_PARALLEL_CLOCK_HZ 160000000L
|
#define I2S_PARALLEL_CLOCK_HZ 160000000L
|
||||||
#define DMA_MAX (4096-4)
|
#define DMA_MAX (4096-4)
|
||||||
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32H2
|
|
||||||
|
|
||||||
#define ESP32_CXXX 1
|
|
||||||
|
|
||||||
#define I2S_PARALLEL_CLOCK_HZ 160000000L
|
|
||||||
#define DMA_MAX (4096-4)
|
|
||||||
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32 || defined(ESP32)
|
#elif CONFIG_IDF_TARGET_ESP32 || defined(ESP32)
|
||||||
|
|
||||||
// 2016 model that started it all, and this library. The best.
|
// 2016 model that started it all, and this library. The best.
|
||||||
|
@ -29,7 +22,12 @@
|
||||||
#define I2S_PARALLEL_CLOCK_HZ 80000000L
|
#define I2S_PARALLEL_CLOCK_HZ 80000000L
|
||||||
#define DMA_MAX (4096-4)
|
#define DMA_MAX (4096-4)
|
||||||
|
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32H2
|
||||||
|
|
||||||
|
#error "ESPC-series RISC-V MCU's do not support parallel DMA and not supported by this library!"
|
||||||
|
#define ESP32_CXXX 1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "No ESP32 or ESP32 Espressif IDF compile-time defines detected. WTH!?"
|
#error "ERROR: No ESP32 or ESP32 Espressif IDF detected at compile time."
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in a new issue