From 27048709b5f05685fedddcaacbafa71b4d76bf1b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 17 Aug 2013 13:19:38 +0000 Subject: moved tuer-rfid to teenstep (some port pins have changed) git-svn-id: https://svn.spreadspace.org/avr/trunk@220 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- tuer-rfid/Makefile | 2 +- tuer-rfid/manual.c | 8 ++++---- tuer-rfid/sl018.c | 4 ++-- tuer-rfid/stepper.c | 11 ++++++----- 4 files changed, 13 insertions(+), 12 deletions(-) (limited to 'tuer-rfid') diff --git a/tuer-rfid/Makefile b/tuer-rfid/Makefile index 697806b..5f7f893 100644 --- a/tuer-rfid/Makefile +++ b/tuer-rfid/Makefile @@ -22,7 +22,7 @@ ## NAME := tuer-rfid -BOARD_TYPE := teensy2 +BOARD_TYPE := teenstep OBJ := $(NAME).o heartbeat.o stepper.o ledmatrix.o sl018.o keystore.o statemachine.o eventqueue.o limits.o manual.o ajar.o LIBS := util led lufa-descriptor-usbserial anyio EXTERNAL_LIBS := lufa diff --git a/tuer-rfid/manual.c b/tuer-rfid/manual.c index 1423939..5ea6dd6 100644 --- a/tuer-rfid/manual.c +++ b/tuer-rfid/manual.c @@ -25,10 +25,10 @@ #include "manual.h" #include "eventqueue.h" -#define MANUAL_PIN PINF -#define MANUAL_PORT PORTF -#define MANUAL_DDR DDRF -#define MANUAL_BIT 0 +#define MANUAL_PIN PIND +#define MANUAL_PORT PORTD +#define MANUAL_DDR DDRD +#define MANUAL_BIT 7 #define MANUAL_LP_MAX 255 diff --git a/tuer-rfid/sl018.c b/tuer-rfid/sl018.c index a94e704..99382a9 100644 --- a/tuer-rfid/sl018.c +++ b/tuer-rfid/sl018.c @@ -27,8 +27,8 @@ #include #define SL018_TWI_ADDR 0xA0 -#define SL018_TAG_STA_PIN PIND -#define SL018_TAG_STA_BIT 7 +#define SL018_TAG_STA_PIN PINE +#define SL018_TAG_STA_BIT 6 #define CARD_PRESENT (!((SL018_TAG_STA_PIN >> SL018_TAG_STA_BIT) & 1)) #define MAX_UID_LEN 7 diff --git a/tuer-rfid/stepper.c b/tuer-rfid/stepper.c index 52e902c..e90700c 100644 --- a/tuer-rfid/stepper.c +++ b/tuer-rfid/stepper.c @@ -39,7 +39,8 @@ uint8_t step_table [] = #define STEPPER_PORT PORTF #define STEPPER_DDR DDRF #define STEPPER_FIRST_BIT 4 -#define STEPPER_ENABLE_BIT 1 +#define STEPPER_ENABLE_A_BIT 0 +#define STEPPER_ENABLE_B_BIT 1 #define LENGTH_STEP_TABLE (sizeof(step_table)/sizeof(uint8_t)) #define STEPPER_OUTPUT_BITMASK (~(0xF << STEPPER_FIRST_BIT )) @@ -50,7 +51,7 @@ stepper_direction_t step_direction = dir_open; inline void stepper_stop(void) { - STEPPER_PORT &= ~(0xF << STEPPER_FIRST_BIT | 1< 2 ms @ 16 MHz -- cgit v1.2.3