samples: esp32: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
parent
ad12a06e2e
commit
2bc8c77b4e
4 changed files with 8 additions and 6 deletions
|
@ -5,7 +5,7 @@ mainmenu "Espressif Deep Sleep demo"
|
|||
|
||||
config EXAMPLE_EXT1_WAKEUP
|
||||
bool "Enable wakeup from GPIO"
|
||||
depends on !SOC_ESP32C3
|
||||
depends on !SOC_SERIES_ESP32C3
|
||||
help
|
||||
This option enables wake up from deep sleep from GPIO2 and
|
||||
GPIO4. They should be connected to LOW to avoid floating pins.
|
||||
|
@ -14,7 +14,7 @@ config EXAMPLE_EXT1_WAKEUP
|
|||
|
||||
config EXAMPLE_GPIO_WAKEUP
|
||||
bool "Enable wakeup from GPIO"
|
||||
depends on SOC_ESP32C3
|
||||
depends on SOC_SERIES_ESP32C3
|
||||
help
|
||||
This option enables wake up from GPIO, only GPIO0~5 can be used
|
||||
to wake up. Be aware that when low level is used to trigger wakeup,
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
#include <zephyr/drivers/flash.h>
|
||||
#include <zephyr/storage/flash_map.h>
|
||||
|
||||
#include <esp_spi_flash.h>
|
||||
#include <esp_flash.h>
|
||||
#include <spi_flash_mmap.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
|
@ -45,7 +46,7 @@ int main(void)
|
|||
|
||||
/* read flash content without decrypting content */
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
spi_flash_read(address, &buffer, sizeof(buffer));
|
||||
esp_flash_read(NULL, &buffer, address, sizeof(buffer));
|
||||
LOG_HEXDUMP_INF(buffer, sizeof(buffer), "FLASH RAW DATA (Encrypted)");
|
||||
|
||||
/* read flash content and decrypt */
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <zephyr/drivers/flash.h>
|
||||
#include <zephyr/storage/flash_map.h>
|
||||
|
||||
#include <esp_spi_flash.h>
|
||||
#include <spi_flash_mmap.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
#include <zephyr/pm/device.h>
|
||||
#include <zephyr/pm/policy.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include "esp_sleep.h"
|
||||
#include <esp_sleep.h>
|
||||
#include <driver/gpio.h>
|
||||
|
||||
/* Most development boards have "boot" button attached to GPIO0.
|
||||
* You can also change this to another pin.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue