Skip to content

Commit 2cd2e47

Browse files
committed
Add LibreTiny support macros
1 parent 35b4900 commit 2cd2e47

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/AsyncTCP.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "AsyncTCP.h"
55

6+
#ifdef ESP32
67
#include <esp_log.h>
78

89
#ifdef ARDUINO
@@ -22,6 +23,11 @@ static unsigned long millis() {
2223
return (unsigned long)(esp_timer_get_time() / 1000ULL);
2324
}
2425
#endif
26+
#endif
27+
28+
#ifdef LIBRETINY
29+
#include <Arduino.h>
30+
#endif
2531

2632
extern "C" {
2733
#include "lwip/dns.h"

src/AsyncTCP.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
#include "AsyncTCPVersion.h"
88
#define ASYNCTCP_FORK_ESP32Async
99

10+
#ifdef ESP32
1011
#include <esp_idf_version.h>
12+
#else
13+
#define ESP_IDF_VERSION_MAJOR (0)
14+
#endif
1115

1216
#ifdef ARDUINO
1317
#include "IPAddress.h"
@@ -29,9 +33,11 @@ extern "C" {
2933
#else
3034
extern "C" {
3135
#include <lwip/pbuf.h>
36+
#include <FreeRTOS.h>
3237
#include <semphr.h>
3338
}
3439
#define CONFIG_ASYNC_TCP_RUNNING_CORE -1 // any available core
40+
#define CONFIG_FREERTOS_UNICORE 1
3541
#endif
3642

3743
// If core is not defined, then we are running in Arduino or PIO

0 commit comments

Comments
 (0)