Skip to content

Commit 020a39a

Browse files
Merge branch 'master' into to_2.5.0-4
2 parents 4946465 + d968435 commit 020a39a

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

cores/esp8266/core_esp8266_main.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ extern "C" void optimistic_yield(uint32_t interval_us) {
121121
}
122122
}
123123

124+
extern "C" void __loop_end (void)
125+
{
126+
run_scheduled_functions();
127+
run_scheduled_recurrent_functions();
128+
}
129+
130+
extern "C" void loop_end (void) __attribute__ ((weak, alias("__loop_end")));
131+
124132
static void loop_wrapper() {
125133
static bool setup_done = false;
126134
preloop_update_frequency();
@@ -129,8 +137,7 @@ static void loop_wrapper() {
129137
setup_done = true;
130138
}
131139
loop();
132-
run_scheduled_functions();
133-
run_scheduled_recurrent_functions();
140+
loop_end();
134141
esp_schedule();
135142
}
136143

cores/esp8266/core_esp8266_wiring.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void delay_end(void* arg) {
4343
esp_schedule();
4444
}
4545

46-
void delay(unsigned long ms) {
46+
void __delay(unsigned long ms) {
4747
if(ms) {
4848
os_timer_setfn(&delay_timer, (os_timer_func_t*) &delay_end, 0);
4949
os_timer_arm(&delay_timer, ms, ONCE);
@@ -56,6 +56,8 @@ void delay(unsigned long ms) {
5656
}
5757
}
5858

59+
void delay(unsigned long ms) __attribute__ ((weak, alias("__delay")));
60+
5961
void micros_overflow_tick(void* arg) {
6062
(void) arg;
6163
uint32_t m = system_get_time();

doc/PROGMEM.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ the ``F()`` macro and possibly the FPSTR() macro. These are defined in `WString.
116116
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
117117
#define F(string_literal) (FPSTR(PSTR(string_literal)))
118118
119-
So ``FSPTR()`` takes a PROGMEM pointer to a string and casts it to this
119+
So ``FPSTR()`` takes a PROGMEM pointer to a string and casts it to this
120120
``__FlashStringHelper`` class. Thus if you have defined a string as
121121
above ``xyz`` you can use ``FPSTR()`` to convert it to
122122
``__FlashStringHelper`` for passing into functions that take it.

0 commit comments

Comments
 (0)