-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docs/add_esp_msc_ota_doc' into 'master'
docs: add usb msc ota docs Closes AEG-1009 See merge request ae_group/esp-iot-solution!919
- Loading branch information
Showing
49 changed files
with
246 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
ESP MSC OTA | ||
============== | ||
|
||
:link_to_translation:`zh_CN:[中文]` | ||
|
||
`esp_msc_ota`` is an OTA (Over-The-Air) driver based on USB MSC (USB Mass Storage Class). It supports reading programs from a USB flash drive and burning them into a designated OTA partition, thereby enabling OTA upgrades via USB. | ||
|
||
Features: | ||
|
||
1. Supports OTA updates by retrieving programs from a USB flash drive via USB interface. | ||
2. Supports hot-plugging of the USB flash drive. | ||
|
||
User Guide | ||
------------ | ||
|
||
Hardware requirements: | ||
|
||
- Any ESP32-S2/ESP32-S3 development board with a USB interface capable of providing external power. | ||
- A USB flash drive using the BOT (Bulk-Only Transport) protocol and Transparent SCSI command set. | ||
|
||
Partition Table: | ||
|
||
- Includes an OTA partition. | ||
|
||
Code examples | ||
--------------- | ||
|
||
1. Call `esp_msc_host_install` to initialize the MSC host driver. | ||
|
||
.. code:: c | ||
esp_msc_host_config_t msc_host_config = { | ||
.base_path = "/usb", | ||
.host_driver_config = DEFAULT_MSC_HOST_DRIVER_CONFIG(), | ||
.vfs_fat_mount_config = DEFAULT_ESP_VFS_FAT_MOUNT_CONFIG(), | ||
.host_config = DEFAULT_USB_HOST_CONFIG() | ||
}; | ||
esp_msc_host_handle_t host_handle = NULL; | ||
esp_msc_host_install(&msc_host_config, &host_handle); | ||
2. Call `esp_msc_ota` to complete OTA updates. Use :cpp:type:`ota_bin_path` to specify the OTA file path and :cpp:type:`wait_msc_connect` to specify the waiting time for USB drive insertion in FreeRTOS ticks. | ||
|
||
.. code:: c | ||
esp_msc_ota_config_t config = { | ||
.ota_bin_path = "/usb/ota_test.bin", | ||
.wait_msc_connect = pdMS_TO_TICKS(5000), | ||
}; | ||
esp_msc_ota(&config); | ||
3. Call `esp_event_handler_register` to register the event handler for obtaining OTA process details. | ||
|
||
.. code:: c | ||
esp_event_loop_create_default(); | ||
esp_event_handler_register(ESP_MSC_OTA_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL); | ||
API Reference | ||
---------------- | ||
|
||
.. include-build-file:: inc/esp_msc_ota.inc |
3 changes: 2 additions & 1 deletion
3
docs/en/usb/usb_host_index.rst → docs/en/usb/usb_host/usb_host_index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
USB Host Drivers | ||
********************* | ||
====================== | ||
|
||
:link_to_translation:`zh_CN:[中文]` | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
USB UVC/UAC Host <usb_stream> | ||
USB MSC OTA <esp_msc_ota> | ||
USB CDC Host <usb_host_iot_usbh_cdc> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
USB Host & Device | ||
=================== | ||
|
||
:link_to_translation:`zh_CN:[中文]` | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
USB Overview <usb_overview> | ||
USB OTG <usb_otg> | ||
USB Serial JTAG <usb_serial_jtag> | ||
USB PHY <usb_phy> | ||
USB VID PID <usb_vid_pid> | ||
USB Host Solution <usb_host_solutions> | ||
USB Device Solution <usb_device_solutions> | ||
USB Self Power Device <usb_device_self_power> | ||
USB Device Set Const COM <usb_device_const_COM> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.