add: relay/piface support
This commit is contained in:
parent
fa6ceb2bf4
commit
db64e4f820
34 changed files with 1259 additions and 313 deletions
11
drivers/gpio.c
Normal file
11
drivers/gpio.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include <wiringPi.h>
|
||||
#include <piFace.h>
|
||||
#include <wiring_debug.h>
|
||||
|
||||
#include <drivers.h>
|
||||
|
||||
void
|
||||
driver_gpio_set(relay_t *relay, int value)
|
||||
{
|
||||
digitalWrite(relay->number, value);
|
||||
}
|
11
drivers/piface.c
Normal file
11
drivers/piface.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include <wiringPi.h>
|
||||
#include <piFace.h>
|
||||
#include <wiring_debug.h>
|
||||
|
||||
#include <drivers.h>
|
||||
|
||||
void
|
||||
driver_piface_set(relay_t *relay, int value)
|
||||
{
|
||||
digitalWrite(DRIVER_PIFACE_GPIO_BASE + relay->number, value);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue