From e39472b51ac9b598a4f6f001d4149c52fbc55ca7 Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Tue, 18 Mar 2014 19:50:26 +0100 Subject: [PATCH] fixed rfm12 inclusion, added as submodule --- .gitmodules | 3 +++ src/rfm12/rfm12.c | 2 +- src/rfm12/rfm12.h | 2 +- src/rfm12/rfm12_config.h | 19 ++++++++++++++----- src/rfm12/rfm12_lib | 1 + 5 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 .gitmodules create mode 160000 src/rfm12/rfm12_lib diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..073bb80 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/rfm12/rfm12_lib"] + path = src/rfm12/rfm12_lib + url = git@github.com:das-labor/librfm12.git diff --git a/src/rfm12/rfm12.c b/src/rfm12/rfm12.c index f75b207..7ca2b3e 100644 --- a/src/rfm12/rfm12.c +++ b/src/rfm12/rfm12.c @@ -1,4 +1,4 @@ #include "rfm12_config.h" -#include "rfm12_lib/rfm12.c" +#include "rfm12_lib/src/rfm12.c" diff --git a/src/rfm12/rfm12.h b/src/rfm12/rfm12.h index 39119fb..2767cfd 100644 --- a/src/rfm12/rfm12.h +++ b/src/rfm12/rfm12.h @@ -1,4 +1,4 @@ #include "rfm12_config.h" -#include "rfm12_lib/rfm12.h" +#include "rfm12_lib/src/rfm12.h" diff --git a/src/rfm12/rfm12_config.h b/src/rfm12/rfm12_config.h index f5d4bd6..3f160b5 100644 --- a/src/rfm12/rfm12_config.h +++ b/src/rfm12/rfm12_config.h @@ -49,6 +49,8 @@ #include "../config.h" #include "../makros.h" +#include + //Pin that the RFM12's slave select is connected to //#define DDR_SS DDRB //#define PORT_SS PORTB @@ -124,13 +126,23 @@ #define RFM12_INT_VECT (INT0_vect) //the interrupt mask register -#define RFM12_INT_MSK GIMSK +#ifdef EIMSK + #define RFM12_INT_MSK EIMSK +#elif defined(GIMSK) + #define RFM12_INT_MSK GIMSK +#else + #define RFM12_INT_MSK GICR +#endif //the interrupt bit in the mask register #define RFM12_INT_BIT (INT0) //the interrupt flag register -#define RFM12_INT_FLAG GIFR +#ifdef EIFR + #define RFM12_INT_FLAG EIFR +#else + #define RFM12_INT_FLAG GIFR +#endif //the interrupt bit in the flag register #define RFM12_FLAG_BIT (INTF0) @@ -160,6 +172,3 @@ */ #define RFM12_UART_DEBUG 0 - - - diff --git a/src/rfm12/rfm12_lib b/src/rfm12/rfm12_lib new file mode 160000 index 0000000..e49ecec --- /dev/null +++ b/src/rfm12/rfm12_lib @@ -0,0 +1 @@ +Subproject commit e49ecece7baf2faa48ed2f6c659228b4d77c0c66