Skip to content

Commit f4db16b

Browse files
committed
some defs
1 parent f3b64a2 commit f4db16b

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

definitions.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11

2-
//
2+
// ESP32
33
// SPI MOSI MISO SCLK CS
44
// VSPI GPIO 23 GPIO 19 GPIO 18 GPIO 5
55
// HSPI GPIO 13 GPIO 12 GPIO 14 GPIO 15
6+
// setSpiPin(14, 12, 13, 15);
67

78
#define ESP32BASICUSB
89

@@ -18,6 +19,28 @@ typedef enum {
1819
BUTTON1 = 0,
1920
SPIBUS = 2,
2021
} PIN_DEFS;
22+
#elif defined(ESP32BASICS3)
23+
24+
// Controller SPI0 is reserved for caching external memories like Flash
25+
// Controller SPI1 is reserved for external memories like PSRAM
26+
// Controller SPI2 can be used as general purpose SPI (GPSPI) - SPI2_HOST (also called FSPI or HSPI)
27+
// Controller SPI3 can be used as general purpose SPI (GPSPI) - SPI3_HOST (also called VSPI)
28+
29+
typedef enum {
30+
INDLEDPIN = 19,
31+
INDLEDISRGBW = 1,
32+
IOE1 = 32,
33+
IOE2 = 33,
34+
IOE3 = 36, // ADC
35+
IOE4 = 39, // ADC
36+
ADCEX = 27,
37+
BUTTON1 = 0,
38+
SPIBUS = 2,
39+
SPIIOCLK = 13,
40+
SPIIOMISO = 12,
41+
SPIIOMOSI = 11,
42+
SPIIOCS0 = 10,
43+
} PIN_DEFS;
2144
#else
2245
typedef enum {
2346
INDLEDPIN = 19,

neoindicator.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ uint32_t indColor; // save color
5454
void init_indicator(uint16_t pin){
5555
// Adafruit_NeoPixel
5656
// strip = ind;
57+
Serial.println("[NEIND] init pin# " + (String)pin);
5758
ind.setPin(pin);
5859
ind.setBrightness(100);
5960
ind.updateLength(INDNUMPIXELS);
@@ -100,7 +101,8 @@ void indSetColor(uint32_t c){
100101
if(DEBUG_neoind)Serial.println("[IND] set ind color:" + (String)c);
101102
// debugColor(c);
102103
uint32_t color = ColorRGBA(red(c),green(c),blue(c),INDBRIGHTNESS);
103-
ind.setPixelColor( 0, color );
104+
// ind.setPixelColor( 0, color );
105+
ind.fill(color);
104106
if(INDPINRESET) digitalWrite(ind.getPin(),HIGH); // reset
105107
#ifdef ESP32
106108
if(noInterrupts) portDISABLE_INTERRUPTS();

0 commit comments

Comments
 (0)