diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2016-07-22 21:59:46 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2016-07-22 21:59:46 +0300 |
commit | 1ea37122e2d5312b1b67775f76ed2f5e91ae00da (patch) | |
tree | 0cc89bb27023da15879bc6ec28b017f66dd545aa | |
parent | 3155e9a0bc2456a3f836490dd22dc8b06631d225 (diff) |
tweak esp8266 clockless timing output
-rw-r--r-- | platforms/esp/8266/clockless_block_esp8266.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platforms/esp/8266/clockless_block_esp8266.h b/platforms/esp/8266/clockless_block_esp8266.h index 47973fdd..6b8f507b 100644 --- a/platforms/esp/8266/clockless_block_esp8266.h +++ b/platforms/esp/8266/clockless_block_esp8266.h @@ -85,12 +85,12 @@ public: register uint8_t scale = pixels.template getscale<PX>(pixels); for(register uint32_t i = 0; i < USED_LANES; i++) { - while((__clock_cycles() - last_mark) < (T1+T2+T3+6)); + while((__clock_cycles() - last_mark) < (T1+T2+T3)); last_mark = __clock_cycles(); *FastPin<FIRST_PIN>::sport() = PORT_MASK << REAL_FIRST_PIN; uint32_t nword = ((uint32_t)(~b2.bytes[7-i]) & PORT_MASK) << REAL_FIRST_PIN; - while((__clock_cycles() - last_mark) < T1); + while((__clock_cycles() - last_mark) < (T1-6)); *FastPin<FIRST_PIN>::cport() = nword; while((__clock_cycles() - last_mark) < (T1+T2)); @@ -100,12 +100,12 @@ public: } for(register uint32_t i = USED_LANES; i < 8; i++) { - while((__clock_cycles() - last_mark) < (T1+T2+T3+6)); + while((__clock_cycles() - last_mark) < (T1+T2+T3)); last_mark = __clock_cycles(); *FastPin<FIRST_PIN>::sport() = PORT_MASK << REAL_FIRST_PIN; uint32_t nword = ((uint32_t)(~b2.bytes[7-i]) & PORT_MASK) << REAL_FIRST_PIN; - while((__clock_cycles() - last_mark) < T1); + while((__clock_cycles() - last_mark) < (T1-6)); *FastPin<FIRST_PIN>::cport() = nword; while((__clock_cycles() - last_mark) < (T1+T2)); |