SPI Bus on #PineDio Stack #BL604 is wired to 3 devices: 1️⃣ ST7789 Display 2️⃣ LoRa SX1262 3️⃣ SPI Flash ... Each with its own Chip Select Pin ... Let's tweak #NuttX RTOS to support this
https://github.com/lupyuen/pinedio-stack-nuttx#shared-spi-bus
ST7789 Display is wired "backwards" on #PineDio Stack #BL604 ... We fix this by swapping the MISO / MOSI Pins in the #NuttX SPI Driver
https://github.com/lupyuen/pinedio-stack-nuttx#swap-miso--mosi
Here's how we created the SPI Device Table in #NuttX RTOS ... That lists all SPI Devices on #PineDio Stack #BL604
https://github.com/lupyuen/pinedio-stack-nuttx#spi-device-table
#BL602 #NuttX SPI Driver looks up the SPI Device Table to 1️⃣ Swap MISO and MOSI Pins 2️⃣ Flip the Chip Select Pins
https://github.com/lupyuen/pinedio-stack-nuttx#select--deselect-spi-device
At #NuttX Startup, we deselect all SPI Devices ... By flipping their Chip Select Pins to High
https://github.com/lupyuen/pinedio-stack-nuttx#deselect-all-spi-devices
#NuttX RTOS uses MISO as the ST7789 Data / Command Pin ... But ST7789 is wired "backwards" on #PineDio Stack #BL604! We use MOSI as the ST7789 Data / Command Pin instead
https://github.com/lupyuen/pinedio-stack-nuttx#spi-command--data
#BL602 talks to ST7789 Display at SPI Mode 1 or 3 ... Depends whether MISO / MOSI are swapped
Will ST7789 Display play nice with LoRa SX1262 on #PineDio Stack #BL604? Yep SX1262 works OK on the Shared SPI Bus!
https://github.com/lupyuen/pinedio-stack-nuttx#test-shared-spi-bus
Here's how we render some text on #PineDio Stack #BL604 ... With #LVGL Graphics Library
https://github.com/lupyuen/pinedio-stack-nuttx#lvgl-test-app
#LVGL Canvas can render fancy graphics on #PineDio Stack #BL604 @PINE64 ! But be careful: It might need a lot of RAM
https://github.com/lupyuen/pinedio-stack-nuttx#lvgl-test-app
We create an SPI Device Table in #NuttX that defines each device wired to the SPI Bus ... NuttX SPI Driver will use this table to control the SPI Bus
https://github.com/lupyuen/pinedio-stack-nuttx#shared-spi-bus