It seems that IRAM_ATTR is not defined when clang-tidy checks leading to
errors like the following:
```
Error: /__w/esphome/esphome/.pio/libdeps/livingroom8266/NeoPixelBus/src/internal/NeoEsp8266DmaMethod.h:244:17: error: variable has incomplete type 'void' [clang-diagnostic-error]
static void IRAM_ATTR i2s_slc_isr(void)
^
```
Include Arduino.h in global context just like in other header files
makes sure that IRAM_ATTR is defined in all cases.
* Fix clang-tidy pointer cast error
clang-tidy reports:
./src/internal/NeoEsp8266DmaMethod.h:317:46: error: cast from pointer to smaller type 'uint32_t' (aka 'unsigned int') loses information [clang-diagnostic-error]
_i2sBufDesc[indexDesc].buf_ptr = reinterpret_cast<uint32_t>(is2Buffer);
^
./src/internal/NeoEsp8266DmaMethod.h:492:58: error: cast from pointer to smaller type 'uint32_t' (aka 'unsigned int') loses information [clang-diagnostic-error]
(finished_item + 1)->next_link_ptr = reinterpret_cast<uint32_t>(finished_item);
Use pointers instead of integers for pointers. This makes quite some
casts unnecessary.
* Use struct slc_queue_item* as datatype for next pointer
* Fix header file comment
* Add TwoWireHspiImpl and Example
* Add start of TwoWireEsp32DmaSpiImple (Currently just able to use HSPI and VSPI in parallel, no DMA)
* Update names for TwoWireEsp32DmaSpi and set set spi_bus using template not constructor
* Update example with new functionality and bugfixes
* DotStarEsp32DmaSpiMethod -
* Add 5MHz option to all SPI-based classes
* DotStarGenericMethod - Give option to use Vspi alias of Spi class if wanting to specify which SPI peripheral is used on the ESP32
- Add missing DotStarHspiHzMethod
* TwoWireHspiImple - bring up to date with applySettings() method
* DotStarTest_Esp32Advanced example - update to show how to change clock speed at runtime
- Remove commented out pins cluttering up example
* DotStarTest_Esp32DmaSpi example -
Co-authored-by: Louis Beaudoin <louis@embedded-creations.com>
Fixes#457
This workaround, compared to the old implementation of throwing an exception,
is simpler, makes the compiled program 260 smaller, and unbreaks existing code
that uses a pixel count of 1 that used to work prior to 2cce77e9 (v2.6.2).
This fix basically does the same thing as the recommended fix on the caller
side, except without bothering the caller. It does make `.GetPixelCount()`
return 2 instead of the provided number of pixels, but the resulting program is
arguably less broken than it is with the failing check at construction, and not
likely to really be much of an issue anyway.