Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ab6a25e

Browse files
authoredOct 6, 2023
Master5.1 s3 gpio48 and platform txt review (espressif#8726)
* variants + S3 GPIO48 * fixes unphone8.build.flash_type * fixes unphone8.build.flash_type * heltec board name issue step 1 * heltec board name issue step 2 * fixes defines and new boards * final review
1 parent 709c935 commit ab6a25e

File tree

214 files changed

+557
-1898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+557
-1898
lines changed
 

‎boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23802,7 +23802,7 @@ unphone8.build.partitions=default_8MB
2380223802
unphone8.build.defines=-DBOARD_HAS_PSRAM -DUNPHONE_SPIN=8
2380323803
unphone8.build.loop_core=-DARDUINO_RUNNING_CORE=1
2380423804
unphone8.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
23805-
unphone8.build.flash_type=qspi
23805+
unphone8.build.flash_type=qio
2380623806
unphone8.build.psram_type=qspi
2380723807
unphone8.build.memory_type={build.flash_type}_{build.psram_type}
2380823808

‎cores/esp32/Arduino.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@
129129
#define NOT_AN_INTERRUPT -1
130130
#define NOT_ON_TIMER 0
131131

132+
// some defines generic for all SoC moved from variants/board_name/pins_arduino.h
133+
#define NUM_DIGITAL_PINS SOC_GPIO_PIN_COUNT // All GPIOs
134+
#if SOC_ADC_PERIPH_NUM == 1
135+
#define NUM_ANALOG_INPUTS (SOC_ADC_CHANNEL_NUM(0)) // Depends on the SoC (ESP32C6, ESP32H2, ESP32C2, ESP32P4)
136+
#elif SOC_ADC_PERIPH_NUM == 2
137+
#define NUM_ANALOG_INPUTS (SOC_ADC_CHANNEL_NUM(0)+SOC_ADC_CHANNEL_NUM(1)) // Depends on the SoC (ESP32, ESP32S2, ESP32S3, ESP32C3)
138+
#endif
139+
#define EXTERNAL_NUM_INTERRUPTS NUM_DIGITAL_PINS // All GPIOs
140+
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
141+
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):NOT_AN_INTERRUPT)
142+
#define digitalPinHasPWM(p) ((p)<NUM_DIGITAL_PINS)
143+
132144
typedef bool boolean;
133145
typedef uint8_t byte;
134146
typedef unsigned int word;

0 commit comments

Comments
 (0)
Please sign in to comment.