diff options
author | Daniel Garcia <dgarcia@dgarcia.net> | 2019-08-12 06:49:58 +0300 |
---|---|---|
committer | Daniel Garcia <dgarcia@dgarcia.net> | 2019-08-12 06:49:58 +0300 |
commit | 031d022d4ce8285f83c4e836defb105a8bf2f131 (patch) | |
tree | cf4e3ca07d16de108dbc930ace8844584c256c34 | |
parent | 09b17833ac60cb61ef63a8bca10a1fc7b75ee4b0 (diff) |
Some tweaks to chipset definitions to help out the Teensy 4 implementation
-rw-r--r-- | chipsets.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -398,10 +398,15 @@ class SM16716Controller : public CPixelLEDController<RGB_ORDER> { void writeHeader() { // Write out 50 zeros to the spi line (6 blocks of 8 followed by two single bit writes) mSPI.select(); - mSPI.writeBytesValueRaw(0, 6); - mSPI.waitFully(); mSPI.template writeBit<0>(0); + mSPI.writeByte(0); + mSPI.writeByte(0); + mSPI.writeByte(0); mSPI.template writeBit<0>(0); + mSPI.writeByte(0); + mSPI.writeByte(0); + mSPI.writeByte(0); + mSPI.waitFully(); mSPI.release(); } @@ -524,7 +529,13 @@ class PL9823Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL // Similar to NS() macro, this calculates the number of cycles for // the clockless chipset (which may differ from CPU cycles) + +#ifdef FASTLED_TEENSY4 +// just use raw nanosecond values for the teensy4 +#define C_NS(_NS) _NS +#else #define C_NS(_NS) (((_NS * ((CLOCKLESS_FREQUENCY / 1000000L)) + 999)) / 1000) +#endif // GE8822 - 350ns 660ns 350ns template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB> |