From 53cc2160af6ed22709dde99475dcaea7f7747300 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Wed, 6 Feb 2013 23:00:19 +0000 Subject: added event queue git-svn-id: https://svn.spreadspace.org/avr/trunk@146 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- usb-i2c-sl018/Makefile | 2 +- usb-i2c-sl018/eventqueue.c | 24 ++++++++++++++++++++++++ usb-i2c-sl018/eventqueue.h | 28 ++++++++++++++++++++++++++++ usb-i2c-sl018/statemachine.c | 2 ++ usb-i2c-sl018/tuer-rfid.c | 1 + 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 usb-i2c-sl018/eventqueue.c create mode 100644 usb-i2c-sl018/eventqueue.h (limited to 'usb-i2c-sl018') 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 + * Othmar Gsenger + * + * 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 . + */ + +#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 + * Othmar Gsenger + * + * 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 . + */ + +#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) { -- cgit v1.2.3