OpenBSD: GPIO with the I2C device PCF8574(A) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: BSD on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=106) +--- Thread: OpenBSD: GPIO with the I2C device PCF8574(A) (/showthread.php?tid=6377) |
OpenBSD: GPIO with the I2C device PCF8574(A) - krjdev - 08-09-2018 Currently the ROCK64 GPIO cannot used in userland. (I currently working on it.) So I have written a driver for the good old PCF8574 from NXP. You can find the driver on my Github page: Additional drivers for OpenBSD To use the PCF8574, add this to the device trees (Example): Code: /dts-v1/; Configuration of the Kernel (add the following): Code: pcfgpio* at iic? Compile the kernel. dmesg output from my driver: Code: pcfgpio0 at iic0 addr 0x20 Use the driver with gpioctl: Code: $ gpioctl /dev/gpio0 0 on Use the driver with ioctls (simple running light example): Code: #include <unistd.h> |