Skip to content

Commit 555c272

Browse files
committed
Hunt down debug.h and roll-back
TODO: rename it to something else... it is an internal header
1 parent 65fab13 commit 555c272

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

cores/esp8266/Arduino.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ using std::round;
231231
using std::isinf;
232232
using std::isnan;
233233

234-
// Use stdlib abs() and round() to avoid issues with the C++ libraries
235-
// TODO: does C code need Arduino macros?
234+
// Use float-compatible stl abs() and round(), we don't use Arduino macros to avoid issues with the C++ libraries
235+
// TODO: ...does C code need Arduino macros?
236236
using std::abs;
237237
using std::round;
238238

@@ -287,6 +287,7 @@ inline void configTzTime(const char* tz, const char* server1,
287287

288288
#endif // __cplusplus
289289

290+
#include "debug.h"
290291
#include "pins_arduino.h"
291292

292293
#endif

cores/esp8266/Esp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class EspClass {
174174
}
175175
#else
176176
uint32_t getCycleCount();
177-
#endif
177+
#endif // ifndef CORE_MOCK
178178
};
179179

180180
extern EspClass ESP;

cores/esp8266/core_esp8266_features.h

+5-8
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,7 @@ namespace arduino
8484
// level 15 will disable ALL interrupts,
8585
// level 0 will enable ALL interrupts,
8686
//
87-
#ifdef CORE_MOCK
88-
89-
#define xt_rsil(level) (level)
90-
#define xt_wsr_ps(state) do { (void)(state); } while (0)
91-
92-
#else
93-
87+
#ifndef CORE_MOCK
9488
#define xt_rsil(level) (__extension__({uint32_t state; __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state) :: "memory"); state;}))
9589
#define xt_wsr_ps(state) __asm__ __volatile__("wsr %0,ps; isync" :: "a" (state) : "memory")
9690

@@ -101,7 +95,10 @@ inline uint32_t esp_get_cycle_count() {
10195
return ccount;
10296
}
10397

104-
#endif // ifdef CORE_MOCK
98+
#else
99+
#define xt_rsil(level) (level)
100+
#define xt_wsr_ps(state) do { (void)(state); } while (0)
101+
#endif // ifndef CORE_MOCK
105102

106103

107104
// Tools for preloading code into the flash cache

libraries/ESP8266WiFi/src/ESP8266WiFiSTA-WPS.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include "ESP8266WiFiSTA.h"
2929
#include "coredecls.h" // disable_extra4k_at_link_time()
3030

31-
#include "debug.h"
32-
3331
static void wifi_wps_status_cb(wps_cb_status status);
3432

3533
/**

libraries/ESP8266WiFi/src/include/ClientContext.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ typedef void (*discard_cb_t)(void*, ClientContext*);
2929
extern "C" void esp_yield();
3030
extern "C" void esp_schedule();
3131

32-
#include "DataSource.h"
3332
#include <debug.h>
3433

34+
#include "DataSource.h"
35+
3536
bool getDefaultPrivateGlobalSyncValue ();
3637

3738
class ClientContext

libraries/SDFS/src/SDFS.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "SDFS.h"
2828
#include "SDFSFormatter.h"
2929
#include <FS.h>
30-
#include <debug.h>
3130

3231
using namespace fs;
3332

libraries/SDFS/src/SDFSFormatter.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "SDFS.h"
2727
#include <FS.h>
2828
#include <PolledTimeout.h>
29-
#include <debug.h>
3029

3130
namespace sdfs {
3231

tests/host/common/include/ClientContext.h

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extern "C" void esp_yield();
2828
extern "C" void esp_schedule();
2929

3030
#include <include/DataSource.h>
31+
#include <debug.h>
3132

3233
bool getDefaultPrivateGlobalSyncValue ();
3334

0 commit comments

Comments
 (0)