bktr and GPIO
tinguely at casselton.net
Fri Oct 26 06:59:17 PDT 2007
(deleted information. He is interested in getting the Zoneminder bktr(8)
based relays to work).
> I have some contact with the person who manufactures the cards and writes the
> linux drivers, and he asked me if FreeBSD has access to bt878 GPIO, and said
> that it would be easy if so.
You will need to know what values need to be writen to which register to
enable the particular relay. In the kernel driver source program, add
a new ioctl() so that you can enable this feature from the user program.
The command inside the new ioctl() will probably look roughly like:
/* optionally may need to preserve some other settings */
set = (IN#(bktr, BKTR_GPIO_@@@@) & ~mask) | set;
OUT#(bktr, BKTR_GPIO_@@@@, set); /* turn on relay "value" */
mask optional turn off bits
set enable bits
# is the size (B)yte, (W)ord, (L)ong
@@@@ is the register location (you probably will have to add a
define for this location into the header file).
More information about the freebsd-multimedia