diff --git a/boards/avsextrem/drivers/Makefile b/boards/avsextrem/drivers/Makefile index df363e77a2a403e35b7c8acb0e7e6016429981bc..261c3e526594c2af6f0403259e58e1f88e3fe9fb 100644 --- a/boards/avsextrem/drivers/Makefile +++ b/boards/avsextrem/drivers/Makefile @@ -1,5 +1,4 @@ MODULE =avsextrem_base include $(RIOTBOARD)/$(BOARD)/Makefile.include -INCLUDES += -I$(RIOTBASE)/drivers/cc110x include $(RIOTBASE)/Makefile.base diff --git a/boards/avsextrem/drivers/avsextrem-cc1100.c b/boards/avsextrem/drivers/avsextrem-cc1100.c index 43dd2315bee755befc698ef31dba406008659f69..ffda08267db86ff4da9825025a3da76c308cd508 100644 --- a/boards/avsextrem/drivers/avsextrem-cc1100.c +++ b/boards/avsextrem/drivers/avsextrem-cc1100.c @@ -28,9 +28,7 @@ // cpu #include "cpu.h" // sys -#include "cc1100.h" -#include "arch_cc1100.h" -#include "cc1100_spi.h" +#include "cc110x_ng.h" #include "gpioint.h" #define CC1100_GDO0 (FIO2PIN & BIT6) // read serial I/O (GDO0) @@ -222,7 +220,7 @@ void cc1100_gdo2_disable(void) void cc1100_gdo2_enable(void) { - gpioint_set(0, BIT28, GPIOINT_FALLING_EDGE, &cc1100_gdo2_irq); + gpioint_set(0, BIT28, GPIOINT_FALLING_EDGE, &cc110x_gdo2_irq); } void cc1100_before_send(void) @@ -239,7 +237,7 @@ void cc1100_after_send(void) void cc1100_gdo0_enable(void) { - gpioint_set(2, BIT6, GPIOINT_RISING_EDGE, &cc1100_gdo0_irq); + gpioint_set(2, BIT6, GPIOINT_RISING_EDGE, &cc110x_gdo0_irq); } void cc1100_gdo0_disable(void) diff --git a/boards/chronos/drivers/Makefile b/boards/chronos/drivers/Makefile index 3c61103789376cd5da8348c6f935fa70c4afe9b8..e1258e611884467ab3bb6d99cf52527815dd6de4 100644 --- a/boards/chronos/drivers/Makefile +++ b/boards/chronos/drivers/Makefile @@ -1,5 +1,5 @@ MODULE =$(BOARD)_base -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include +INCLUDES += -I$(RIOTBASE)/drivers/include include $(RIOTBASE)/Makefile.base diff --git a/boards/chronos/drivers/cc430-cc110x.c b/boards/chronos/drivers/cc430-cc110x.c index ec82b8859711be723b1c4e1ad4d2db79e1c2b086..17384cc242c620db2245c271a11efbb23a68c3b4 100644 --- a/boards/chronos/drivers/cc430-cc110x.c +++ b/boards/chronos/drivers/cc430-cc110x.c @@ -25,8 +25,6 @@ #include "cpu.h" #include "irq.h" #include "cc110x_ng.h" -#include "cc110x-arch.h" - #define CC1100_GDO0 (RF1AIN & BIT0) #define CC1100_GDO1 (RF1AIN & BIT1) diff --git a/boards/msb-430h/Makefile b/boards/msb-430h/Makefile index 4adc54edf52f7b7f96eeed7b7c544a05ea355003..0a7ebeb6372570bfb26360c69be87b9e92fc0902 100644 --- a/boards/msb-430h/Makefile +++ b/boards/msb-430h/Makefile @@ -2,8 +2,6 @@ MODULE =$(BOARD)_base DIRS = $(RIOTBOARD)/msb-430-common -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include - all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/boards/msb-430h/driver_cc110x.c b/boards/msb-430h/driver_cc110x.c index c80f7cbeca545e2116f7ccbfcbae2ddde9472698..acd6da53c77d86c1a3bfa73a4d582d4b30f1818a 100644 --- a/boards/msb-430h/driver_cc110x.c +++ b/boards/msb-430h/driver_cc110x.c @@ -176,7 +176,7 @@ void cc110x_init_interrupts(void) restoreIRQ(state); /* Enable all interrupts */ } -void cc110x_spi_init(uint8_t clockrate) +void cc110x_spi_init(void) { // Switch off async UART while (!(UTCTL0 & TXEPT)); // Wait for empty UxTXBUF register diff --git a/boards/msba2-common/drivers/Makefile b/boards/msba2-common/drivers/Makefile index c97bf04c92ead8bc2e74cbe148f106c760b8adc7..7f461f12f97bde65b9a8e32fa8914f3feb9d9fd4 100644 --- a/boards/msba2-common/drivers/Makefile +++ b/boards/msba2-common/drivers/Makefile @@ -1,7 +1,5 @@ MODULE =$(BOARD)_base include $(RIOTBOARD)/$(BOARD)/Makefile.include -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include - include $(RIOTBASE)/Makefile.base diff --git a/boards/msba2-common/drivers/msba2-cc110x.c b/boards/msba2-common/drivers/msba2-cc110x.c index ea3336892f9a70f8d59c93c4241d15cf26cb03d0..97c7aa81c3f2f9d0da176b74063dc1bc6471bed7 100644 --- a/boards/msba2-common/drivers/msba2-cc110x.c +++ b/boards/msba2-common/drivers/msba2-cc110x.c @@ -45,8 +45,6 @@ and the mailinglist (subscription via web site) #include "cpu.h" /* drivers */ #include "cc110x_ng.h" -#include "cc110x-arch.h" -#include "cc110x_spi.h" #include "gpioint.h" diff --git a/boards/wsn430-v1_3b/Makefile b/boards/wsn430-v1_3b/Makefile index b7b75b794bbb240a78fab484470f99a9bcbf2808..7f7fba05eafe74122353c887d150e61a6d9f8475 100644 --- a/boards/wsn430-v1_3b/Makefile +++ b/boards/wsn430-v1_3b/Makefile @@ -1,7 +1,6 @@ MODULE =$(BOARD)_base DIRS = $(RIOTBOARD)/wsn430-common -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/boards/wsn430-v1_3b/driver_cc110x.c b/boards/wsn430-v1_3b/driver_cc110x.c index a9b9cde390035f2ef019656df4a7974dd7e3d944..69b5f46898ca89e66d5d0b7f81bb5ebfe732afbf 100644 --- a/boards/wsn430-v1_3b/driver_cc110x.c +++ b/boards/wsn430-v1_3b/driver_cc110x.c @@ -14,7 +14,6 @@ #include "irq.h" #include "cc110x_ng.h" -#include "cc110x-arch.h" #define CC1100_GDO0 (P1IN & 0x08) // read serial I/O (GDO0) #define CC1100_GDO1 (P5IN & 0x04) // read serial I/O (GDO1) @@ -153,7 +152,7 @@ void cc110x_init_interrupts(void) restoreIRQ(state); /* Enable all interrupts */ } -void cc110x_spi_init(uint8_t clockrate) +void cc110x_spi_init(void) { // Switch off async UART while(!(U1TCTL & TXEPT)); // Wait for empty UxTXBUF register diff --git a/cpu/cc430/Makefile b/cpu/cc430/Makefile index 16802b433f92675f86bdfbe0e4c297035898d257..3e10d1237ad615784e47c543a11a2f2644368628 100644 --- a/cpu/cc430/Makefile +++ b/cpu/cc430/Makefile @@ -2,8 +2,6 @@ MODULE = cpu DIRS = $(RIOTCPU)/msp430-common -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include - all: $(BINDIR)$(MODULE).a @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ; diff --git a/cpu/cc430/cc110x_cc430.c b/cpu/cc430/cc110x_cc430.c index a40e35205bf6451d4db8d2b825da59d5ac37b5ef..a565bc9421e42aa9ce590e192164bbca8f3be711 100644 --- a/cpu/cc430/cc110x_cc430.c +++ b/cpu/cc430/cc110x_cc430.c @@ -20,8 +20,7 @@ #include <stdint.h> #include "irq.h" -#include "cc110x-defaultSettings.h" -#include "cc110x-reg.h" +#include "cc110x_ng.h" #include "board.h" #include "hwtimer.h" diff --git a/drivers/cc110x_ng/cc110x-defaultSettings.c b/drivers/cc110x_ng/cc110x-defaultSettings.c index 98ae2fa3f0014f786bb2fc3e2eda643e56659446..3d9b3de52993f0c29627fe0b0f38029b9f84866b 100644 --- a/drivers/cc110x_ng/cc110x-defaultSettings.c +++ b/drivers/cc110x_ng/cc110x-defaultSettings.c @@ -21,7 +21,10 @@ * @} */ -#include "cc110x-defaultSettings.h" +#include "cc110x_ng.h" + +// Default PA table index (output power) +#define PATABLE (11) /** * Usable, non overlapping channels and corresponding frequencies diff --git a/drivers/cc110x_ng/include/cc110x-internal.h b/drivers/cc110x_ng/cc110x-internal.h similarity index 100% rename from drivers/cc110x_ng/include/cc110x-internal.h rename to drivers/cc110x_ng/cc110x-internal.h diff --git a/drivers/cc110x_ng/cc110x-rx.c b/drivers/cc110x_ng/cc110x-rx.c index a71232a3a046063d17ec571ccb62fb1502404382..0859e21318d524757ca8d94408b0afafc1fa858c 100644 --- a/drivers/cc110x_ng/cc110x-rx.c +++ b/drivers/cc110x_ng/cc110x-rx.c @@ -19,10 +19,6 @@ #include "cc110x_ng.h" #include "cc110x-internal.h" -#include "cc110x-config.h" -#include "cc110x-defaultSettings.h" -#include "cc110x_spi.h" -#include "cc110x-reg.h" #include "hwtimer.h" #include "msg.h" diff --git a/drivers/cc110x_ng/cc110x-tx.c b/drivers/cc110x_ng/cc110x-tx.c index f6f7abb642206ece60ab8953716281cbf3332c1e..3b6761a2483471220ca0d3dd7f5ea9eff48e5abf 100644 --- a/drivers/cc110x_ng/cc110x-tx.c +++ b/drivers/cc110x_ng/cc110x-tx.c @@ -19,11 +19,7 @@ #include <stdio.h> #include "cc110x_ng.h" -#include "cc110x-defaultSettings.h" #include "cc110x-internal.h" -#include "cc110x-arch.h" -#include "cc110x_spi.h" -#include "cc110x-reg.h" #include "irq.h" diff --git a/drivers/cc110x_ng/cc110x.c b/drivers/cc110x_ng/cc110x.c index 47b867b95210e169a34c5e536d5beec1b7ea70cc..a036d7c4a3a388e8a169afb2205af63af7c96ce0 100644 --- a/drivers/cc110x_ng/cc110x.c +++ b/drivers/cc110x_ng/cc110x.c @@ -17,12 +17,7 @@ * @} */ #include "cc110x_ng.h" -#include "cc110x-arch.h" -#include "cc110x-config.h" -#include "cc110x-defaultSettings.h" #include "cc110x-internal.h" -#include "cc110x_spi.h" -#include "cc110x-reg.h" #include "hwtimer.h" #include "config.h" diff --git a/drivers/cc110x_ng/spi/Makefile b/drivers/cc110x_ng/spi/Makefile index c7b442df9fc65f5d3e971dea406fe54ac86d579c..5919222a885680b357a8ce1521bf179b9a8c510c 100644 --- a/drivers/cc110x_ng/spi/Makefile +++ b/drivers/cc110x_ng/spi/Makefile @@ -1,4 +1,6 @@ MODULE =cc110x_spi +INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng + include $(MAKEBASE)/Makefile.base diff --git a/drivers/cc110x_ng/spi/cc110x_spi.c b/drivers/cc110x_ng/spi/cc110x_spi.c index 379b870c42642b3355d15036843038cef66216c7..3d73abacf8d99a43b5ec4bc3a86c80be07b4b8ac 100644 --- a/drivers/cc110x_ng/spi/cc110x_spi.c +++ b/drivers/cc110x_ng/spi/cc110x_spi.c @@ -28,10 +28,7 @@ #include <stdio.h> #include "cc110x_ng.h" -#include "cc110x-arch.h" #include "cc110x-internal.h" -#include "cc110x_spi.h" -#include "cc110x-reg.h" #include "irq.h" diff --git a/drivers/at86rf231/include/at86rf231.h b/drivers/include/at86rf231.h similarity index 100% rename from drivers/at86rf231/include/at86rf231.h rename to drivers/include/at86rf231.h diff --git a/drivers/include/cc110x.h b/drivers/include/cc110x.h new file mode 100644 index 0000000000000000000000000000000000000000..549842b03e31e9a0ca5ce84c7620902213d6efb3 --- /dev/null +++ b/drivers/include/cc110x.h @@ -0,0 +1,6 @@ +#ifndef CC110X_H +#define CC110X_H + +#include "cc110x/cc1100-interface.h" + +#endif /* CC110X_H */ diff --git a/drivers/cc110x/cc1100-interface.h b/drivers/include/cc110x/cc1100-interface.h similarity index 100% rename from drivers/cc110x/cc1100-interface.h rename to drivers/include/cc110x/cc1100-interface.h diff --git a/drivers/include/cc110x_ng.h b/drivers/include/cc110x_ng.h new file mode 100644 index 0000000000000000000000000000000000000000..9f9d063736d2990e879b9e83d6b617941c75a114 --- /dev/null +++ b/drivers/include/cc110x_ng.h @@ -0,0 +1,11 @@ +#ifndef CC110X_NG_H +#define CC110X_NG_H + +#include "cc110x_ng/cc110x-interface.h" +#include "cc110x_ng/cc110x-defaultSettings.h" +#include "cc110x_ng/cc110x-config.h" +#include "cc110x_ng/cc110x-reg.h" +#include "cc110x_ng/cc110x-arch.h" +#include "cc110x_ng/cc110x_spi.h" + +#endif /* CC110X_NG_H */ diff --git a/drivers/cc110x_ng/include/cc110x-arch.h b/drivers/include/cc110x_ng/cc110x-arch.h similarity index 100% rename from drivers/cc110x_ng/include/cc110x-arch.h rename to drivers/include/cc110x_ng/cc110x-arch.h diff --git a/drivers/cc110x_ng/include/cc110x-config.h b/drivers/include/cc110x_ng/cc110x-config.h similarity index 100% rename from drivers/cc110x_ng/include/cc110x-config.h rename to drivers/include/cc110x_ng/cc110x-config.h diff --git a/drivers/cc110x_ng/include/cc110x-defaultSettings.h b/drivers/include/cc110x_ng/cc110x-defaultSettings.h similarity index 97% rename from drivers/cc110x_ng/include/cc110x-defaultSettings.h rename to drivers/include/cc110x_ng/cc110x-defaultSettings.h index 7c08835f523243cb3a4ffdcf5a7d83da39298935..bb08de084dcccf860205e7c85317fa49bf795365 100644 --- a/drivers/cc110x_ng/include/cc110x-defaultSettings.h +++ b/drivers/include/cc110x_ng/cc110x-defaultSettings.h @@ -34,9 +34,6 @@ and Telematics group (http://cst.mi.fu-berlin.de). #define TIMER_TICK_USEC_RES (122) -// Default PA table index (output power) -#define PATABLE (11) - // Watchdog cycle time in seconds, set 0 to disable watchdog #define CC1100_WATCHDOG_PERIOD (5) diff --git a/drivers/cc110x_ng/include/cc110x_ng.h b/drivers/include/cc110x_ng/cc110x-interface.h similarity index 98% rename from drivers/cc110x_ng/include/cc110x_ng.h rename to drivers/include/cc110x_ng/cc110x-interface.h index 8003c314e5a701c3cf3334e1ab9e83877bb9c244..5648b7740be599e5a107b094f32db46c77e529c4 100644 --- a/drivers/cc110x_ng/include/cc110x_ng.h +++ b/drivers/include/cc110x_ng/cc110x-interface.h @@ -19,8 +19,8 @@ * @author Oliver Hahm <oliver.hahm@inria.fr> */ -#ifndef CC1100_H -#define CC1100_H +#ifndef CC110X_NG_INTERFACE_H +#define CC110X_NG_INTERFACE_H #include <stdint.h> #include "radio/radio.h" @@ -172,4 +172,4 @@ uint8_t cc110x_add_ignored(radio_address_t addr); #endif /** @} */ -#endif +#endif /* CC110X_NG_INTERFACE_H */ diff --git a/drivers/cc110x_ng/include/cc110x-reg.h b/drivers/include/cc110x_ng/cc110x-reg.h similarity index 100% rename from drivers/cc110x_ng/include/cc110x-reg.h rename to drivers/include/cc110x_ng/cc110x-reg.h diff --git a/drivers/cc110x_ng/include/cc110x_spi.h b/drivers/include/cc110x_ng/cc110x_spi.h similarity index 100% rename from drivers/cc110x_ng/include/cc110x_spi.h rename to drivers/include/cc110x_ng/cc110x_spi.h diff --git a/drivers/cc2420/include/cc2420.h b/drivers/include/cc2420.h similarity index 100% rename from drivers/cc2420/include/cc2420.h rename to drivers/include/cc2420.h diff --git a/sys/net/network_layer/sixlowpan/Makefile b/sys/net/network_layer/sixlowpan/Makefile index 619c8e0159150001c7dfba3ce154b8e31c84c8e6..e5ae64d4c3a64da54eb4b2a5a9effa831793d5e8 100644 --- a/sys/net/network_layer/sixlowpan/Makefile +++ b/sys/net/network_layer/sixlowpan/Makefile @@ -1,3 +1,2 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/routing/rpl/Makefile b/sys/net/routing/rpl/Makefile index 0672178a5a16d282ed58df3d81990df76f8c3f80..c6e31807e89afcfcae778b012c3aae2940ce857a 100644 --- a/sys/net/routing/rpl/Makefile +++ b/sys/net/routing/rpl/Makefile @@ -1,5 +1,3 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include - include $(RIOTBASE)/Makefile.base diff --git a/sys/net/transport_layer/destiny/Makefile b/sys/net/transport_layer/destiny/Makefile index bf374f567b3e3c28ac942183873766e54a63dd07..c6e31807e89afcfcae778b012c3aae2940ce857a 100644 --- a/sys/net/transport_layer/destiny/Makefile +++ b/sys/net/transport_layer/destiny/Makefile @@ -1,4 +1,3 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/drivers/cc110x include $(RIOTBASE)/Makefile.base diff --git a/sys/shell/commands/Makefile b/sys/shell/commands/Makefile index 8f222df24734a4bd87b3b1be04ba2997d7c581e8..290af6ebd55cc14abcafc0d543fc2c3f754bfbf9 100644 --- a/sys/shell/commands/Makefile +++ b/sys/shell/commands/Makefile @@ -1,19 +1,15 @@ SRC = shell_commands.c sc_id.c ifneq (,$(findstring cc110x_ng,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include/ SRC += sc_cc110x_ng.c endif ifneq (,$(findstring cc2420,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/drivers/cc2420/include/ -I$(RIOTBASE)/sys/net/include SRC += sc_cc2420.c endif ifneq (,$(findstring cc110x,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/drivers/cc110x/ SRC += sc_cc1100.c endif ifneq (,$(findstring nativenet,$(USEMODULE))) - INCLUDES += -I$(RIOTBASE)/cpu/native/include SRC += sc_nativenet.c endif ifneq (,$(findstring mci,$(USEMODULE))) diff --git a/sys/shell/commands/sc_cc1100.c b/sys/shell/commands/sc_cc1100.c index f6a30f33ee51ac765da008ef9af2ba60e1aca079..7d9bc73dc3f3abb56815fbb8249906b56d1b96aa 100644 --- a/sys/shell/commands/sc_cc1100.c +++ b/sys/shell/commands/sc_cc1100.c @@ -18,7 +18,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include "cc1100-interface.h" +#include "cc110x.h" #ifdef MODULE_CC110X #include "msg.h" diff --git a/sys/transceiver/Makefile b/sys/transceiver/Makefile index 7d3cafb276fe1e6f0a98ec32e5e4da4b28f4c491..4fcf17425df365148bd1d0a90dfc592a0b64d327 100644 --- a/sys/transceiver/Makefile +++ b/sys/transceiver/Makefile @@ -1,7 +1,5 @@ MODULE =transceiver -INCLUDES += -I$(RIOTBASE)/drivers/cc110x -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/drivers/at86rf231/include - include $(MAKEBASE)/Makefile.base