Skip to content

Commit 4576921

Browse files
authored
Move prototype for enablePhaseLockedWaveform linker magic into header that's included by default instead of particular internal core header. (#7996)
1 parent cfbbd6f commit 4576921

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

cores/esp8266/core_esp8266_features.h

+3
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ inline int esp_get_cpu_freq_mhz()
122122
}
123123
#endif
124124

125+
// Call this function in your setup() to cause the phase locked version of the generator to
126+
// be linked in automatically. Otherwise, the default PWM locked version will be used.
127+
void enablePhaseLockedWaveform(void);
125128

126129
#ifdef __cplusplus
127130
}

cores/esp8266/core_esp8266_waveform.h

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@
7272
extern "C" {
7373
#endif
7474

75-
// Call this function in your setup() to cause the phase locked version of the generator to
76-
// be linked in automatically. Otherwise, the default PWM locked version will be used.
77-
void enablePhaseLockedWaveform(void);
78-
79-
8075
// Start or change a waveform of the specified high and low times on specific pin.
8176
// If runtimeUS > 0 then automatically stop it after that many usecs, relative to the next
8277
// full period.

libraries/esp8266/examples/FadePolledTimeout/FadePolledTimeout.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
2424
*/
2525

26-
#include <core_esp8266_waveform.h>
2726
#include <PolledTimeout.h>
2827

2928
esp8266::polledTimeout::periodicFastUs stepPeriod(50000);
@@ -33,8 +32,8 @@ void setup() {
3332
Serial.begin(115200);
3433
Serial.println();
3534

36-
// This next line will call will cause the code to use the Phase-Locked waveform generator
37-
// instead of the default one. Comment it out to try the default version.
35+
// This next line will cause the code to use the Phase-Locked waveform generator
36+
// instead of the default PWM-Locked one. Comment it out to try the default version.
3837
// For more information on choosing between the two options, see the following pull requests:
3938
// Phase-Locked generator: https://github.com/esp8266/Arduino/pull/7022
4039
// PWM-Locked generator: https://github.com/esp8266/Arduino/pull/7231

0 commit comments

Comments
 (0)