Skip to content

Commit

Permalink
Pin fixes for the Camera board (espressif#9021)
Browse files Browse the repository at this point in the history
* update pins

* re-fix pinout that was reverted

* more pins

* Update esp32-hal-tinyusb.c

---------

Co-authored-by: Ha Thach <thach@tinyusb.org>
  • Loading branch information
ladyada and hathach committed Dec 20, 2023
1 parent ad4f0ac commit 9d0274b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
Binary file modified variants/adafruit_camera_esp32s3/bootloader-tinyuf2.bin
Binary file not shown.
15 changes: 6 additions & 9 deletions variants/adafruit_camera_esp32s3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ 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;
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;
Expand All @@ -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
Expand Down
Binary file modified variants/adafruit_camera_esp32s3/tinyuf2.bin
Binary file not shown.
11 changes: 10 additions & 1 deletion variants/adafruit_camera_esp32s3/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Binary file modified variants/adafruit_metro_esp32s3/bootloader-tinyuf2.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion variants/adafruit_metro_esp32s3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified variants/adafruit_metro_esp32s3/tinyuf2.bin
Binary file not shown.
3 changes: 2 additions & 1 deletion variants/adafruit_metro_esp32s3/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9d0274b

Please sign in to comment.