# Enabling SPI?



## balanga (Jun 1, 2017)

Does anyone know if it's possible to do any of these things using RaspBSD?

http://www.piface.org.uk/guides/Install_PiFace_Software/Enabling_SPI/


----------



## drhowarddrfine (Jun 1, 2017)

Enable those hardware pins? Of course. Through their software? Don't know. You'd have to ask them. Can you write your own software to do that? Of course.


----------



## balanga (Jun 1, 2017)

I wouldn't have a clue as to where to start.... Although I've come across a couple of links which may help me get started...

https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md

https://github.com/piface

I've never written a device driver before, but from doing some reading, I probably need a /dev/spidev...
Maybe such a thing already exists somewhere...

In fact....

https://lists.freebsd.org/pipermail/freebsd-arm/2013-August/006323.html


----------



## Phishfry (Jun 1, 2017)

Gonzo shows how:

https://kernelnomicon.org/?p=757

Consider trying to add the most basic add on. A RealTimeClock which you will need if you want to open and close a valve on a schedule as per your post yesterday..

Find an RTC module for your board and figure out how to add the device to your kernel and DTS then test until working.
Start at the beginning. Basic timekeeping. I use the DS3231.
https://vzaigrin.wordpress.com/2014/04/28/working-with-i2c-in-freebsd-on-raspberry-pi/


----------

