Skip to content

Commit

Permalink
Merge pull request #32 from comawill/pull-req/inga-platform_type
Browse files Browse the repository at this point in the history
Fixed and Changed usage of Inga revisions
  • Loading branch information
Enrico Jorns committed Nov 10, 2014
2 parents b1aaba5 + b0ad165 commit 3eb77b5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
21 changes: 8 additions & 13 deletions cpu/avr/radio/rf230bb/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@
// ZIGBIT : Zigbit module from Meshnetics
// ATMEGA128RFA1 : Bare chip with internal radio
// IRIS : IRIS Mote from MEMSIC
// INGA_RF23X_A: Inga rev 1.2 - 1.5
#define RAVENUSB_C 1
#define INGA_12 1
#define RCB_B 3
#define ZIGBIT 4
#define IRIS 5
#define RAVEN_D 2
#define RCB_B 3
#define ZIGBIT 4
#define IRIS 5
#define ATMEGA128RFA1 6
#define INGA_RF23X_A 7

#if PLATFORM_TYPE == RCB_B
/* 1281 rcb */
Expand Down Expand Up @@ -109,8 +111,8 @@
# define SLPTRPORT B
# define SLPTRPIN (0x04)

#elif INGA_REVISION == INGA_V12
/* 1284 raven */
#elif PLATFORM_TYPE == INGA_RF23X_A
/* 1284 inga */
# define SSPORT B
# define SSPIN (0x04)
# define SPIPORT B
Expand All @@ -123,13 +125,6 @@
# define IRQPIN (0x06)
# define SLPTRPORT B
# define SLPTRPIN (0x03)
# define TXCWPORT B
# define TXCWPIN (0x00)
# define USART 0
# define USARTVECT USART0_RX_vect
# define TICKTIMER 3
# define HAS_CW_MODE
# define HAS_SPARE_TIMER

#elif PLATFORM_TYPE == RAVEN_D
/* 1284 raven */
Expand Down
12 changes: 6 additions & 6 deletions platform/inga/Makefile.inga
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ INGA_SOURCEFILES += $(INGA_INTERFACES) $(INGA_DRIVERS) $(INGA_SENSORS)

ifeq ($(REV),)
$(info INGA revison not set, defaults to REV=1.4)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_14
CFLAGS += -DINGA_CONF_REVISION=INGA_V14
REV = 1.4
else ifeq ($(REV),1.2)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_12
CFLAGS += -DINGA_CONF_REVISION=INGA_V12
else ifeq ($(REV),1.4)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_14
CFLAGS += -DINGA_CONF_REVISION=INGA_V14
else ifeq ($(REV),1.5)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_15
CFLAGS += -DINGA_CONF_REVISION=INGA_V15
else ifeq ($(REV),1.6)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_16
CFLAGS += -DINGA_CONF_REVISION=INGA_V16
else ifeq ($(REV),2.0)
CFLAGS += -DINGA_CONF_REVISION=INGA_REV_20
CFLAGS += -DINGA_CONF_REVISION=INGA_V20
endif


Expand Down
8 changes: 5 additions & 3 deletions platform/inga/platform-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@
* Possible values are INGA_V12, INGA_V15, INGA_V20
*/
#ifndef INGA_CONF_REVISION
#define INGA_REVISION INGA_V12
#define INGA_REVISION INGA_V14
#warning INGA_CONF_REVISION not set, defaults to INGA_V14
#else
#define INGA_REVISION INGA_CONF_REVISION
#endif

#define PLATFORM PLATFORM_AVR

/** Currently all INGA revisions use same HAL */
#define RF230_HAL = INGA_12
#if INGA_REVISION == INGA_V12 || INGA_REVISION == INGA_V13 || INGA_REVISION == INGA_V14 || INGA_REVISION == INGA_V15
#define PLATFORM_TYPE INGA_RF23X_A
#endif /* Inga rev 1.2 - 1.5 */

#define PLATFORM_HAS_BUTTON 1

Expand Down

0 comments on commit 3eb77b5

Please sign in to comment.