adafruit / Adafruit_ILI9341

Library for Adafruit ILI9341 displays
410 stars 283 forks source link

Support Teensy 3.x & fix null pointer write #1

Closed PaulStoffregen closed 10 years ago

PaulStoffregen commented 10 years ago

This pull request restores Teensy 3.x support, which broke when Arduino Due was added.

Somehow writes to the "clkport" pointer got into the higher level code. When hwSPI is true, clkport defaults to a NULL pointer. On AVR, this merely overwrites registers. On ARM, it creates a memory fault, since the flash memory isn't writable. I'm not sure what the original intention of writing to clkport was in that code, but doing it there is certainly a bug on all platforms. I commented out these clkport writes.

ladyada commented 10 years ago

Thanx - probably left over from bitbanging.