Commit Graph

14084 Commits

Author SHA1 Message Date
Wang Meng Yang
d54df43d4c Merge branch 'bugfix/bt_add_some_debug_log_v4.4' into 'release/v4.4'
component_bt: Add some bluetooth debug log(v4.4)

See merge request espressif/esp-idf!17614
2022-04-19 20:12:00 +08:00
liqigan
4a88aed12b add missing unlock in btc_spp_cb_handler of BTA_JV_RFCOMM_WRITE_EVT 2022-04-19 20:06:32 +08:00
liqigan
3897d12024 fix SPP initiator can not free resource when connection is failed 2022-04-19 20:06:32 +08:00
Ivan Grokhotkov
2d54f4584e
driver: sdspi: set default DMA channel compatible with S3, C3 or later 2022-04-19 13:46:37 +02:00
Mahavir Jain
792eb70334 Merge branch 'https_server/min_cert_auth_mode_v4.4' into 'release/v4.4'
https_server: Add config option to set minimum certificate auth mode (v4.4)

See merge request espressif/esp-idf!17796
2022-04-19 16:26:22 +08:00
Mahavir Jain
2afe86be7f Merge branch 'bugfix/http_code_v4.4' into 'release/v4.4'
esp_http_client, esp_https_ota: Handle HTTP 303 status code (v4.4)

See merge request espressif/esp-idf!17732
2022-04-19 16:24:20 +08:00
Wang Meng Yang
1861ca5700 Merge branch 'bugfix/wifi_prov_mgr_conn_issue_v4.4' into 'release/v4.4'
Wifi_prov_mgr: Fix for device disconnection after pairing (v4.4)

See merge request espressif/esp-idf!17618
2022-04-19 15:47:12 +08:00
David Čermák
677a01851f Merge branch 'bugfix/security_update_pppos_crash_v4.4' into 'release/v4.4'
lw-ip: Apply security fixes from upstream; Fix PPPoS and NAPT ip-forward (v4.4)

See merge request espressif/esp-idf!17419
2022-04-19 15:45:31 +08:00
Shubham Kulkarni
3529b9450e esp_http_client: Add comment for clearing location field in esp_http_client_prepare 2022-04-19 07:34:33 +00:00
Nicklas Frahm
9a7d85c09b esp_http_client: fix redirect by resetting location before parsing
Closes #8563.

Signed-off-by: Nicklas Frahm <nicklas.frahm@gmail.com>
2022-04-19 07:34:33 +00:00
songruojing
00229547b2 i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset
Closes https://github.com/espressif/esp-idf/issues/8422

(cherry picked from commit 1ceb7c8cd6)
2022-04-18 22:24:47 +08:00
songruo
25668f96e4 gpio: fix wrong GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO macro
Closes https://github.com/espressif/esp-idf/issues/8733

(cherry picked from commit 0d52cb04dc)
2022-04-18 22:18:17 +08:00
Laukik Hase
c1bb9032c2
https_server: Add config option to min. cert. auth mode
- Added a config option to set the minimum Certificate Verification
  mode to Optional
- When this option is enabled, the peer (the client) certificate
  is checked by the server, however the handshake continues even if
  verification failed.
- By default, the peer certificate is not checked and ignored by the server.

Closes https://github.com/espressif/esp-idf/issues/8664
2022-04-18 11:10:14 +05:30
xiongweichao
3e494ec5fd Add some bluetooth debug log 2022-04-16 07:14:51 +00:00
Michael (XIAO Xufeng)
1329b19fe4 versions: Update version to 4.4.1 2022-04-16 09:43:14 +08:00
Michael (XIAO Xufeng)
9b75e5664e Merge branch 'bugfix/iperf_performance_v4.4' into 'release/v4.4'
Bugfix/iperf performance (v4.4)

See merge request espressif/esp-idf!17600
2022-04-15 15:52:13 +08:00
Cao Sen Miao
4a7f5f41ea spi_flash: esptool temporarily supports H2 clock configurations 2022-04-14 13:22:50 +02:00
Roland Dobai
ff84535758 esptool_py: Update to support ESP32-S3 USB OTG compressed flashing with stub 2022-04-14 12:28:28 +02:00
Nachiket Kukade
c4c8aab39d esp_wifi: Update wifi lib
1. In scan, correctly identify AP's with mixed key mgmt
2. Add API to disable PMF configuration
2022-04-13 10:22:00 +05:30
xiewenxiang
ea1a9f9e3a esp_phy: Add IRAM_ATTR for phy i2c spinlock 2022-04-13 12:15:38 +08:00
Shubham Kulkarni
d485a8cd35 esp_https_ota: Add check for 303 and 308 status code
Closes https://github.com/espressif/esp-idf/issues/8581
2022-04-11 09:42:51 +05:30
Shubham Kulkarni
98c2132498 esp_http_client: Add new status code 303 and 308 2022-04-11 09:42:47 +05:30
xiewenxiang
b37df7e3df Update esp c3/s3 phy lib (dcbe608) 2022-04-08 16:42:50 +08:00
Ondrej Kosta
ba62cbc04f Fixed Ethernet lwIP netif error indication 2022-04-06 10:44:31 +00:00
Michael (XIAO Xufeng)
d378ca2b78 esp_phy: use spinlock to avoid regi2c access conflicts 2022-04-06 12:18:23 +08:00
Michael (XIAO Xufeng)
8522bb1178 regi2c: use safe version of spinlock, instead of ISR ver 2022-04-06 09:34:43 +08:00
Michael (XIAO Xufeng)
f5ee7093b8 Merge branch 'test/disable_touch_sleep_testcase_v4.4' into 'release/v4.4'
touch: add protection for touch sleep case (v4.4)

See merge request espressif/esp-idf!17611
2022-03-30 15:24:15 +08:00
Michael (XIAO Xufeng)
4e827ca09b adc_cal: fixed the assertion failure or returning wrong error code when ADC2 failed the arbitration
Issue exist since first IDF version supporting ESP32-S2.
2022-03-28 10:23:48 +00:00
Isha Pardikar
916533ef92 Merge branch 'bugfix/wifi_prov_mgr_conn_issue' into 'release/v4.4'
NimBLE: Fixed device disconnection issue of wifi prov mgr

Closes IDF-4655

See merge request espressif/esp-idf!17618
2022-03-28 11:49:09 +05:30
Michael (XIAO Xufeng)
b6c2c80e44 touch: add protection for touch sleep case 2022-03-27 02:44:47 +08:00
Michael (XIAO Xufeng)
36d989b16c spi: fixed crash when calling spi_bus_free when not initialized
introduced in 49a48644e4

Closes: https://github.com/espressif/esp-idf/issues/8642
2022-03-27 02:33:18 +08:00
Michael (XIAO Xufeng)
3503ee41ca sleep: fixed the issue error log not printed 2022-03-25 14:50:26 +08:00
Michael (XIAO Xufeng)
ea27a8543a touch_sensor: forbid from using touch sensor with sleep on ESP32-S3
This is not supported yet.
2022-03-25 14:50:26 +08:00
KonstantinKondrashov
353abc5702 esptool: Update esptool submodule 2022-03-11 06:39:30 +00:00
David Cermak
47414efe0b lwip: Security fixes; PPPoS null-deref; NAPT ip-forward
* Cherry-pick important fixes to 2.1.2-esp
  - CVE-2020-22283: Attacker could craft a packet that would disclose 8 bytes of some heap memory:
    - icmp6: Don't copy too much data
    - icmp6: Fix copying of chained pbuf in reply
    - icmp6: keep to the RFC and send as much as possible with icmp6 error messages
  - CVE-2020-22284: ZEP - ZigBee Encapsulation Protocol/6LoWPAN is not supported in IDF,
    the netif module (zepif.c) is not included in the build, but users can still inject
    the file into compilation process, implement IO interface and use this.
    - zepif: Copy possibly chained output pbuf properly
    - Add #define for minimum IPv6 MTU length
    - pbuf: Add pbuf_copy_partial_pbuf library function
* PPPoS: Fix null-deref when processing double break packet
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
* NAPT: Fix PBUF_REF type to clone the pbuf before forwarding
  - IP-FORWARD: If packet-type is PBUF_REF clone it before forwarding
  - Add NAPT unit test to exercise NAT feature for both RAM and REF pbuf types
* version: Update version numbers to match 2.1.2-esp

* Update submodule: 2749568fe1...76303df238
  - test/napt: Add unit test for IP forward with PBUF_REF (espressif/esp-lwip@76303df2)
  - napt: Fix PBUF_REF type to clone the pbuf before forwarding (espressif/esp-lwip@39068263)
  - version: Update version numbers to match 2.1.2-esp (espressif/esp-lwip@2b922919)
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
  - pbuf: Add pbuf_copy_partial_pbuf library function (espressif/esp-lwip@1c9cd9c1)
  - Add #define for minimum IPv6 MTU length (espressif/esp-lwip@d2dc577b)
  - zepif: Copy possibly chained output pbuf properly (espressif/esp-lwip@64ab7f2a)
  - icmp6: Don't copy too much data (espressif/esp-lwip@4a64731b)
  - icmp6: Fix copying of chained pbuf in reply (espressif/esp-lwip@7c822ff4)
  - icmp6: keep to the RFC and send as much as possible with icmp6 error messages (espressif/esp-lwip@29100ab6)
  - dns: Add API to clear dns cache (espressif/esp-lwip@ee59f77d)
  - CI: Fixed adding gitlab key (espressif/esp-lwip@5a2bdba7)
  - test case: modify test case test_tcp_new_max_num_remove_FIN_WAIT_1 (espressif/esp-lwip@6b090f7d)

Closes https://github.com/espressif/esp-idf/issues/8300
Closes https://github.com/espressif/esp-idf/issues/8451
2022-03-11 06:05:39 +00:00
morris
45dcc4384c Merge branch 'feature/emac_start_stop_test_v4.4' into 'release/v4.4'
test_emac: extended Ethernet start/stop stress test (v4.4)

See merge request espressif/esp-idf!17306
2022-03-11 10:38:40 +08:00
Wang Meng Yang
7a2068c864 Merge branch 'feature/update_hfp_hf_version_v4.4' into 'release/v4.4'
Update HFP_HF version to 1.7.2(v4.4)

See merge request espressif/esp-idf!17382
2022-03-10 20:20:16 +08:00
Ondrej Kosta
7768c389ad Created EMAC start/stop stress test under heavy traffic 2022-03-10 10:15:34 +01:00
Ondrej Kosta
d53094bdc0 esp_eth: EMAC start/stop optimization 2022-03-10 10:15:34 +01:00
morris
0fca632ffd Merge branch 'bugfix/modbus_fix_start_after_destroy_issues_v44' into 'release/v4.4'
modbus: fix tcp slave destroy issues (backport v4.4)

See merge request espressif/esp-idf!17406
2022-03-09 09:48:36 +08:00
Marius Vikhammer
c9ce438466 Merge branch 'bugfix/inline_intrmask_from_isr_v4.4' into 'release/v4.4'
freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR (v4.4)

See merge request espressif/esp-idf!17325
2022-03-09 09:38:36 +08:00
morris
121ddb87e5 Merge branch 'bugfix/fix_adc_digital_not_reset_issue_v4.4' into 'release/v4.4'
adc: fix adc digital part not reset issue (v4.4)

See merge request espressif/esp-idf!17375
2022-03-08 23:16:33 +08:00
aleks
d7fafdc916 freemodbus: fix port enable disable sequence for tcp master and slave 2022-03-08 10:07:19 +01:00
aleks
ba9c0c29a9 modbus: fix tcp slave destroy issues
Closes https://github.com/espressif/esp-idf/issues/8211
2022-03-08 09:52:54 +01:00
morris
1b06c55ab1 Merge branch 'bugfix/fix_adc_calibration_light_sleep_issue_v4.4' into 'release/v4.4'
adc: fix calibration error when waking up from light sleep (v4.4)

See merge request espressif/esp-idf!16930
2022-03-07 19:01:31 +08:00
xiongweichao
898a7d071b Update HFP_HF version to 1.7.2 2022-03-07 18:16:05 +08:00
Jiang Jiang Jian
dc7cb6de4b Merge branch 'bugfix/ignore_pmf_capable_flag_v4.4' into 'release/v4.4'
Always connect Station in PMF mode if possible (Backport v4.4)

See merge request espressif/esp-idf!17036
2022-03-07 16:24:44 +08:00
Armando
e1515beb26 adc: fix adc digital not reset issue 2022-03-07 11:40:18 +08:00
Armando
d53ea1166d rng: fix rng adc digital inpu not disabled issue 2022-03-07 11:39:27 +08:00
Armando
32afe6a498 sleep: restore analog calibration registers after waking up from light sleep
Closes https://github.com/espressif/esp-idf/issues/8287
Closes https://github.com/espressif/esp-idf/issues/7921
2022-03-07 11:28:48 +08:00
Jiang Jiang Jian
3d2700146e Merge branch 'bugfix/uart_no_int_after_flush_v4.4' into 'release/v4.4'
UART: RX interrupts are now properly restored after a flush (backport v4.4)

See merge request espressif/esp-idf!17122
2022-03-07 11:03:33 +08:00
Jiang Jiang Jian
d326c5283d Merge branch 'bugfix/ledc_consecutive_fade_v4.4' into 'release/v4.4'
ledc: Bugfixes for issues related to fade protection (backport v4.4)

See merge request espressif/esp-idf!16953
2022-03-07 11:00:46 +08:00
Jiang Jiang Jian
964db79c0e Merge branch 'docs/add_a_note_to_mck_io_num_v4.4' into 'release/v4.4'
docs: add a note to mck_io_num: for esp32, only gpio0/gpio1/gpio3 can be set (v4.4)

See merge request espressif/esp-idf!16694
2022-03-07 11:00:25 +08:00
wangjialiang
90083fcbb7 ble_mesh: stack: Bugfix the proxy client abnormal disconnection 2022-03-04 12:33:15 +00:00
wangjialiang
1016801eaf ble_mesh: stack: Add proxy server connect and disconnect event 2022-03-04 12:33:15 +00:00
Wang Fang
21cdaeade9 docs: add a note to mck_io_num: for esp32, only gpio0/gpio1/gpio3 can be set 2022-03-04 07:00:18 +00:00
Jiang Jiang Jian
380ee4b87a Merge branch 'bugfix/update_stack_init_check_v4.4' into 'release/v4.4'
Nimble: Remove stack initialization status from unwanted functions (v4.4)

See merge request espressif/esp-idf!17234
2022-03-04 14:11:23 +08:00
Jiang Jiang Jian
975b525e03 Merge branch 'bugfix/add_pll_track_feature_mr_4.4' into 'release/v4.4'
Add pll track feature

See merge request espressif/esp-idf!17285
2022-03-04 13:54:19 +08:00
morris
f17a435ea7 Merge branch 'refactor/i2s_deprecate_confusing_names_v4.4' into 'release/v4.4'
i2s: Add detailed comments for confusing names (v4.4)

See merge request espressif/esp-idf!16748
2022-03-04 13:18:32 +08:00
Ivan Grokhotkov
89f57f3402 Merge branch 'bugfix/rom_time_t_size_deps_v4.4' into 'release/v4.4'
esp_rom: remove functions which depend on sizeof(struct stat) and all their callers (v4.4)

See merge request espressif/esp-idf!17040
2022-03-04 04:38:42 +08:00
Jiang Jiang Jian
169008616b Merge branch 'bugfix/a2dp_sniff_v4.4' into 'release/v4.4'
Fix crash when host exit sniff mode(v4.4)

See merge request espressif/esp-idf!17313
2022-03-03 23:37:37 +08:00
morris
aa260a9376 Merge branch 'bugfix/i2s_mono_issue_on_c3_s3_v4.4' into 'release/v4.4'
🔧 i2s: fix bug of switching mono/stereo mode by 'i2s_set_clk' on c3/s3 (v4.4)

See merge request espressif/esp-idf!17331
2022-03-03 21:54:20 +08:00
morris
0f11ac2bd3 Merge branch 'bugfix/i2s_dac_incorrect_clock_v4.4' into 'release/v4.4'
i2s: fix adc/dac clock calculation (v4.4)

See merge request espressif/esp-idf!17336
2022-03-03 20:37:43 +08:00
Mahavir Jain
a472035d97 Merge branch 'feature/websocket_server_support_close_handle_v4.4' into 'release/v4.4'
esp_http_server: Websocket CLOSE frame can support callback function (backport v4.4)

See merge request espressif/esp-idf!17339
2022-03-03 18:40:34 +08:00
yuanjm
3b91281c91 esp_http_server: Websocket CLOSE frame can support callback function
Closes https://github.com/espressif/esp-idf/issues/7493
2022-03-03 15:46:09 +08:00
laokaiyao
299d496c30 i2s: add detailed comments to some fileds (v4.4) 2022-03-03 05:55:35 +00:00
laokaiyao
15e8601cfc i2s: add mclk_div underflow check
Closes https://github.com/espressif/esp-idf/issues/8344
2022-03-03 12:23:47 +08:00
Stephan Hadinger
19f4eca4b9 Fix for mclk/bclk divisors #8326
Merges https://github.com/espressif/esp-idf/pull/8327
2022-03-03 12:23:47 +08:00
Shubham Kulkarni
7600869c35 esp_http_client: Cache received data in http_on_body callback.
This change fixes issue with data loss when multiple body chunks are
received after calling esp_http_client_fetch_headers.
2022-03-03 03:54:37 +00:00
laokaiyao
86d78c1592 i2s: fix bug of switching mono/stereo mode by 'i2s_set_clk' on c3/s3 2022-03-03 03:23:41 +00:00
Michael (XIAO Xufeng)
eff03cbbd9 Merge branch 'feat/support_mxic_unlock_v4.4' into 'release/v4.4'
spi_flash: support unlock MXIC flash chips (v4.4)

See merge request espressif/esp-idf!17251
2022-03-03 11:13:09 +08:00
xiongweichao
d8c7c41a43 Fix crash when host exit sniff mode 2022-03-03 02:59:31 +00:00
Marius Vikhammer
1690785432 spi flash: fix cache accessed while disabled issues at -O0
mask_get_id and gpio_hal_iomux_func_sel were called while cache
is disabled, but were not inlined as expected at -0O.
Force these functions to always be inlined.
2022-03-03 09:45:22 +08:00
Marius Vikhammer
3a7ec8acfa freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR
These were called from IRAM context where the caller expect them to be inlined
and accessible when cache is disabled. This was not the case when compiled with -O0.

Closes https://github.com/espressif/esp-idf/issues/8301
2022-03-03 09:44:31 +08:00
Jiang Jiang Jian
f0e894e540 Merge branch 'bugfix/remove_c_series_chips_unsupported_efuse_field_backport_v4.4' into 'release/v4.4'
efuse: free esp32c3/esp32h2 unused efuse field (backport v4.4)

See merge request espressif/esp-idf!17292
2022-03-02 18:36:13 +08:00
Mahavir Jain
27e49aee72 Merge branch 'bugfix/check_chip_id_at_start_ota_v4.4' into 'release/v4.4'
esp_https_ota: fix for checking chip id at start of OTA (v4.4)

See merge request espressif/esp-idf!17220
2022-03-02 17:19:14 +08:00
morris
5f56bbd2d0 Merge branch 'bugfix/rtcio_increase_size_v4.4' into 'release/v4.4'
sleep: fixed ext1 cannot wakeup via RTCIO >= 18 issue (v4.4)

See merge request espressif/esp-idf!17201
2022-03-02 16:53:05 +08:00
morris
64f41ed6c4 Merge branch 'bugfix/bootloader_uart_custom_gpio_v4.4' into 'release/v4.4'
bootloader: fixed the issue custom_uart_gpio doesn't take effect (v4.4)

See merge request espressif/esp-idf!17307
2022-03-02 16:50:49 +08:00
morris
2e8df440c1 Merge branch 'feature/usb_host_cleanup_v4.4' into 'release/v4.4'
USB: Host stack cleanup and QOL update + wTotalLength Fix + omit MSC reset (v4.4.1)

See merge request espressif/esp-idf!16678
2022-03-02 16:49:38 +08:00
Roland Dobai
0ccee00059 Merge branch 'bugfix/coredump_data_section_v4.4' into 'release/v4.4'
espcoredump: fix a bug where tracked DRAM data where not dumped (v4.4)

See merge request espressif/esp-idf!17120
2022-03-02 16:48:00 +08:00
songruojing
2ef6b8845b uart: fixed reset logic on ESP32-S3 2022-03-02 02:42:46 +08:00
songruojing
bdd7610e66 uart: fixed incorrect channel number on ESP32S2, S3 and C3 2022-03-02 02:42:06 +08:00
Michael (XIAO Xufeng)
8543d1b88a bootloader: fixed the issue custom_uart_gpio doesn't take effect 2022-03-02 02:40:45 +08:00
Yang Zhao
2bdea81b2a Update ESP32-C3 and ESP32-S3 bt lib and phy lib
Add the pll track feature to keep the ble connection stable when the environment
temprature increase form 0 to 74.
2022-03-01 14:56:47 +08:00
Nachiket Kukade
659306b243 esp_wifi: Always connect Station in PMF mode if possible
While using esp_wifi_set_config, flag pmf_capable defaults to 0.
Users may not bother to enable it, which prevents connection to a
WPA3 AP. Or the AP may reset into WPA3 mode failing the re-connection.
To ensure better security, deprecate the pmf_capable flag and set it to
true internally.
2022-02-28 17:55:42 +05:30
wuzhenghui
e6e76195e8 remove in esptool 2022-02-28 17:40:02 +08:00
wuzhenghui
6c2f5a16bb remove esp32h2 unsupported efuse field 2022-02-28 17:33:12 +08:00
wuzhenghui
c6aa1cf732 remove esp32c3 unsupported efuse field 2022-02-28 17:26:28 +08:00
Michael (XIAO Xufeng)
e835599979 bootloader: support unlock MXIC flash chips 2022-02-23 16:23:34 +08:00
Rahul Tank
ae546316d3 Nimble: Check stack initialization status before executing stack command
Previous commit added checks in some functions that can be called
    without stack initalization. Corrected such instances.
2022-02-22 10:26:43 +05:30
Omar Chebib
2fb3824dfa UART: Fix custom ISR unit test
On ESP32, UART_INTR_BRK_DET may be triggered after setting the new ISR handler.
Disable these interrrupts.
2022-02-22 10:54:06 +08:00
Omar Chebib
9a36ced294 espcoredump: add a test for coredump dumped sections 2022-02-22 02:38:00 +00:00
Omar Chebib
b868fd2a95 espcoredump: fix a bug where tracked DRAM data where not dumped
Variables marked as COREDUMP_DRAM_ATTR will now be part of the core dump.

* Closes https://github.com/espressif/esp-idf/issues/8151
2022-02-22 02:38:00 +00:00
Omar Chebib
1e117f2f83 UART: RX interrupts are now properly restored after a flush
Added a unit test to make sure the expected behavior happens
2022-02-22 02:28:21 +00:00
Harshit Malpani
bf7934aa84 esp_https_ota: fix for checking chip id at start of OTA 2022-02-21 13:55:53 +05:30
Martin Valik
e898e4b2f5 Bugfix: make wTotalLength uint16_t to avoid truncation 2022-02-18 15:51:05 +08:00
Darian Leung
c46b74191e usb: Add USB Host Library documentation
This commit adds the USB Host Library documentation and fixes some nitpicks
in the Host Stack types.

Closes https://github.com/espressif/esp-idf/issues/6408
2022-02-18 15:51:05 +08:00
Darian Leung
ebd058c8c9 usb: Update USB Host Library
This commit updates the USB Host Library as follows:

- usb_helpers.h
    - Removed dependency on USB Host Library API
    - Added function to print string descriptors
- usbh
    - Fixed bug where an interface/endpoint could be claimed/allocated multiple times
    - Removed redundant device ref_count change
- Added unit test for USB Host Library API usage
2022-02-18 15:51:05 +08:00
Darian Leung
50bbdbc1de usb: Hub Driver and USBH recover port automatically after disconnection
This commit updates the Hub Driver and USBH as follows:
- Updated communication mechanism between Hub Driver and USBH
    - USBH notifies the Hub Driver via Hub request callback (usbh_hub_req_cb_t)
    - Hub Driver notifies the USBH via usbh_hub_pass_event()
- Hub Driver now defers all event handling to hub_process.
- Hub Driver and USBH will now automatically recover the port after a disconnected
    device has been closed.
- Fixed incorrect assert in usbh_dev_close()
2022-02-18 15:51:05 +08:00
Darian Leung
ea6de613bf usb: Hub Driver Update and Refactor
Hub Driver is refactored as follows:

This commit update and refactors the Hub Driver as follows:

- Refactored enumeration state machine and stage functions
    - Enumeration stage is now incremented
    - Combined transfer stages of enumeration into common functions
- Comments updated
- Fixed usbh_hal_disable_debounce_lock() that would cause root_port_handle_events()
    to fail the HCD_PORT_CMD_RESET call because the previous port connection interrupt
    was not cleared.

The following features were added to the Hub Driver

- Enumeration config descriptor is now fetched in two separate stages
    - Header is fetched first to determine the wTotalLength of the descriptor
    - Fetching the full descriptor will request exactly wTotalLength bytes
    - This works around some non-compliant devices that will babble/return zero
        when requesting a length > wTotalLength
    - Closes https://github.com/espressif/esp-idf/issues/7799
- Enumeration now stores string descriptors
    - The Manufacturer, Product, and Serial Number string descriptors are
        now read and stored during enumeration
    - String descriptors are now part of usb_device_info_t
- Added unit test to test enumeration
2022-02-18 15:51:05 +08:00