Skip to content

Commit

Permalink
Merge pull request #7542 from gojimmypi/PR-Espressif-PlatformIO-semphr
Browse files Browse the repository at this point in the history
Fix PlatformIO freertos semphr.h include
  • Loading branch information
dgarske authored May 16, 2024
2 parents fe7f92c + 7f1af2f commit 55ea330
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
#endif

#ifndef SINGLE_THREADED
#ifdef PLATFORMIO
#include <freertos/semphr.h>
#else
#include "semphr.h"
#endif
#endif

/* Espressif */
#include "sdkconfig.h" /* programmatically generated from sdkconfig */
#include <esp_log.h>
Expand Down Expand Up @@ -257,9 +265,6 @@ esp_err_t esp_sdk_mem_lib_init(void)
ESP_LOGI(TAG, "esp_sdk_mem_lib_init Ver %d", ESP_SDK_MEM_LIB_VERSION);
return ret;
}
#ifndef SINGLE_THREADED
#include "semphr.h"
#endif

void* wc_debug_pvPortMalloc(size_t size,
const char* file, int line, const char* fname) {
Expand Down
6 changes: 5 additions & 1 deletion wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,11 @@ extern void uITRON4_free(void *p) ;
#endif

#ifndef SINGLE_THREADED
#include "semphr.h"
#ifdef PLATFORMIO
#include <freertos/semphr.h>
#else
#include "semphr.h"
#endif
#endif
#endif

Expand Down

0 comments on commit 55ea330

Please sign in to comment.