adafruit / Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
https://learn.adafruit.com/adafruit-gfx-graphics-library
Other
2.36k stars 1.53k forks source link

Arduino Due Hardware SPI support (or not working if supported) #277

Closed drakejest closed 4 years ago

drakejest commented 4 years ago

This is in relation to the issue of a library that inherited from this library SSD1315

If you may have noticed from the linked issue, im having trouble making Hardware SPI working it would seem that that library does not handle the SPI but is instead passed to this library.

on line 54 of the SPITFT.h

`// Arduino Due? typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit // USE_FAST_PINIO not available here (yet)...Due has a totally different // GPIO register set and will require some changes elsewhere (e.g. in // constructors especially).

endif

else // !ARM

// Probably ESP8266 or ESP32. USE_FAST_PINIO is not available here (yet) // but don't worry about it too much...the digitalWrite() implementation // on these platforms is reasonably efficient and already RAM-resident, // only gotcha then is no parallel connection support for now. typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit

endif // end !ARM`

will require some changes elsewhere (e.g. in constructors especially). with that line i am not sure if the DUE is even supported. Which constructors need changing so i can change them

I asked everywhere for help, and it looks like this is the last place.

ladyada commented 4 years ago

hi sure, please submit a PR if you have a fix. we have no ETA on when we would look at this fix, we don't recommend the Due in general - its not very well supported

drakejest commented 4 years ago

hi sure, please submit a PR if you have a fix. we have no ETA on when we would look at this fix, we don't recommend the Due in general - its not very well supported

Thats unfortunate the DUE is arduinos fastest board perfect for a display (exempt the portenta that thing basically used the fastest microcontroller available). I will try what i can do with the limit resources i have. If i ever get it sorted out I will suggest the necesarry edits. I will most probably only make it work , i simply dont have the tools to furthur optimize the speed

ladyada commented 4 years ago

you could try metro m4 https://www.digikey.com/product-detail/en/adafruit-industries-llc/3382/1528-2605-ND/9342520 it is 120MHz https://learn.adafruit.com/adafruit-metro-m4-express-featuring-atsamd51

drakejest commented 4 years ago

I have found the problem, and its not with this library it is with the SSD1351 library. i have posted a possible fix in the issue thread there since this library there is no need to edit this library for my suggested fix.

ladyada commented 4 years ago

great!