Pin fixes for the Camera board (#9021)

* update pins

* re-fix pinout that was reverted

* more pins

* Update esp32-hal-tinyusb.c

---------

Co-authored-by: Ha Thach <thach@tinyusb.org>
This commit is contained in:
Limor "Ladyada" Fried 2023-12-20 09:23:55 -05:00 committed by GitHub
parent ad4f0acea9
commit 9d0274b3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 12 deletions

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

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);
}