essl: move from esp-idf component to extra component

This commit is contained in:
Michael (XIAO Xufeng)
2022-09-19 14:23:37 +08:00
parent af28c1fa21
commit 02a9de904a
29 changed files with 425 additions and 92 deletions

View File

@@ -65,7 +65,7 @@ The component can be installed by esp component manager. Since this example alre
idf.py add-dependency espressif/es8311==0.0.2-alpha
```
If the dependency is added, you can check `idf_component.yml` for more detail. When building this example or other project with managed component in it, the component manager will search the component online and download it under the `managed_componets` folder.
If the dependency is added, you can check `idf_component.yml` for more detail. When building this example or other projects with managed components, the component manager will search for the required components online and download them into the `managed_componets` folder.
### Configure the Project

View File

@@ -104,8 +104,14 @@ and ``api_reference/peripherals/sd_pullup_requirements`` to see more
descriptions about pullups and MTDI requirements and solutions of official
modules and devkits.
## About `esp_serial_slave_link` component used in this example
## About `esp_serial_slave_link` component used in the host example
`esp_serial_slave_link` component in the IDF is used to communicate to a ESP slave device.
When the `esp_serial_slave_link` device is initialized with an `essl_sdio_config_t` structure,
the `esp_serial_slave_link` can be used to communicate with an ESP32 SDIO slave.
The host example is based on [esp_serial_slave_link component](https://components.espressif.com/components/espressif/esp_serial_slave_link), which is used to communicate to a ESP slave device.
The component can be installed by esp component manager. Since this example already installed it, no need to re-installed it again, but if you want to install this component in your own project, you can input the following command:
```
idf.py add-dependency espressif/esp_serial_slave_link
```
If the dependency is added, you can check `idf_component.yml` for more detail. When building this example or other projects with managed components, the component manager will search for the required components online and download them into the `managed_componets` folder.

View File

@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <inttypes.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -24,6 +25,8 @@
#include "sdkconfig.h"
#include "driver/sdmmc_host.h"
#include "driver/sdspi_host.h"
#include "sdmmc_cmd.h"
#define TIMEOUT_MAX UINT32_MAX

View File

@@ -0,0 +1,3 @@
dependencies:
idf: ">=5.0"
espressif/esp_serial_slave_link: ">=1.0.0"

View File

@@ -31,6 +31,17 @@ This example requires 2 targets. Here we use 2 ESP32S2 DevKits to act as the SPI
Feel free to modify the pin setting defined on the top of the ``app_main.c``.
### Dependency
The master example is based on [esp_serial_slave_link component](https://components.espressif.com/components/espressif/esp_serial_slave_link), which is used to communicate to a ESP slave device.
The component can be installed by esp component manager. Since this example already installed it, no need to re-installed it again, but if you want to install this component in your own project, you can input the following command:
```
idf.py add-dependency espressif/esp_serial_slave_link
```
If the dependency is added, you can check `idf_component.yml` for more detail. When building this example or other projects with managed components, the component manager will search for the required components online and download them into the `managed_componets` folder.
### Configure the project
* Set the target of the build (where `{IDF_TARGET}` stands for the target chip such as `esp32s2`).

View File

@@ -8,6 +8,8 @@
*/
#include "esp_log.h"
#include "esp_err.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/spi_common.h"
#include "driver/spi_master.h"
#include "esp_serial_slave_link/essl.h"

View File

@@ -0,0 +1,3 @@
dependencies:
idf: ">=5.0"
espressif/esp_serial_slave_link: ">=1.0.0"

View File

@@ -14,7 +14,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "driver/spi_slave_hd.h"
#include "esp_serial_slave_link/essl_spi.h"
#define GPIO_MOSI 11
#define GPIO_MISO 13

View File

@@ -0,0 +1,3 @@
dependencies:
idf: ">=5.0"
espressif/esp_serial_slave_link: ">=1.0.0"