Closed dhiltonp closed 4 years ago
Any comments?
I have tested this on a Feather M0+ and can confirm it works. I'm using the board's hardware SPI pins. On the board, the pins are labeled "SCK" and "MOSI" and are pins 24 and 23 respectively. Try using those pins and any i/o pin should work for the slave select pin.
2 changes you may want to consider... 1. Set the SPI bus speed as required by Sharp (1 or 2MHz depending on the LCD) 2. Use beginTransaction() and endTransaction() so you don't block other libraries from working. I ran into those issues in testing the library and had to make those changes.
Thank you for your work. So I got it working on a STM32F1 (stm32duino.com) within minutes. I just changed some #ifdefs in the lib (on STM32 I needed SPI.setClockDivider(SPI_CLOCK_DIV16)) I also eliminated the AVR code #ifdefs, so even on AVR's this display runs in SPI mode. http://www.stm32duino.com/viewtopic.php?f=13&p=16557#p16557
So what about this pull request and making this library compatible with other SPI devices? Right now the display works on for example ESP32 or M0 but I can't use it with other SPI devices using hardware SPI on the same SPI pins. For example Adafruit_SSD1325 does supports hardware SPI.
refactored and fixed - we now use busio
I've tested this with the Zero as my non-AVR, and the Leonardo as my AVR board.
I'm unfamiliar with the entire Arduino family; I'd be willing to convert everything to the SPI library. Are there good reasons to not use SPI.h for all platforms?