1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

boards/z1: add support for CC2420 radio

This commit is contained in:
Hauke Petersen 2016-04-14 13:44:57 +02:00 committed by kYc0o
parent 8d3cb3ace9
commit 204702897b
3 changed files with 19 additions and 0 deletions

3
boards/z1/Makefile.dep Normal file
View File

@ -0,0 +1,3 @@
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
USEMODULE += cc2420
endif

View File

@ -8,6 +8,9 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# setup serial terminal
include $(RIOTBOARD)/Makefile.include.serial
# setup the boards dependencies
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# setup flash tool
export OFLAGS = -O ihex
export FLASHER = $(RIOTBASE)/dist/tools/goodfet/goodfet.bsl

View File

@ -116,6 +116,19 @@ extern "C" {
#define USER_BTN_RELEASED ((USER_BTN_PxIN & USER_BTN_MASK) != 0)
/** @} */
/**
* @brief Definition of the interface to the CC2420 radio
*/
#define CC2420_PARAMS_BOARD {.spi = SPI_0, \
.spi_clk = SPI_SPEED_1MHZ, \
.pin_cs = GPIO_PIN(P3, 0), \
.pin_fifo = GPIO_PIN(P1, 3), \
.pin_fifop = GPIO_PIN(P1, 2), \
.pin_cca = GPIO_PIN(P1, 4), \
.pin_sfd = GPIO_PIN(P4, 1), \
.pin_vrefen = GPIO_PIN(P4, 5), \
.pin_reset = GPIO_PIN(P4, 6)}
#ifdef __cplusplus
}
#endif