Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e5f3fd2
boards/esp32c3-devkit: solve conflicts in PWM configuration
gschorcht May 12, 2025
c97b1e7
boards/esp32c3-devkit: completion of Arduino I/O mapping
gschorcht May 12, 2025
e6e0178
boards/esp32c3-wemos-mini: small PWM config update
gschorcht May 12, 2025
41cd8b0
boards/esp32c3-wemos-mini: completion of Arduino I/O mapping
gschorcht May 12, 2025
3961f2a
boards/esp32-wroom-32: completion of Arduino I/O mapping
gschorcht May 12, 2025
c5baceb
boards/esp32-wrover-kit: fix definition of LED2_PIN
gschorcht May 12, 2025
ba24513
boards/esp32-wrover-kit: completion of Arduino I/O mapping
gschorcht May 12, 2025
b369e84
boards/esp32-wemos-lolin-d32-pro: completion of Arduino I/O mapping
gschorcht May 12, 2025
1a7a7a9
boards/esp32s3-devkit: completion of Arduino I/O mapping
gschorcht May 12, 2025
34cb0b9
boards/esp32s2-devkit: completion of Arduino I/O mapping
gschorcht May 12, 2025
1a03073
boards/esp32s2-lilygo-ttgo-t8: completion of Arduino I/O mapping
gschorcht May 12, 2025
859bb75
boards/esp32-mh-et-live-minikit: completion of Arduino I/O mapping
gschorcht May 12, 2025
1c2ce8d
boards/esp32s3-pros3: completion of Arduino I/O mapping
gschorcht May 12, 2025
cd226a8
boards/esp32-heltec-lora32-v2: small PWM config fix
gschorcht May 12, 2025
02b8b05
boards/esp32-heltec-lora32-v2: completion of Arduino I/O mapping
gschorcht May 12, 2025
2e5a334
boards/esp32-ttgo-t-beam: small ADC channel config change
gschorcht May 12, 2025
d29129f
boards/esp32-ttgo-t-beam: completion of Arduino I/O mapping
gschorcht May 12, 2025
eb2a0f1
boards/esp32-olimex-evb: completion of Arduino I/O mapping
gschorcht May 12, 2025
85d65aa
boards/common/esp32x: cleanup Arduino leftover
gschorcht May 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions boards/common/esp32x/include/arduino_board_common.h

This file was deleted.

5 changes: 5 additions & 0 deletions boards/esp32-heltec-lora32-v2/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += esp_rtc_timer_32k

FEATURES_PROVIDED += arduino_analog
FEATURES_PROVIDED += arduino_i2c
FEATURES_PROVIDED += arduino_pins
FEATURES_PROVIDED += arduino_pwm
FEATURES_PROVIDED += arduino_spi
FEATURES_PROVIDED += arduino_uart
4 changes: 2 additions & 2 deletions boards/esp32-heltec-lora32-v2/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ BTN0 | GPIO0 | low active | |
LED0 | GPIO25 | high active | |
ADC | GPIO36, GPIO39, GPIO37, GPIO38,\n GPIO0, GPIO2, GPIO12, GPIO13,\n GPIO4, GPIO15 | | \ref esp32_adc_channels "ADC Channels"
DAC | | | \ref esp32_dac_channels "DAC Channels"
PWM_DEV(0) | GPIO25, GPIO0, GPIO2, GPIO17 | | \ref esp32_pwm_channels "PWM Channels"
PWM_DEV(0) | GPIO25, GPIO2, GPIO17 | | \ref esp32_pwm_channels "PWM Channels"
PWM_DEV(1) | GPIO22, GPIO23 | | \ref esp32_pwm_channels "PWM Channels"
I2C_DEV(0):SDA | GPIO4 | | \ref esp32_i2c_interfaces "I2C Interfaces"
I2C_DEV(0):SCL | GPIO15 | I2C_SPEED_FAST is used | \ref esp32_i2c_interfaces "I2C Interfaces"
Expand Down Expand Up @@ -220,7 +220,7 @@ The corresponding board schematics can be found [here for SX1276 version](https:
and [here for SX1278 version](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WiFi_LoRa_32(V2)/WiFi_LoRa_32_V2(433%2C470-510).PDF).

\anchor esp32_heltec_lora_32_v2_pinout_img
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Heltec_WiFi_LoRa_32_V2_pinout.png" "WiFi LoRa 32 V2 Pintout Diagram"
@image html "https://gitlab.com/gschorcht/RIOT.wiki-Images/raw/master/esp32/Heltec_WiFi_LoRa_32_V2_pinout_v2.png" "WiFi LoRa 32 V2 Pintout Diagram"

[Back to table of contents](#esp32_heltec_lora32_v2_toc)

Expand Down
80 changes: 59 additions & 21 deletions boards/esp32-heltec-lora32-v2/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,40 @@
extern "C" {
#endif

#define ARDUINO_UART_D0D1 UART_DEV(0) /**< Arduino UART interface */
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0) /**< Arduino SPI bus */

#define ARDUINO_LED (3) /**< LED is connected to Arduino pin 3 */

/**
* @name Mapping of MCU pins to Arduino pins
* @{
*/
#define ARDUINO_PIN_0 GPIO3 /**< Arduino pin 0 (RxD) */
#define ARDUINO_PIN_1 GPIO1 /**< Arduino pin 1 (TxD) */

#define ARDUINO_PIN_2 GPIO12 /**< Arduino pin 2 */
#define ARDUINO_PIN_3 GPIO25 /**< Arduino pin 3 (PWM) */
#define ARDUINO_PIN_4 GPIO13 /**< Arduino pin 4 */
#define ARDUINO_PIN_5 GPIO0 /**< Arduino pin 5 (PWM) */
#define ARDUINO_PIN_2 GPIO0 /**< Arduino pin 2 (BTN0) */
#define ARDUINO_PIN_3 GPIO25 /**< Arduino pin 3 (PWM / LED) */
#define ARDUINO_PIN_4 GPIO12 /**< Arduino pin 4 */
#define ARDUINO_PIN_5 GPIO17 /**< Arduino pin 5 (PWM) */
#define ARDUINO_PIN_6 GPIO2 /**< Arduino pin 6 (PWM) */
#define ARDUINO_PIN_7 GPIO22 /**< Arduino pin 7 */
#define ARDUINO_PIN_8 GPIO23 /**< Arduino pin 8 */
#define ARDUINO_PIN_9 GPIO17 /**< Arduino pin 9 (PWM) */
#define ARDUINO_PIN_9 GPIO13 /**< Arduino pin 7 */
#define ARDUINO_PIN_7 GPIO22 /**< Arduino pin 8 (PWM) */
#define ARDUINO_PIN_8 GPIO23 /**< Arduino pin 9 (PWM) */

#define ARDUINO_PIN_10 GPIO18 /**< Arduino pin 10 (CS0 / PWM) */
#define ARDUINO_PIN_11 GPIO27 /**< Arduino pin 11 (MOSI / PWM) */
#define ARDUINO_PIN_10 GPIO18 /**< Arduino pin 10 (CS0) */
#define ARDUINO_PIN_11 GPIO27 /**< Arduino pin 11 (MOSI) */
#define ARDUINO_PIN_12 GPIO19 /**< Arduino pin 12 (MISO) */
#define ARDUINO_PIN_13 GPIO5 /**< Arduino pin 13 (SCK) */

/* analog pins as digital pin: */
#define ARDUINO_PIN_14 GPIO36 /**< Arduino pin A0 */
#define ARDUINO_PIN_15 GPIO39 /**< Arduino pin A1 */
#define ARDUINO_PIN_16 GPIO37 /**< Arduino pin A2 */
#define ARDUINO_PIN_17 GPIO38 /**< Arduino pin A3 */
#define ARDUINO_PIN_14 GPIO36 /**< Arduino pin 14 (A0) */
#define ARDUINO_PIN_15 GPIO39 /**< Arduino pin 15 (A1) */
#define ARDUINO_PIN_16 GPIO37 /**< Arduino pin 16 (A2) */
#define ARDUINO_PIN_17 GPIO38 /**< Arduino pin 17 (A3) */

#define ARDUINO_PIN_18 GPIO4 /**< Arduino pin A4 (SDA) */
#define ARDUINO_PIN_19 GPIO15 /**< Arduino pin A5 (SCL) */
#define ARDUINO_PIN_18 GPIO4 /**< Arduino pin 18 (A4 / SDA) */
#define ARDUINO_PIN_19 GPIO15 /**< Arduino pin 19 (A5 / SCL) */

#define ARDUINO_PIN_LAST 19
/** @} */
Expand All @@ -63,13 +68,46 @@ extern "C" {
* @name Aliases for analog pins
* @{
*/
#define ARDUINO_PIN_A0 ARDUINO_PIN_14
#define ARDUINO_PIN_A1 ARDUINO_PIN_15
#define ARDUINO_PIN_A2 ARDUINO_PIN_16
#define ARDUINO_PIN_A3 ARDUINO_PIN_17
#define ARDUINO_PIN_A0 ARDUINO_PIN_14 /**< Arduino pin A0 */
#define ARDUINO_PIN_A1 ARDUINO_PIN_15 /**< Arduino pin A1 */
#define ARDUINO_PIN_A2 ARDUINO_PIN_16 /**< Arduino pin A2 */
#define ARDUINO_PIN_A3 ARDUINO_PIN_17 /**< Arduino pin A3 */
#define ARDUINO_PIN_A4 ARDUINO_PIN_18 /**< Arduino pin A4 */
#define ARDUINO_PIN_A5 ARDUINO_PIN_19 /**< Arduino pin A5 */
/** @} */

/**
* @name Mapping of Arduino analog pins to RIOT ADC lines
* @{
*/
#define ARDUINO_A0 ADC_LINE(0) /**< ADC line for Arduino pin A0 */
#define ARDUINO_A1 ADC_LINE(1) /**< ADC line for Arduino pin A1 */
#define ARDUINO_A2 ADC_LINE(2) /**< ADC line for Arduino pin A2 */
#define ARDUINO_A3 ADC_LINE(3) /**< ADC line for Arduino pin A3 */
#define ARDUINO_A4 ADC_LINE(8) /**< ADC line for Arduino pin A4 */
#define ARDUINO_A5 ADC_LINE(9) /**< ADC line for Arduino pin A5 */

#define ARDUINO_ANALOG_PIN_LAST 5 /**< Last Arduino analog pin index */
/** @} */

/**
* @name Mapping of Arduino pins to RIOT PWM dev and channel pairs
* @{
*/
#define ARDUINO_PIN_3_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 3 */
#define ARDUINO_PIN_3_PWM_CHAN 0 /**< PWM channel for Arduino pin 3 */

#define ARDUINO_PIN_5_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 5 */
#define ARDUINO_PIN_5_PWM_CHAN 1 /**< PWM channel for Arduino pin 5 */

#define ARDUINO_PIN_6_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 6 */
#define ARDUINO_PIN_6_PWM_CHAN 2 /**< PWM channel for Arduino pin 6 */

#define ARDUINO_PIN_8_PWM_DEV PWM_DEV(1) /**< PWM device for Arduino pin 8 */
#define ARDUINO_PIN_8_PWM_CHAN 0 /**< PWM channel for Arduino pin 8 */

#define ARDUINO_PIN_A4 ARDUINO_PIN_18
#define ARDUINO_PIN_A5 ARDUINO_PIN_19
#define ARDUINO_PIN_9_PWM_DEV PWM_DEV(1) /**< PWM device for Arduino pin 9 */
#define ARDUINO_PIN_9_PWM_CHAN 1 /**< PWM channel for Arduino pin 9 */
/** @} */

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion boards/esp32-heltec-lora32-v2/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
*/
/** PWM channels for device PWM_DEV(0) */
#ifndef PWM0_GPIOS
#define PWM0_GPIOS { GPIO25, GPIO0, GPIO2, GPIO17 }
#define PWM0_GPIOS { GPIO25, GPIO17, GPIO2 }
#endif

/** PWM_DEV(1) is not used */
Expand Down Expand Up @@ -161,7 +161,7 @@
#endif
#else
#warning Configuration problem: Flash mode is qio or qout, \
GPIO9 and GPIO10 are not available for UART1 as configured

Check warning on line 164 in boards/esp32-heltec-lora32-v2/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

keyword 'for' not followed by a single space
#endif
/** @} */

Expand Down
6 changes: 6 additions & 0 deletions boards/esp32-mh-et-live-minikit/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi

FEATURES_PROVIDED += arduino_analog
FEATURES_PROVIDED += arduino_dac
FEATURES_PROVIDED += arduino_i2c
FEATURES_PROVIDED += arduino_pins
FEATURES_PROVIDED += arduino_pwm
FEATURES_PROVIDED += arduino_spi
FEATURES_PROVIDED += arduino_uart
77 changes: 60 additions & 17 deletions boards/esp32-mh-et-live-minikit/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
extern "C" {
#endif

#define ARDUINO_UART_D0D1 UART_DEV(0) /**< Arduino UART interface */
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0) /**< Arduino SPI bus */

#define ARDUINO_LED (3) /**< LED is connected to Arduino pin 3 */

/**
* @name Mapping of MCU pins to Arduino pins
* @{
Expand All @@ -34,27 +39,28 @@ extern "C" {
#define ARDUINO_PIN_1 GPIO1 /**< Arduino pin 1 (TxD) */

#define ARDUINO_PIN_2 GPIO32 /**< Arduino pin 2 */
#define ARDUINO_PIN_3 GPIO2 /**< Arduino pin 3 (PWM) */
#define ARDUINO_PIN_3 GPIO2 /**< Arduino pin 3 (PWM / LED0) */
#define ARDUINO_PIN_4 GPIO27 /**< Arduino pin 4 */
#define ARDUINO_PIN_5 GPIO0 /**< Arduino pin 5 (PWM) */
#define ARDUINO_PIN_6 GPIO4 /**< Arduino pin 6 (PWM) */
#define ARDUINO_PIN_7 GPIO33 /**< Arduino pin 7 */
#define ARDUINO_PIN_8 GPIO25 /**< Arduino pin 8 */
#define ARDUINO_PIN_8 GPIO25 /**< Arduino pin 8 (DAC0) */
#define ARDUINO_PIN_9 GPIO15 /**< Arduino pin 9 (PWM) */

#define ARDUINO_PIN_10 GPIO5 /**< Arduino pin 10 (CS0 / PWM) */
#define ARDUINO_PIN_11 GPIO23 /**< Arduino pin 11 (MOSI / PWM) */
#define ARDUINO_PIN_10 GPIO5 /**< Arduino pin 10 (CS0 / SD Card) */
#define ARDUINO_PIN_11 GPIO23 /**< Arduino pin 11 (MOSI) */
#define ARDUINO_PIN_12 GPIO19 /**< Arduino pin 12 (MISO) */
#define ARDUINO_PIN_13 GPIO18 /**< Arduino pin 13 (SCK) */
#define ARDUINO_PIN_13 GPIO18 /**< Arduino pin 13 (SCK) */

/* analog pins as digital pin: */
#define ARDUINO_PIN_14 GPIO34 /**< Arduino pin A0 */
#define ARDUINO_PIN_15 GPIO35 /**< Arduino pin A1 */
#define ARDUINO_PIN_16 GPIO36 /**< Arduino pin A2 */
#define ARDUINO_PIN_17 GPIO39 /**< Arduino pin A3 */
#define ARDUINO_PIN_14 GPIO34 /**< Arduino pin 14 (A0) */
#define ARDUINO_PIN_15 GPIO35 /**< Arduino pin 15 (A1) */
#define ARDUINO_PIN_16 GPIO36 /**< Arduino pin 16 (A2) */
#define ARDUINO_PIN_17 GPIO39 /**< Arduino pin 17 (A3) */

#define ARDUINO_PIN_18 GPIO21 /**< Arduino pin A4 (SDA) */
#define ARDUINO_PIN_19 GPIO22 /**< Arduino pin A5 (SCL) */
/* Arduino Uno IC2 pins */
#define ARDUINO_PIN_18 GPIO21 /**< Arduino pin 18 (SDA) */
#define ARDUINO_PIN_19 GPIO22 /**< Arduino pin 19 (SCL) */

#define ARDUINO_PIN_LAST 19
/** @} */
Expand All @@ -63,13 +69,50 @@ extern "C" {
* @name Aliases for analog pins
* @{
*/
#define ARDUINO_PIN_A0 ARDUINO_PIN_14
#define ARDUINO_PIN_A1 ARDUINO_PIN_15
#define ARDUINO_PIN_A2 ARDUINO_PIN_16
#define ARDUINO_PIN_A3 ARDUINO_PIN_17
#define ARDUINO_PIN_A0 ARDUINO_PIN_14 /**< Arduino pin A0 */
#define ARDUINO_PIN_A1 ARDUINO_PIN_15 /**< Arduino pin A1 */
#define ARDUINO_PIN_A2 ARDUINO_PIN_16 /**< Arduino pin A2 */
#define ARDUINO_PIN_A3 ARDUINO_PIN_17 /**< Arduino pin A3 */

#define ARDUINO_PIN_DAC0 ARDUINO_PIN_8 /**< Arduino pin DAC0 */
/** @} */

/**
* @name Mapping of Arduino analog pins to RIOT ADC lines
* @{
*/
#define ARDUINO_A0 ADC_LINE(7) /**< ADC line for Arduino pin A0 */
#define ARDUINO_A1 ADC_LINE(8) /**< ADC line for Arduino pin A1 */
#define ARDUINO_A2 ADC_LINE(2) /**< ADC line for Arduino pin A2 */
#define ARDUINO_A3 ADC_LINE(6) /**< ADC line for Arduino pin A3 */

#define ARDUINO_ANALOG_PIN_LAST 3 /**< Last Arduino analog pin index */
/** @} */

/**
* @name Mapping of Arduino DAC pins to RIOT DAC lines
* @{
*/
#define ARDUINO_DAC0 DAC_LINE(0) /**< DAC line for Arduino pin DAC0 */

#define ARDUINO_DAC_PIN_LAST 0 /**< Last Arduino DAC pin index */
/** @} */

/**
* @name Mapping of Arduino pins to RIOT PWM dev and channel pairs
* @{
*/
#define ARDUINO_PIN_3_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 3 */
#define ARDUINO_PIN_3_PWM_CHAN 0 /**< PWM channel for Arduino pin 3 */

#define ARDUINO_PIN_5_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 5 */
#define ARDUINO_PIN_5_PWM_CHAN 1 /**< PWM channel for Arduino pin 5 */

#define ARDUINO_PIN_6_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 6 */
#define ARDUINO_PIN_6_PWM_CHAN 2 /**< PWM channel for Arduino pin 6 */

#define ARDUINO_PIN_A4 ARDUINO_PIN_18
#define ARDUINO_PIN_A5 ARDUINO_PIN_19
#define ARDUINO_PIN_9_PWM_DEV PWM_DEV(0) /**< PWM device for Arduino pin 9 */
#define ARDUINO_PIN_9_PWM_CHAN 3 /**< PWM channel for Arduino pin 9 */
/** @} */

#ifdef __cplusplus
Expand Down
6 changes: 6 additions & 0 deletions boards/esp32-olimex-evb/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ FEATURES_CONFLICT_MSG += "SD/MMC and SPI cannot be used at the same time on this
FEATURES_PROVIDED += periph_can # CAN peripheral interface
FEATURES_PROVIDED += periph_eth # Ethernet MAC (EMAC)

ifneq (,$(filter olimex_esp32_gateway,$(USEMODULE)))
FEATURES_PROVIDED += arduino_analog
endif
FEATURES_PROVIDED += arduino_i2c
FEATURES_PROVIDED += arduino_pins
FEATURES_PROVIDED += arduino_spi
FEATURES_PROVIDED += arduino_uart
Loading
Loading