Browse Source

boards/z1: add support for CC2420 radio

pr/spi.typo
Hauke Petersen 7 years ago committed by kYc0o
parent
commit
204702897b
  1. 3
      boards/z1/Makefile.dep
  2. 3
      boards/z1/Makefile.include
  3. 13
      boards/z1/include/board.h

3
boards/z1/Makefile.dep

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

3
boards/z1/Makefile.include

@ -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

13
boards/z1/include/board.h

@ -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

Loading…
Cancel
Save