Skip to content

Commit 4c0d9bc

Browse files
Tomasz Bursztykajukkar
Tomasz Bursztyka
authored andcommitted
drivers: cc2520: Add a new IP stack ready adaptation of CC2520 driver
It's basically a copy/paste of original driver, using native IP stack API. This is meant to avoid cluttering the original driver code with #ifdef, and in future it will help removing the old driver as well. Change-Id: I67d974ad7440d258583a5c7c6c7160e99210808c Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent ed6ad65 commit 4c0d9bc

File tree

8 files changed

+1373
-283
lines changed

8 files changed

+1373
-283
lines changed

drivers/Kconfig

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ menu "Device Drivers"
2121

2222
source "drivers/bluetooth/Kconfig"
2323

24+
config IEEE802154
25+
bool
26+
default n
27+
default y if NETWORKING_WITH_15_4 || NET_L2_IEEE802154
28+
2429
source "drivers/ieee802154/Kconfig"
2530

2631
source "drivers/console/Kconfig"

drivers/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ obj-$(CONFIG_PWM) += pwm/
1818
obj-$(CONFIG_ADC) += adc/
1919
obj-$(CONFIG_ETHERNET) += ethernet/
2020
obj-$(CONFIG_SLIP) += slip/
21-
obj-$(CONFIG_NETWORKING_WITH_15_4) += ieee802154/
21+
obj-$(CONFIG_IEEE802154) += ieee802154/
2222
obj-$(CONFIG_WATCHDOG) += watchdog/
2323
obj-$(CONFIG_RTC) += rtc/
2424
obj-$(CONFIG_CLOCK_CONTROL) += clock_control/

drivers/ieee802154/Kconfig

+14-5
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,20 @@
3333
#
3434
# IEEE 802.15.4 options
3535
#
36-
menu "IEEE 802.15.4 Options"
37-
depends on NETWORKING_WITH_15_4
36+
menu "IEEE 802.15.4 drivers options"
37+
depends on NETWORKING_WITH_15_4 || NET_L2_IEEE802154
3838

39-
if NETWORKING_WITH_15_4_TI_CC2520
39+
config TI_CC2520_LEGACY
40+
bool "TI CC2520 Driver support"
41+
depends on NETWORKING_WITH_15_4_TI_CC2520
42+
default n
43+
44+
config TI_CC2520
45+
bool "TI CC2520 Driver support"
46+
depends on NET_L2_IEEE802154
47+
default n
48+
49+
if TI_CC2520_LEGACY || TI_CC2520
4050

4151
config SYS_LOG_TI_CC2520_LEVEL
4252
int
@@ -112,6 +122,7 @@ config TI_CC2520_AUTO_CRC
112122
config TI_CC2520_LINK_DETAILS
113123
bool "Forward RSSI and link information on reception to upper stack"
114124
default n
125+
depends on TI_CC2520_LEGACY
115126
select TI_CC2520_AUTO_CRC
116127
help
117128
If necessary, it will be possible to grab link and RSSI information
@@ -127,7 +138,5 @@ config TI_CC2520_AUTO_ACK
127138
this feature requires the chip to get hardware filtering on, and
128139
thus the above stack needs to provide the right information for such
129140
filtering feature to work.
130-
131141
endif
132-
133142
endmenu

drivers/ieee802154/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ subdir-ccflags-y +=-I${srctree}/net/ip/contiki/os/lib
33
subdir-ccflags-y +=-I${srctree}/net/ip/contiki/os
44
subdir-ccflags-y +=-I${srctree}/net/ip
55

6-
obj-$(CONFIG_NETWORKING_WITH_15_4_TI_CC2520) = ieee802154_cc2520.o
6+
obj-$(CONFIG_TI_CC2520_LEGACY) += ieee802154_cc2520_legacy.o
7+
obj-$(CONFIG_TI_CC2520) += ieee802154_cc2520.o

0 commit comments

Comments
 (0)