Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Using SPI devices from userspace on the RPI, or from anything NetBSD for that matter?
Brian Buhrow <buhrow%nfbcal.org@localhost> writes:
> hello. I'm working on a project where I think I'll be wanting to talk
> to an SPI connected LCD or LED display on an Rasberry Pi. What I envision
> doing with it shouldn't require a kernel level driver given the fact that
> we already have the SPI(4) framework. My question is, how can a user-space
> program read from or write to a SPI connected peripheral? I've found the
> gpioctl(8) program and gpio( devices for talking to GPIO connected devices,
> but I don't see how to speak to SPI connected things. Can anyone enlighten
> me? I realize I may be asking a very elementary question, but my
> documentation searches haven't revealed what I want for NetBSD. I've found
> such documents for Linux, but I'd really like to use NetBSD for this
> project.
>
> Any thoughts would be greatly appreciated.
> -thanks
> -Brian
Hello...
As a general statement, I don't think that the SPI bus is exposed to
userland in the manor you desire. SPI and IIC, I think, are both kernel
level interfaces at this point and if you need to use them, I believe
you are looking at a kernel driver of some sort. Even if it is just a
simple one that lets you poke the bus and/or device.
Also note that gpioctl really does not allow arbitrary access to the
gpio pins. You can configure the direction, read and write to them, and
you can attach a driver but you can't really talk to the gpio bus
directly from userland except as a ioctl end point to do the
configuration, reading and writing.
The exception to this may be spiflash which appears to present a device
for working with those sorts of things, but that isn't a general SPI bus
device.
--
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS
http://anduin.eldar.org - & - http://anduin.ipv6.eldar.org [IPv6 only]
Home |
Main Index |
Thread Index |
Old Index