Update ESP32-HUB75-MatrixPanel-I2S-DMA.h
This commit is contained in:
parent
6f8d9c0fa2
commit
f2b77d95b1
1 changed files with 59 additions and 38 deletions
|
@ -1,5 +1,18 @@
|
|||
#ifndef _ESP32_RGB_64_32_MATRIX_PANEL_I2S_DMA
|
||||
#define _ESP32_RGB_64_32_MATRIX_PANEL_I2S_DMA
|
||||
/***************************************************************************************/
|
||||
/* Core ESP32 hardware / idf includes! */
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp32_i2s_parallel_dma.h"
|
||||
|
||||
#ifdef USE_GFX_ROOT
|
||||
#include <FastLED.h>
|
||||
#include "GFX.h" // Adafruit GFX core class -> https://github.com/mrfaptastic/GFX_Root
|
||||
#elif !defined NO_GFX
|
||||
#include "Adafruit_GFX.h" // Adafruit class with all the other stuff
|
||||
#endif
|
||||
|
||||
/*******************************************************************************************
|
||||
* COMPILE-TIME OPTIONS - MUST BE PROVIDED as part of PlatformIO project build_flags. *
|
||||
|
@ -46,6 +59,26 @@
|
|||
/* ESP32 Default Pin definition. You can change this, but best if you keep it as is and provide custom pin mappings
|
||||
* as part of the begin(...) function.
|
||||
*/
|
||||
|
||||
#ifdef ESP32_SXXX
|
||||
|
||||
#define R1_PIN_DEFAULT 45
|
||||
#define G1_PIN_DEFAULT 42
|
||||
#define B1_PIN_DEFAULT 41
|
||||
#define R2_PIN_DEFAULT 40
|
||||
#define G2_PIN_DEFAULT 39
|
||||
#define B2_PIN_DEFAULT 38
|
||||
#define A_PIN_DEFAULT 37
|
||||
#define B_PIN_DEFAULT 36
|
||||
#define C_PIN_DEFAULT 35
|
||||
#define D_PIN_DEFAULT 34
|
||||
#define E_PIN_DEFAULT -1 // required for 1/32 scan panels, like 64x64. Any available pin would do, i.e. IO32
|
||||
#define LAT_PIN_DEFAULT 26
|
||||
#define OE_PIN_DEFAULT 21
|
||||
#define CLK_PIN_DEFAULT 33
|
||||
|
||||
#else
|
||||
|
||||
#define R1_PIN_DEFAULT 25
|
||||
#define G1_PIN_DEFAULT 26
|
||||
#define B1_PIN_DEFAULT 27
|
||||
|
@ -63,6 +96,8 @@
|
|||
#define OE_PIN_DEFAULT 15
|
||||
#define CLK_PIN_DEFAULT 16
|
||||
|
||||
#endif
|
||||
|
||||
// Interesting Fact: We end up using a uint16_t to send data in parallel to the HUB75... but
|
||||
// given we only map to 14 physical output wires/bits, we waste 2 bits.
|
||||
|
||||
|
@ -84,20 +119,6 @@
|
|||
|
||||
// #define NO_CIE1931
|
||||
|
||||
/***************************************************************************************/
|
||||
/* Core ESP32 hardware / idf includes! */
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp32_i2s_parallel_dma.h"
|
||||
|
||||
#ifdef USE_GFX_ROOT
|
||||
#include <FastLED.h>
|
||||
#include "GFX.h" // Adafruit GFX core class -> https://github.com/mrfaptastic/GFX_Root
|
||||
#elif !defined NO_GFX
|
||||
#include "Adafruit_GFX.h" // Adafruit class with all the other stuff
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************************/
|
||||
/* Definitions below should NOT be ever changed without rewriting library logic */
|
||||
|
|
Loading…
Reference in a new issue