Skip to content

Commit

Permalink
Fix apa102 output for esp32 where the compiler is optimizing some of …
Browse files Browse the repository at this point in the history
…our pin writes out a little too aggressively
  • Loading branch information
Daniel Garcia committed Sep 8, 2018
1 parent 6d0cc96 commit d7007f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fastspi_bitbang.h
Expand Up @@ -123,6 +123,9 @@ class AVRSoftwareSPIOutput {
//cli();
if(b & (1 << BIT)) {
FastPin<DATA_PIN>::hi();
#ifdef ESP32
FastPin<CLOCK_PIN>::lo(); // kick a different register, block premature optimizations?
#endif
FastPin<CLOCK_PIN>::hi(); CLOCK_HI_DELAY;
FastPin<CLOCK_PIN>::lo(); CLOCK_LO_DELAY;
} else {
Expand Down

0 comments on commit d7007f4

Please sign in to comment.