Compare commits

...

4 commits

Author SHA1 Message Date
Ha Thach
b03028c830
Update esp32-hal-tinyusb.c 2023-11-14 10:07:14 +07:00
ladyada
9398e481cc more pins 2023-11-04 00:41:49 -04:00
ladyada
7decacfe24 re-fix pinout that was reverted 2023-11-04 00:36:21 -04:00
ladyada
2fa396f497 update pins 2023-10-28 19:06:58 -04:00
9 changed files with 28 additions and 16 deletions

View file

@ -61,7 +61,12 @@ typedef struct {
static bool usb_otg_deinit(void * busptr) {
// Once USB OTG is initialized, its GPIOs are assigned and it shall never be deinited
// except when S3 swithicng usb from cdc to jtag while resetting to bootrom
#if CONFIG_IDF_TARGET_ESP32S3
return true;
#else
return false;
#endif
}
static void configure_pins(usb_hal_context_t *usb)

View file

@ -24,7 +24,7 @@ static const uint8_t LED_BUILTIN = PIN_NEOPIXEL+SOC_GPIO_PIN_COUNT;
#define RGB_BRIGHTNESS 64
//static const uint8_t TFT_BACKLIGHT = 41;
static const uint8_t TFT_BACKLIGHT = 45;
static const uint8_t TFT_DC = 40;
static const uint8_t TFT_CS = 39;
static const uint8_t TFT_RESET = 38;
@ -32,10 +32,10 @@ static const uint8_t TFT_RST = 38;
static const uint8_t SD_CS = 48;
static const uint8_t SD_CHIP_SELECT = 48;
static const uint8_t SPEAKER = 41;
static const uint8_t SPEAKER = 46;
static const uint8_t SDA = 33;
static const uint8_t SCL = 34;
static const uint8_t SCL = 33;
static const uint8_t SDA = 34;
static const uint8_t SS = 48;
static const uint8_t MOSI = 35;
@ -55,19 +55,16 @@ static const uint8_t DAC2 = 18;
#define AWEXP_SPKR_SD 0
#define AWEXP_BUTTON_SEL 1
#define AWEXP_BACKLIGHT 2
#define AWEXP_CAM_PWDN 7
#define AWEXP_SD_DET 8
#define AWEXP_SD_PWR 9
#define AWEXP_CAM_RST 10
#define AWEXP_BUTTON_OK 11
#define AWEXP_BUTTON_RIGHT 12
#define AWEXP_BUTTON_UP 13
#define AWEXP_BUTTON_LEFT 14
#define AWEXP_BUTTON_DOWN 15
#define PWDN_GPIO_NUM -1 // connected through expander
#define RESET_GPIO_NUM -1 // connected through expander
#define RESET_GPIO_NUM 47
#define PWDN_GPIO_NUM 21
#define XCLK_GPIO_NUM 8
#define SIOD_GPIO_NUM SDA
#define SIOC_GPIO_NUM SCL

View file

@ -31,6 +31,15 @@ extern "C" {
// Initialize variant/board, called before setup()
void initVariant(void)
{
pinMode(TFT_BACKLIGHT, OUTPUT);
digitalWrite(TFT_BACKLIGHT, LOW);
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
pinMode(TFT_CS, OUTPUT);
digitalWrite(TFT_CS, HIGH);
pinMode(TFT_RESET, OUTPUT);
digitalWrite(TFT_RESET, LOW);
delay(1);
digitalWrite(TFT_RESET, HIGH);
}
}

View file

@ -14,7 +14,7 @@
#define BUILTIN_LED LED_BUILTIN // backward compatibility
// Neopixel
#define PIN_NEOPIXEL 45
#define PIN_NEOPIXEL 46
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
#define RGB_BUILTIN (PIN_NEOPIXEL+SOC_GPIO_PIN_COUNT)
#define RGB_BRIGHTNESS 64
@ -31,10 +31,10 @@ static const uint8_t RX = 41;
static const uint8_t SDA = 47;
static const uint8_t SCL = 48;
static const uint8_t SS = 21;
static const uint8_t MOSI = 35;
static const uint8_t SCK = 36;
static const uint8_t MISO = 37;
static const uint8_t SS = 45;
static const uint8_t MOSI = 42;
static const uint8_t SCK = 39;
static const uint8_t MISO = 21;
static const uint8_t A0 = 14;
static const uint8_t A1 = 15;

View file

@ -30,7 +30,8 @@ extern "C" {
// Initialize variant/board, called before setup()
void initVariant(void) {
// default SD_CS to input pullup
// default SD_CS to input pullup (we cannot have built in pullup since its
// a strapping pin!)
pinMode(SS, INPUT_PULLUP);
}