Created
May 1, 2024 18:17
-
-
Save ji6czd/716d4c7fa548cc6544d0488c32a5c063 to your computer and use it in GitHub Desktop.
Pin definition of SEEED Xiao ESP32C3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (C) 2024 KIRIAKE Masanori <[email protected]> | |
The original of this file is included in the ESP32 Arduino Library. This file | |
has been modified so that the original file can be compiled with ESP-IDF. | |
*/ | |
#ifndef Pins_Arduino_h | |
#define Pins_Arduino_h | |
#include "driver/gpio.h" | |
#define EXTERNAL_NUM_INTERRUPTS 22 | |
#define NUM_DIGITAL_PINS 22 | |
#define NUM_ANALOG_INPUTS 6 | |
#define analogInputToDigitalPin(p) \ | |
(((p) < NUM_ANALOG_INPUTS) ? (analogChannelToDigitalPin(p)) : -1) | |
#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) | |
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) | |
constexpr gpio_num_t TX = GPIO_NUM_21; | |
constexpr gpio_num_t RX = GPIO_Num_20; | |
constexpr gpio_num_t SDA = GPIO_Num_6; | |
constexpr gpio_num_t SCL = GPIO_Num_7; | |
constexpr gpio_num_t SS = GPIO_Num_20; | |
constexpr gpio_num_t MOSI = GPIO_Num_10; | |
constexpr gpio_num_t MISO = GPIO_Num_9; | |
constexpr gpio_num_t SCK = GPIO_Num_8; | |
constexpr gpio_num_t A0 = GPIO_Num_2; | |
constexpr gpio_num_t A1 = GPIO_Num_3; | |
constexpr gpio_num_t A2 = GPIO_Num_4; | |
constexpr gpio_num_t A3 = GPIO_Num_5; | |
constexpr gpio_num_t D0 = GPIO_Num_2; | |
constexpr gpio_num_t D1 = GPIO_Num_3; | |
constexpr gpio_num_t D2 = GPIO_Num_4; | |
constexpr gpio_num_t D3 = GPIO_Num_5; | |
constexpr gpio_num_t D4 = GPIO_Num_6; | |
constexpr gpio_num_t D5 = GPIO_Num_7; | |
constexpr gpio_num_t D6 = GPIO_Num_21; | |
constexpr gpio_num_t D7 = GPIO_Num_20; | |
constexpr gpio_num_t D8 = GPIO_Num_8; | |
constexpr gpio_num_t D9 = GPIO_Num_9; | |
constexpr gpio_num_t D10 = GPIO_Num_10; | |
#endif /* Pins_Arduino_h */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment