summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usb-i2c-sl018/Makefile2
-rw-r--r--usb-i2c-sl018/eventqueue.c24
-rw-r--r--usb-i2c-sl018/eventqueue.h28
-rw-r--r--usb-i2c-sl018/statemachine.c2
-rw-r--r--usb-i2c-sl018/tuer-rfid.c1
5 files changed, 56 insertions, 1 deletions
diff --git a/usb-i2c-sl018/Makefile b/usb-i2c-sl018/Makefile
index 7b43a85..1db8b4a 100644
--- a/usb-i2c-sl018/Makefile
+++ b/usb-i2c-sl018/Makefile
@@ -23,7 +23,7 @@
NAME := tuer-rfid
BOARD_TYPE := teensy2
-OBJ := $(NAME).o heartbeat.o stepper.o ledmatrix.o sl018.o keystore.o statemachine.o
+OBJ := $(NAME).o heartbeat.o stepper.o ledmatrix.o sl018.o keystore.o statemachine.o eventqueue.o
LIBS := util led lufa-descriptor-usbserial anyio
EXTERNAL_LIBS := lufa
diff --git a/usb-i2c-sl018/eventqueue.c b/usb-i2c-sl018/eventqueue.c
new file mode 100644
index 0000000..7519e82
--- /dev/null
+++ b/usb-i2c-sl018/eventqueue.c
@@ -0,0 +1,24 @@
+/*
+ * spreadspace avr utils
+ *
+ *
+ * Copyright (C) 2013 Christian Pointner <equinox@spreadspace.org>
+ * Othmar Gsenger <otti@wirdorange.org>
+ *
+ * This file is part of spreadspace avr utils.
+ *
+ * spreadspace avr utils is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * spreadspace avr utils is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "eventqueue.h"
diff --git a/usb-i2c-sl018/eventqueue.h b/usb-i2c-sl018/eventqueue.h
new file mode 100644
index 0000000..865fa05
--- /dev/null
+++ b/usb-i2c-sl018/eventqueue.h
@@ -0,0 +1,28 @@
+/*
+ * spreadspace avr utils
+ *
+ *
+ * Copyright (C) 2013 Christian Pointner <equinox@spreadspace.org>
+ * Othmar Gsenger <otti@wirdorange.org>
+ *
+ * This file is part of spreadspace avr utils.
+ *
+ * spreadspace avr utils is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * spreadspace avr utils is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef R3TUER_eventqueue_h_INCLUDED
+#define R3TUER_eventqueue_h_INCLUDED
+
+
+#endif
diff --git a/usb-i2c-sl018/statemachine.c b/usb-i2c-sl018/statemachine.c
index a5d3003..5f5ea47 100644
--- a/usb-i2c-sl018/statemachine.c
+++ b/usb-i2c-sl018/statemachine.c
@@ -24,6 +24,8 @@
#include "statemachine.h"
#include "stepper.h"
+#include "eventqueue.h"
+
typedef enum state_enum {reset, closed, closing, open, opening, timeout_after_open, timeout_after_close, error, manual_movement} state_t;
state_t state = reset;
diff --git a/usb-i2c-sl018/tuer-rfid.c b/usb-i2c-sl018/tuer-rfid.c
index c214f5b..10f567d 100644
--- a/usb-i2c-sl018/tuer-rfid.c
+++ b/usb-i2c-sl018/tuer-rfid.c
@@ -41,6 +41,7 @@
#include "sl018.h"
#include "keystore.h"
#include "statemachine.h"
+#include "eventqueue.h"
void handle_stdio(uint8_t cmd)
{