Writing a device driver
We will now write a Zephyr device-driver for the DM163 led device driver from SiTI. Most of you are already familiar with it, as it is the one present on the RGB matrix board used in SE203.
Our driver will be an out of tree device driver. It means that its source will be kept in the same directory as our application. This is often how drivers are initially built. When they become ready for public consumption, they can be integrated into Zephyr sources.
We will build our device driver so that it is compatible with the led
driver that you have used already. It means that you will be able to use led_on()
, led_off()
and other led-related commands to drive the output of the DM163.
Remember that the DM163 drives only the columns of the led matrix. It is not aware of what a row is, it only knows columns of 8 RGB leds. In order to try our driver, we will have to turn one line transistor on.
💥 As creating a device driver may seem a complicated task at first (it isn't), you will be guided step-by-step. Ensure you don't miss any step and ask questions early.