adafruit / Adafruit_DotStar

GNU General Public License v3.0
97 stars 58 forks source link

Cannot compile strandtest example on 5V trinket #50

Closed JinShil closed 1 year ago

JinShil commented 1 year ago
  1. Install the DotStar Library
  2. Load the strandtest example
  3. Comment out #include <SPI.h> and uncomment #include <avr/power.h>
  4. Compile
In file included from /home/mike/Arduino/strandtest/strandtest.ino:8:0:
/home/mike/Arduino/libraries/Adafruit_DotStar/Adafruit_DotStar.h:191:3: error: 'Adafruit_SPIDevice' does not name a type; did you mean 'Adafruit_SPIDevice_h'?
   Adafruit_SPIDevice *spi_dev = NULL; ///< Pointer to SPI bus interface
   ^~~~~~~~~~~~~~~~~~
   Adafruit_SPIDevice_h
caternuson commented 1 year ago

Hmm. BusIO supports software SPI. But this define from the BSP: https://github.com/adafruit/Adafruit_Arduino_Boards/blob/3751f438bb2cff9b5970d1056c4a2e91876a93f0/variants/tiny8/pins_arduino.h#L50 will cause this one: https://github.com/adafruit/Adafruit_BusIO/blob/e89ae64bd3d2474d770bbed77e58686c39c0cecf/Adafruit_SPIDevice.h#L6-L7 to effectively produce a blank file (same for the .cpp)

caternuson commented 1 year ago

This is related to this: https://github.com/adafruit/Adafruit_BusIO/issues/81

caternuson commented 1 year ago

Closing. Should be fixed by BusIO updates. Update the Adafruit_BusIO library to latest release.