Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SuGlider authored Aug 19, 2024
2 parents 530b263 + def319a commit ec3d597
Show file tree
Hide file tree
Showing 8 changed files with 900 additions and 13 deletions.
596 changes: 596 additions & 0 deletions boards.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cores/esp32/esp32-hal-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ uart_t *uartBegin(
#if SOC_UART_SUPPORT_XTAL_CLK
uart_config.source_clk = UART_SCLK_XTAL; // valid for C2, S3, C3, C6, H2 and P4
#elif SOC_UART_SUPPORT_REF_TICK
if (baudrate <= 1000000) {
uart_config.source_clk = UART_SCLK_REF_TICK; // valid for ESP32, S2 - MAX supported baud rate is 1MHz
if (baudrate <= 250000) {
uart_config.source_clk = UART_SCLK_REF_TICK; // valid for ESP32, S2 - MAX supported baud rate is 250 Kbps
} else {
uart_config.source_clk = UART_SCLK_APB; // baudrate may change with the APB Frequency!
}
Expand Down
13 changes: 3 additions & 10 deletions libraries/BLE/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# ESP32 BLE for Arduino
The Arduino IDE provides an excellent library package manager where versions of libraries can be downloaded and installed. This Github project provides the repository for the ESP32 BLE support for Arduino.

The actual source of the project which is being maintained can be found here:
The original source of the project, **which is not maintained anymore**, can be found here: https://github.com/nkolban/esp32-snippets

https://github.com/nkolban/esp32-snippets
Issues and questions should be raised here: https://github.com/espressif/arduino-esp32/issues <br> (please don't use https://github.com/nkolban/esp32-snippets/issues!)

Issues and questions should be raised here:

https://github.com/nkolban/esp32-snippets/issues


Documentation for using the library can be found here:

https://github.com/nkolban/esp32-snippets/tree/master/Documentation
Documentation for using the library can be found here: https://github.com/nkolban/esp32-snippets/tree/master/Documentation
2 changes: 1 addition & 1 deletion libraries/BLE/library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ maintainer=Dariusz Krempa <[email protected]>
sentence=BLE functions for ESP32
paragraph=This library provides an implementation Bluetooth Low Energy support for the ESP32 using the Arduino platform.
category=Communication
url=https://github.com/nkolban/ESP32_BLE_Arduino
url=https://github.com/espressif/arduino-esp32/tree/master/libraries/BLE
architectures=esp32
includes=BLEDevice.h, BLEUtils.h, BLEScan.h, BLEAdvertisedDevice.h
25 changes: 25 additions & 0 deletions variants/codecell/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

static const uint8_t TX = 21;
static const uint8_t RX = 20;

static const uint8_t SDA = 8;
static const uint8_t SCL = 9;

static const uint8_t SS = 7;
static const uint8_t MOSI = 6;
static const uint8_t MISO = 5;
static const uint8_t SCK = 4;

static const uint8_t A0 = 0;
static const uint8_t A1 = 1;
static const uint8_t A2 = 2;
static const uint8_t A3 = 3;
static const uint8_t A4 = 4;
static const uint8_t A5 = 5;

#endif /* Pins_Arduino_h */
127 changes: 127 additions & 0 deletions variants/fri3d_2024_esp32s3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t LED_BUILTIN = 21;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN

static const uint8_t TX = 43;
static const uint8_t RX = 44;

static const uint8_t SDA = 9;
static const uint8_t SCL = 18;

static const uint8_t SS = 14;
static const uint8_t MOSI = 6;
static const uint8_t MISO = 8;
static const uint8_t SCK = 7;

#define X_FRI3D_BADGE_2024 // General Define for use in sketches or lib files
#define X_WS2812_NUM_LEDS 5 // Number of RBG LEDs

#define PIN_I2C_SDA SDA
#define PIN_I2C_SCL SCL
#define PIN_WS2812 12
#define X_WS2812_NUM_LEDS 5

#define PIN_LED 21
#define PIN_IR_RECEIVER 11
#define PIN_BLASTER 10
#define PIN_BUZZER 46
#define PIN_BATTERY 13

#define PIN_SDCARD_CS SS

#define PIN_JOY_X 1
#define PIN_JOY_Y 3

#define PIN_A 39
#define PIN_B 40
#define PIN_X 38
#define PIN_Y 41
#define PIN_MENU 45
#define PIN_START 0

#define PIN_AUX 42 // Fri3d Badge 2024 Aux Pwr

#define CHANNEL_BUZZER 0

// Fri3d Badge 2024 Accelero Gyro
#define X_ACCELERO_GYRO 21

// I2S microphone on communicator addon
#define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT
#define I2S_MIC_SERIAL_CLOCK 17 //serial clock SCLK: pin SCK
#define I2S_MIC_LEFT_RIGHT_CLOCK 47 //left/right clock LRCK: pin WS
#define I2S_MIC_SERIAL_DATA 15 //serial data DIN: pin SD

// Fri3d Badge 2024 LCD
// For using display with TFT_eSPI library
#define USER_SETUP_LOADED
#define SPI_FREQUENCY 80000000
#define ST7789_DRIVER
#define USE_HSPI_PORT

#define TFT_RGB_ORDER TFT_BGR //# swap red and blue byte order
#define TFT_INVERSION_OFF
#define TFT_WIDTH 296 //;setting these will init the eSPI lib with correct dimensions
#define TFT_HEIGHT 240 //;setting these will init the eSPI lib with correct dimensions
#define TFT_MISO MISO
#define TFT_MOSI MOSI
#define TFT_SCLK SCK
#define TFT_CS 5
#define TFT_DC 4
#define TFT_RST 48
#define LOAD_GLCD 1
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF
#define SMOOTH_FONT
#define SPI_FREQUENCY 80000000

static const uint8_t A0 = 1;
static const uint8_t A1 = 2;
static const uint8_t A2 = 3;
static const uint8_t A3 = 4;
static const uint8_t A4 = 5;
static const uint8_t A5 = 6;
static const uint8_t A6 = 7;
static const uint8_t A7 = 8;
static const uint8_t A8 = 9;
static const uint8_t A9 = 10;
static const uint8_t A10 = 11;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 14;
static const uint8_t A14 = 15;
static const uint8_t A15 = 16;
static const uint8_t A16 = 17;
static const uint8_t A17 = 18;
static const uint8_t A18 = 19;
static const uint8_t A19 = 20;

static const uint8_t T1 = 1;
static const uint8_t T2 = 2;
static const uint8_t T3 = 3;
static const uint8_t T4 = 4;
static const uint8_t T5 = 5;
static const uint8_t T6 = 6;
static const uint8_t T7 = 7;
static const uint8_t T8 = 8;
static const uint8_t T9 = 9;
static const uint8_t T10 = 10;
static const uint8_t T11 = 11;
static const uint8_t T12 = 12;
static const uint8_t T13 = 13;
static const uint8_t T14 = 14;

#endif /* Pins_Arduino_h */
69 changes: 69 additions & 0 deletions variants/lilygo_twatch_s3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

#define USB_VID 0x303a
#define USB_PID 0x821B
#define USB_MANUFACTURER "LILYGO"
#define USB_PRODUCT "T-Watch-S3"

#define DISP_WIDTH (240)
#define DISP_HEIGHT (240)

#define DISP_MOSI (13)
#define DISP_MISO (-1)
#define DISP_SCK (18)
#define DISP_RST (-1)
#define DISP_CS (12)
#define DISP_DC (38)
#define DISP_BL (45)

// touch screen
#define TP_INT (16)
#define TP_SDA (39)
#define TP_SCL (40)

// Interrupt IO port
#define RTC_INT (17)
#define PMU_INT (21)
#define SENSOR_INT (14)

// PDM microphone
#define MIC_SCK (44)
#define MIC_DAT (47)

// MAX98357A
#define I2S_BCLK (48)
#define I2S_WCLK (15)
#define I2S_DOUT (46)

#define IR_SEND (2)

// TX, RX pin connected to GPS
static const uint8_t TX = 42;
static const uint8_t RX = 41;

//BHI260,PCF85063,AXP2101,DRV2605L,PN532 share I2C Bus
static const uint8_t SDA = 10;
static const uint8_t SCL = 11;

// Default sd cs pin
static const uint8_t SS = 5;
static const uint8_t MOSI = 1;
static const uint8_t MISO = 4;
static const uint8_t SCK = 3;

// LoRa and SD card share SPI bus
#define LORA_SCK (SCK) // share spi bus
#define LORA_MISO (MISO) // share spi bus
#define LORA_MOSI (MOSI) // share spi bus
#define LORA_CS (5)
#define LORA_RST (8)
#define LORA_BUSY (7)
#define LORA_IRQ (9)

#define GPS_TX (TX)
#define GPS_RX (RX)

#endif /* Pins_Arduino_h */
77 changes: 77 additions & 0 deletions variants/lilygo_twatch_ultra/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

#ifndef digitalPinToInterrupt
#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1)
#endif

#define USB_VID 0x303a
#define USB_PID 0x8227
#define USB_MANUFACTURER "LILYGO"
#define USB_PRODUCT "T-Watch-Ultra"

#define DISP_WIDTH (240)
#define DISP_HEIGHT (296)

#define DISP_D0 (39)
#define DISP_D1 (40)
#define DISP_D2 (45)
#define DISP_D3 (42)
#define DISP_SCK (41)
#define DISP_RST (6)
#define DISP_CS (38)
#define DISP_TE (37)

// touch screen
#define TP_INT (12)
#define TP_RST (46)
// Interrupt IO port
#define RTC_INT (1)
#define PMU_INT (7)
#define NFC_INT (5)
#define SENSOR_INT (8)
#define NFC_RST (4)

// PDM microphone
#define MIC_SCK (17)
#define MIC_DAT (18)

// MAX98357A
#define I2S_BCLK (9)
#define I2S_WCLK (10)
#define I2S_DOUT (11)

#define SD_CS (21)

// TX, RX pin connected to GPS
static const uint8_t TX = 43;
static const uint8_t RX = 44;

//BHI260,PCF85063,AXP2101,DRV2605L,PN532 share I2C Bus
static const uint8_t SDA = 2;
static const uint8_t SCL = 3;

// Default sd cs pin
static const uint8_t SS = SD_CS;
static const uint8_t MOSI = 34;
static const uint8_t MISO = 33;
static const uint8_t SCK = 35;

#define GPS_TX (TX)
#define GPS_RX (RX)

#define TP_SDA (SDA)
#define TP_SCL (SCL)

// LoRa and SD card share SPI bus
#define LORA_SCK (SCK) // share spi bus
#define LORA_MISO (MISO) // share spi bus
#define LORA_MOSI (MOSI) // share spi bus
#define LORA_CS (36)
#define LORA_RST (47)
#define LORA_BUSY (48)
#define LORA_IRQ (14)

#endif /* Pins_Arduino_h */

0 comments on commit ec3d597

Please sign in to comment.