forked from bbulkow/FastLED-idf
Fixed i2s implementation
This commit is contained in:
@ -28,4 +28,5 @@ idf_component_register(
|
|||||||
.
|
.
|
||||||
REQUIRES
|
REQUIRES
|
||||||
arduino-esp32
|
arduino-esp32
|
||||||
|
esp_rom
|
||||||
)
|
)
|
||||||
|
@ -89,11 +89,9 @@
|
|||||||
// This is way too noisy. Is output a LARGE NUMBER of times.
|
// This is way too noisy. Is output a LARGE NUMBER of times.
|
||||||
// #pragma message "NOTE: ESP32 support using I2S parallel driver. All strips must use the same chipset"
|
// #pragma message "NOTE: ESP32 support using I2S parallel driver. All strips must use the same chipset"
|
||||||
|
|
||||||
FASTLED_NAMESPACE_BEGIN
|
//#ifdef __cplusplus
|
||||||
|
//extern "C" {
|
||||||
#ifdef __cplusplus
|
//#endif
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "esp_intr_alloc.h"
|
#include "esp_intr_alloc.h"
|
||||||
@ -107,15 +105,23 @@ extern "C" {
|
|||||||
#include "soc/io_mux_reg.h"
|
#include "soc/io_mux_reg.h"
|
||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
|
#include "driver/i2s.h"
|
||||||
#include "esp32/rom/lldesc.h"
|
#include "esp32/rom/lldesc.h"
|
||||||
|
#include "esp32/rom/gpio.h"
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
|
||||||
#include "clockless_esp32.h"
|
#include "clockless_esp32.h"
|
||||||
|
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
//#ifdef __cplusplus
|
||||||
}
|
//}
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
|
FASTLED_NAMESPACE_BEGIN
|
||||||
|
|
||||||
#define FASTLED_HAS_CLOCKLESS 1
|
#define FASTLED_HAS_CLOCKLESS 1
|
||||||
#define NUM_COLOR_CHANNELS 3
|
#define NUM_COLOR_CHANNELS 3
|
||||||
@ -144,7 +150,7 @@ static int gNumStarted = 0;
|
|||||||
|
|
||||||
// -- Global semaphore for the whole show process
|
// -- Global semaphore for the whole show process
|
||||||
// Semaphore is not given until all data has been sent
|
// Semaphore is not given until all data has been sent
|
||||||
static xSemaphoreHandle gTX_sem = NULL;
|
static SemaphoreHandle_t gTX_sem = NULL;
|
||||||
|
|
||||||
// -- One-time I2S initialization
|
// -- One-time I2S initialization
|
||||||
static bool gInitialized = false;
|
static bool gInitialized = false;
|
||||||
|
Reference in New Issue
Block a user