Skip to content

Commit

Permalink
Still need patched PWM for core 2.5.0
Browse files Browse the repository at this point in the history
Still need patched PWM for core 2.5.0
  • Loading branch information
arendst committed Dec 21, 2018
1 parent c1102a4 commit 893f64c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions sonoff/core_esp8266_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

// Use PWM from core 2.4.0 as all other version produce LED flickering when settings are saved to flash. Still true for 2.5.0
//#include <core_version.h>
//#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
//#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
//#warning **** Tasmota is using v2.4.0 timer.c as planned ****

#include "wiring_private.h"
Expand Down Expand Up @@ -106,4 +108,4 @@ void ICACHE_RAM_ATTR timer0_detachInterrupt(void) {
ETS_CCOMPARE0_DISABLE();
}

//#endif // ARDUINO_ESP8266_RELEASE_2_3_0
//#endif // ARDUINO_ESP8266_RELEASE
6 changes: 4 additions & 2 deletions sonoff/core_esp8266_wiring_digital.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

// Use PWM from core 2.4.0 as all other version produce LED flickering when settings are saved to flash. Still true for 2.5.0
//#include <core_version.h>
//#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
//#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
//#warning **** Tasmota is using v2.4.0 wiring_digital.c as planned ****

#define ARDUINO_MAIN
Expand Down Expand Up @@ -212,4 +214,4 @@ extern int digitalRead(uint8_t pin) __attribute__ ((weak, alias("__digitalRead")
extern void attachInterrupt(uint8_t pin, voidFuncPtr handler, int mode) __attribute__ ((weak, alias("__attachInterrupt")));
extern void detachInterrupt(uint8_t pin) __attribute__ ((weak, alias("__detachInterrupt")));

//#endif // ARDUINO_ESP8266_RELEASE_2_3_0
//#endif // ARDUINO_ESP8266_RELEASE
6 changes: 4 additions & 2 deletions sonoff/core_esp8266_wiring_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

// Use PWM from core 2.4.0 as all other version produce flicker when settings are saved to flash. Still true for 2.5.0
//#include <core_version.h>
//#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
//#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
//#warning **** Tasmota is using v2.4.0 wiring_pwm.c as planned ****

#include "wiring_private.h"
Expand Down Expand Up @@ -224,4 +226,4 @@ extern void analogWrite(uint8_t pin, int val) __attribute__ ((weak, alias("__ana
extern void analogWriteFreq(uint32_t freq) __attribute__ ((weak, alias("__analogWriteFreq")));
extern void analogWriteRange(uint32_t range) __attribute__ ((weak, alias("__analogWriteRange")));

//#endif // ARDUINO_ESP8266_RELEASE_2_3_0
//#endif // ARDUINO_ESP8266_RELEASE

0 comments on commit 893f64c

Please sign in to comment.