Loading...
Searching...
No Matches
board.h File Reference

Board definitions for the Adafruit Metro ESP32-S2 board. More...

Detailed Description

Board definitions for the Adafruit Metro ESP32-S2 board.

The board definitions in this file are valid for the Adafruit Metro ESP32-S2 board.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file board.h.

#include <stdint.h>
#include "board_common.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Button pin definitions

#define BTN0_PIN   GPIO0
 Default button GPIO pin definition.
 
#define BTN0_MODE   GPIO_IN_PU
 Default button GPIO mode definition.
 
#define BTN0_INT_FLANK   GPIO_FALLING
 Default interrupt flank definition for the button GPIO.
 
#define BUTTON0_PIN   BTN0_PIN
 Definition for compatibility with previous versions.
 

LED (on-board) configuration

The red LED is connected to GPIO42, which is also available as Arduino pin D13.

Furthermore, the board has a NeoPixel smart RGB-LED connected to GPIO45. The WS281x driver module ws281x can be used to control it.

#define LED0_PIN   GPIO42
 red LED is connected to GPIO42
 
#define LED0_ACTIVE   1
 LED is high active.
 
#define WS281X_PARAM_PIN   (GPIO45)
 GPIO pin connected to the data pin.
 
#define WS281X_PARAM_NUMOF   (1U)
 Number of LEDs chained.
 

Macro Definition Documentation

◆ BTN0_INT_FLANK

#define BTN0_INT_FLANK   GPIO_FALLING

Default interrupt flank definition for the button GPIO.

Definition at line 45 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Default button GPIO mode definition.

Definition at line 39 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO0

Default button GPIO pin definition.

The Adafruit Metro ESP32-S2 board has a BOOT button connected to GPIO0, which can be used as button during normal operation. The GPIO0 pin has a pull-up resistor and the button is low-active.

Definition at line 34 of file board.h.

◆ BUTTON0_PIN

#define BUTTON0_PIN   BTN0_PIN

Definition for compatibility with previous versions.

Definition at line 51 of file board.h.

◆ LED0_ACTIVE

#define LED0_ACTIVE   1

LED is high active.

Definition at line 66 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO42

red LED is connected to GPIO42

Definition at line 65 of file board.h.

◆ WS281X_PARAM_NUMOF

#define WS281X_PARAM_NUMOF   (1U)

Number of LEDs chained.

Definition at line 72 of file board.h.

◆ WS281X_PARAM_PIN

#define WS281X_PARAM_PIN   (GPIO45)

GPIO pin connected to the data pin.

Definition at line 69 of file board.h.