led stuff
This commit is contained in:
parent
34f6066ef1
commit
236632cf63
@ -3,7 +3,7 @@ CC=gcc
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-lwiringPi -lcurl -lconfig
|
||||
|
||||
counter: counter.o LS7366R.o influx.o ringbuffer.o
|
||||
counter: counter.o LS7366R.o influx.o ringbuffer.o led.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^
|
||||
|
||||
.c.o:
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "LS7366R.h"
|
||||
#include "influx.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "led.h"
|
||||
|
||||
|
||||
const int CTRL_OUT = 16;
|
||||
const int INTR_IN = 19;
|
||||
@ -58,6 +60,7 @@ void start() {
|
||||
int main (void) {
|
||||
readConfig();
|
||||
init();
|
||||
ledInit();
|
||||
ls7366rInit(SPI_CHAN);
|
||||
influxInit(&cfg);
|
||||
start();
|
||||
|
26
src/led.c
Normal file
26
src/led.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <stdbool.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#include "led.h"
|
||||
|
||||
|
||||
|
||||
const int GREEN_OUT = 20;
|
||||
const int RED_OUT = 21;
|
||||
const int BLUE_OUT = 26;
|
||||
|
||||
void ledInit() {
|
||||
pinMode(GREEN_OUT, OUTPUT);
|
||||
digitalWrite(GREEN_OUT, 0);
|
||||
|
||||
pinMode(RED_OUT, OUTPUT);
|
||||
digitalWrite(RED_OUT, 0);
|
||||
|
||||
pinMode(BLUE_OUT, OUTPUT);
|
||||
digitalWrite(BLUE_OUT, 0);
|
||||
}
|
||||
|
||||
|
||||
void led (tColor color, bool state) {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user