Skip to content

Commit d1e7c92

Browse files
authored
Merge branch 'master' into master
2 parents fe1c366 + 8d1a845 commit d1e7c92

File tree

75 files changed

+1962
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1962
-112
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
2. [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*)
66
3. [ ] Please **update relevant Documentation** if applicable
77
4. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html)
8+
5. [ ] Please **confirm option to "Allow edits and access to secrets by maintainers"** when opening a Pull Request
89

910
*This entire section above can be deleted if all items are checked.*
1011

.github/scripts/tests_build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ while [ ! -z "$1" ]; do
4646
shift
4747
done
4848

49-
source ${SCRIPTS_DIR}/install-arduino-ide.sh
49+
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
50+
source ${SCRIPTS_DIR}/install-arduino-cli.sh
5051
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
5152

5253
args="-ai $ARDUINO_IDE_PATH -au $ARDUINO_USR_PATH"

.github/workflows/boards.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ jobs:
4545
- name: Checkout repository
4646
uses: actions/checkout@v3
4747

48+
- name: Check if build.board is uppercase
49+
run: |
50+
board_name=$(echo ${{ matrix.fqbn }} | awk -F':' '{print $NF}')
51+
if grep -q "^$board_name.build.board=[A-Z0-9_]*$" boards.txt; then
52+
echo "$board_name.build.board is valid.";
53+
else
54+
echo "Error: $board_name.build.board is not uppercase!";
55+
exit 1;
56+
fi
57+
4858
- name: Compile sketch
4959
uses: P-R-O-C-H-Y/compile-sketches@main
5060
with:

.github/workflows/dangerjs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: DangerJS Pull Request linter
2+
on:
3+
pull_request_target:
4+
types: [opened, edited, reopened, synchronize]
5+
6+
permissions:
7+
pull-requests: write
8+
contents: write
9+
10+
jobs:
11+
pull-request-style-linter:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out PR head
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
19+
- name: DangerJS pull request linter
20+
uses: espressif/shared-github-dangerjs@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ set(LIBRARY_SRCS
115115
libraries/Update/src/Updater.cpp
116116
libraries/Update/src/HttpsOTAUpdate.cpp
117117
libraries/USB/src/USBHID.cpp
118+
libraries/USB/src/USBMIDI.cpp
118119
libraries/USB/src/USBHIDMouse.cpp
119120
libraries/USB/src/USBHIDKeyboard.cpp
120121
libraries/USB/src/USBHIDGamepad.cpp

boards.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ esp32c6.menu.PartitionScheme.custom.upload.maximum_size=16777216
430430

431431
esp32c6.menu.CPUFreq.160=160MHz (WiFi)
432432
esp32c6.menu.CPUFreq.160.build.f_cpu=160000000L
433+
esp32c6.menu.CPUFreq.120=120MHz (WiFi)
434+
esp32c6.menu.CPUFreq.120.build.f_cpu=120000000L
433435
esp32c6.menu.CPUFreq.80=80MHz (WiFi)
434436
esp32c6.menu.CPUFreq.80.build.f_cpu=80000000L
435437
esp32c6.menu.CPUFreq.40=40MHz
@@ -17110,7 +17112,7 @@ heltec_wifi_kit_32.build.target=esp32
1711017112
heltec_wifi_kit_32.build.mcu=esp32
1711117113
heltec_wifi_kit_32.build.core=esp32
1711217114
heltec_wifi_kit_32.build.variant=heltec_wifi_kit_32
17113-
heltec_wifi_kit_32.build.board=heltec_wifi_kit_32
17115+
heltec_wifi_kit_32.build.board=HELTEC_WIFI_KIT_32
1711417116

1711517117
heltec_wifi_kit_32.build.f_cpu=240000000L
1711617118
heltec_wifi_kit_32.build.flash_size=4MB
@@ -17199,7 +17201,7 @@ heltec_wifi_kit_32_V3.build.target=esp32s3
1719917201
heltec_wifi_kit_32_V3.build.mcu=esp32s3
1720017202
heltec_wifi_kit_32_V3.build.core=esp32
1720117203
heltec_wifi_kit_32_V3.build.variant=heltec_wifi_kit_32_V3
17202-
heltec_wifi_kit_32_V3.build.board=heltec_wifi_kit_32_V3
17204+
heltec_wifi_kit_32_V3.build.board=HELTEC_WIFI_KIT_32_V3
1720317205

1720417206
heltec_wifi_kit_32_V3.build.usb_mode=1
1720517207
heltec_wifi_kit_32_V3.build.cdc_on_boot=0
@@ -17298,7 +17300,7 @@ heltec_wifi_lora_32.build.target=esp32
1729817300
heltec_wifi_lora_32.build.mcu=esp32
1729917301
heltec_wifi_lora_32.build.core=esp32
1730017302
heltec_wifi_lora_32.build.variant=heltec_wifi_lora_32
17301-
heltec_wifi_lora_32.build.board=heltec_wifi_lora_32
17303+
heltec_wifi_lora_32.build.board=HELTEC_WIFI_LORA_32
1730217304

1730317305
heltec_wifi_lora_32.build.f_cpu=240000000L
1730417306
heltec_wifi_lora_32.build.flash_size=4MB
@@ -17435,7 +17437,7 @@ heltec_wifi_lora_32_V2.build.target=esp32
1743517437
heltec_wifi_lora_32_V2.build.mcu=esp32
1743617438
heltec_wifi_lora_32_V2.build.core=esp32
1743717439
heltec_wifi_lora_32_V2.build.variant=heltec_wifi_lora_32_V2
17438-
heltec_wifi_lora_32_V2.build.board=heltec_wifi_lora_32_V2
17440+
heltec_wifi_lora_32_V2.build.board=HELTEC_WIFI_LORA_32_V2
1743917441

1744017442
heltec_wifi_lora_32_V2.build.f_cpu=240000000L
1744117443
heltec_wifi_lora_32_V2.build.flash_size=8MB
@@ -17551,7 +17553,7 @@ heltec_wifi_lora_32_V3.build.target=esp32s3
1755117553
heltec_wifi_lora_32_V3.build.mcu=esp32s3
1755217554
heltec_wifi_lora_32_V3.build.core=esp32
1755317555
heltec_wifi_lora_32_V3.build.variant=heltec_wifi_lora_32_V3
17554-
heltec_wifi_lora_32_V3.build.board=heltec_wifi_32_lora_V3
17556+
heltec_wifi_lora_32_V3.build.board=HELTEC_WIFI_LORA_32_V3
1755517557

1755617558
heltec_wifi_lora_32_V3.build.usb_mode=1
1755717559
heltec_wifi_lora_32_V3.build.cdc_on_boot=0
@@ -17693,7 +17695,7 @@ heltec_wireless_stick.build.target=esp32
1769317695
heltec_wireless_stick.build.mcu=esp32
1769417696
heltec_wireless_stick.build.core=esp32
1769517697
heltec_wireless_stick.build.variant=heltec_wireless_stick
17696-
heltec_wireless_stick.build.board=heltec_wireless_stick
17698+
heltec_wireless_stick.build.board=HELTEC_WIRELESS_STICK
1769717699

1769817700
heltec_wireless_stick.build.f_cpu=240000000L
1769917701
heltec_wireless_stick.build.flash_size=8MB
@@ -17806,7 +17808,7 @@ heltec_wireless_stick_lite.build.target=esp32
1780617808
heltec_wireless_stick_lite.build.mcu=esp32
1780717809
heltec_wireless_stick_lite.build.core=esp32
1780817810
heltec_wireless_stick_lite.build.variant=heltec_wireless_stick_lite
17809-
heltec_wireless_stick_lite.build.board=heltec_wireless_stick_LITE
17811+
heltec_wireless_stick_lite.build.board=HELTEC_WIRELESS_STICK_LITE
1781017812

1781117813
heltec_wireless_stick_lite.build.f_cpu=240000000L
1781217814
heltec_wireless_stick_lite.build.flash_size=4MB

cores/esp32/esp32-hal-cpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz){
188188
}
189189
#endif
190190
#ifndef CONFIG_IDF_TARGET_ESP32H2
191-
if(cpu_freq_mhz > xtal && cpu_freq_mhz != 240 && cpu_freq_mhz != 160 && cpu_freq_mhz != 80){
191+
if(cpu_freq_mhz > xtal && cpu_freq_mhz != 240 && cpu_freq_mhz != 160 && cpu_freq_mhz != 120 && cpu_freq_mhz != 80){
192192
if(xtal >= RTC_XTAL_FREQ_40M){
193-
log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2, xtal/4);
193+
log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2, xtal/4);
194194
} else {
195-
log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2);
195+
log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2);
196196
}
197197
return false;
198198
}

cores/esp32/esp32-hal-tinyusb.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,11 @@ static void usb_device_task(void *param) {
678678
#endif
679679
static bool tinyusb_is_initialized = false;
680680

681-
esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb)
681+
esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb){
682+
return tinyusb_enable_interface2(interface, descriptor_len, cb, false);
683+
}
684+
685+
esp_err_t tinyusb_enable_interface2(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb, bool reserve_endpoints)
682686
{
683687
if(tinyusb_is_initialized){
684688
log_e("TinyUSB has already started! Interface %s not enabled", (interface >= USB_INTERFACE_MAX)?"":tinyusb_interface_names[interface]);
@@ -688,6 +692,13 @@ esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descr
688692
log_e("Interface %s invalid or already enabled", (interface >= USB_INTERFACE_MAX)?"":tinyusb_interface_names[interface]);
689693
return ESP_FAIL;
690694
}
695+
if(interface == USB_INTERFACE_HID && reserve_endpoints){
696+
// Some simple PC BIOS requires specific endpoint addresses for keyboard at boot
697+
if(!tinyusb_reserve_out_endpoint(1) ||!tinyusb_reserve_in_endpoint(1)){
698+
log_e("HID Reserve Endpoints Failed");
699+
return ESP_FAIL;
700+
}
701+
}
691702
if(interface == USB_INTERFACE_CDC){
692703
if(!tinyusb_reserve_out_endpoint(3) ||!tinyusb_reserve_in_endpoint(4) || !tinyusb_reserve_in_endpoint(5)){
693704
log_e("CDC Reserve Endpoints Failed");

cores/esp32/esp32-hal-tinyusb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ typedef enum {
9797
typedef uint16_t (*tinyusb_descriptor_cb_t)(uint8_t * dst, uint8_t * itf);
9898

9999
esp_err_t tinyusb_enable_interface(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb);
100+
esp_err_t tinyusb_enable_interface2(tinyusb_interface_t interface, uint16_t descriptor_len, tinyusb_descriptor_cb_t cb, bool reserve_endpoints);
100101
uint8_t tinyusb_add_string_descriptor(const char * str);
101102
uint8_t tinyusb_get_free_duplex_endpoint(void);
102103
uint8_t tinyusb_get_free_in_endpoint(void);

docs/source/api/reset_reason.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ To get started with Reset Reason, you can try:
1515
Reset Reason
1616
************
1717

18-
.. literalinclude:: ../../../libraries/ESP32/examples/ResetReason/ResetReason.ino
19-
:language: arduino
18+
.. literalinclude:: ../../../libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino
19+
:language: arduino

0 commit comments

Comments
 (0)