Commit 2bc8c77b authored by Sylvio Alves's avatar Sylvio Alves Committed by Carles Cufi
Browse files

samples: esp32: update to hal_espressif v5.1



Modify and reorganize SoC to meet updated hal.

Signed-off-by: default avatarSylvio Alves <sylvio.alves@espressif.com>
parent ad12a06e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,
+3 −2
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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>
+2 −1
Original line number Diff line number Diff line
@@ -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.