bitbank2 / SPI_LCD

A simple C library for directly communicating with SPI-connected LCD displays
GNU General Public License v3.0
112 stars 24 forks source link

Armbian NEO #2

Closed GeoDirk closed 6 years ago

GeoDirk commented 6 years ago

I'm not getting anywhere when trying to use this library on an Armbian mainline/ NanoPi NEO. I uncomment the #define USE_NANOPI2 line and use the #define USE_GENERIC lines. Do the 'make' and then the 'make -f make_sample' without any issues. However, when I try to run the lcd sample, I'm getting:

root@connectbox:~/SPI_LCD# ./lcd Error setting SPI mode Error setting SPI speed Failed to open the SPI bus Problem initializing spilcd library

Any ideas of what is missing and how I can get this running?

bitbank2 commented 6 years ago

You did it correctly. I'm not sure of the GPIO pinout on the NEO. Are you sure it's compatible with the NanoPi2? The error may be due to your selection of the SPI bus number. You need to look in /dev and see what SPI buses are available (e.g. /dev/spidev0.0). This would be passed as 0 to the spilcdInit() function.

bitbank2 commented 6 years ago

I just ordered a NanoPi NEO. It should arrive Nov 13th. I'll add a pinout translation table to SPI_LCD when I get it.

bitbank2 commented 6 years ago

I just added a pin lookup table for the NanoPI NEO. It works fine with my ILI9341 connected to it. Using Armbian 4.13.12, the SPI speed measures at 19FPS (reasonable).