Skip to content

Commit 989453d

Browse files
authored
Add CodeCell ESP32C3 variant folder
feat(variants): Add CodeCell ESP32C3 variant folder Added the `codecell` folder to the `arduino-esp32/variants` directory to support the CodeCell ESP32C3 board. This folder includes the necessary pin mappings and configuration files.
1 parent a7399e2 commit 989453d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

variants/CodeCell/pins_arduino.h

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
#define EXTERNAL_NUM_INTERRUPTS 22
8+
#define NUM_DIGITAL_PINS 22
9+
#define NUM_ANALOG_INPUTS 6
10+
11+
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
12+
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
13+
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)
14+
15+
static const uint8_t TX = 21;
16+
static const uint8_t RX = 20;
17+
18+
static const uint8_t SDA = 8;
19+
static const uint8_t SCL = 9;
20+
21+
static const uint8_t SS = 7;
22+
static const uint8_t MOSI = 6;
23+
static const uint8_t MISO = 5;
24+
static const uint8_t SCK = 4;
25+
26+
static const uint8_t A0 = 0;
27+
static const uint8_t A1 = 1;
28+
static const uint8_t A2 = 2;
29+
static const uint8_t A3 = 3;
30+
static const uint8_t A4 = 4;
31+
static const uint8_t A5 = 5;
32+
33+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)