SPI Driver "spi_driver_s" contains the SPI Device "spi_dev_s" ... That we need for testing the SPI Interface! But the SPI Device is private and hidden from apps 🙁

github.com/lupyuen/incubator-n

Show thread

Instead we copy an existing SPI Device Driver to test the SPI Interface ... We pick the simplest smallest SPI Device Driver: dat-31r5-sp

docs.google.com/spreadsheets/d

Show thread

Every Device Driver defines the File Operations for the device ... Here are the open(), close(), read(), write() and ioctl() operations for our SPI Test Driver

github.com/lupyuen/incubator-n

Show thread

In the write() operation for our SPI Test Driver, we 1️⃣ Lock the SPI Bus 2️⃣ Config the SPI Interface 3️⃣ Select the SPI Device 4️⃣ Transfer SPI Data 5️⃣ Deselect and Unlock

github.com/lupyuen/incubator-n

Show thread
Show more

@lupyuen -- If I'm understanding this code correctly, then it is very clean and straight forward. Good job!!! 👍

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.