Skip to content

Commit

Permalink
esp32-crypt.h: update all ROM includes for IDF 5.4 compatibility.
Browse files Browse the repository at this point in the history
Starting from IDF 5.4 ROM includes should not use the target prefix in the
include folder, see
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/migration-guides/release-5.x/5.4/system.html#esp-rom

Removed commented out rom includes.
  • Loading branch information
5p4k committed Jan 26, 2025
1 parent 3379328 commit b600935
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ enum {
#include <driver/periph_ctrl.h>
#endif

#if ESP_IDF_VERSION_MAJOR >= 4
#if ESP_IDF_VERSION_MAJOR == 4 || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR < 4)
#include <esp32/rom/ets_sys.h>
#else
#include <rom/ets_sys.h>
Expand Down Expand Up @@ -375,9 +375,7 @@ enum {
#include <driver/periph_ctrl.h>
#endif

#if ESP_IDF_VERSION_MAJOR >= 4
/* #include <esp32/rom/ets_sys.h> */
#else
#if ESP_IDF_VERSION_MAJOR < 4
#include <rom/ets_sys.h>
#endif

Expand Down Expand Up @@ -411,9 +409,7 @@ enum {
#include <driver/periph_ctrl.h>
#endif

#if ESP_IDF_VERSION_MAJOR >= 4
/* #include <esp32/rom/ets_sys.h> */
#else
#if ESP_IDF_VERSION_MAJOR < 4
#include <rom/ets_sys.h>
#endif

Expand Down Expand Up @@ -447,9 +443,7 @@ enum {
#include <driver/periph_ctrl.h>
#endif

#if ESP_IDF_VERSION_MAJOR >= 4
/* #include <esp32/rom/ets_sys.h> */
#else
#if ESP_IDF_VERSION_MAJOR < 4
#include <rom/ets_sys.h>
#endif

Expand Down Expand Up @@ -719,7 +713,9 @@ extern "C"
*/

#ifndef NO_AES
#if ESP_IDF_VERSION_MAJOR >= 4
#if ESP_IDF_VERSION_MAJOR > 5 || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 4)
#include "rom/aes.h"
#elif ESP_IDF_VERSION_MAJOR >= 4
#include "esp32/rom/aes.h"
#elif defined(CONFIG_IDF_TARGET_ESP8266)
/* no hardware includes for ESP8266*/
Expand Down Expand Up @@ -780,7 +776,14 @@ extern "C"

#define SHA_CTX ETS_SHAContext

#if ESP_IDF_VERSION_MAJOR >= 4
#if ESP_IDF_VERSION_MAJOR > 5 || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 4)
#include "rom/sha.h"
#if defined(CONFIG_IDF_TARGET_ESP32)
#define WC_ESP_SHA_TYPE enum SHA_TYPE
#else
#define WC_ESP_SHA_TYPE SHA_TYPE
#endif
#elif ESP_IDF_VERSION_MAJOR >= 4
#if defined(CONFIG_IDF_TARGET_ESP32)
#include "esp32/rom/sha.h"
#define WC_ESP_SHA_TYPE enum SHA_TYPE
Expand Down

0 comments on commit b600935

Please sign in to comment.