mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/openmote-b: hook up at86rf215
Openmote-B includes an AT86RF215 radio. This adds support for it.
This commit is contained in:
parent
8ac5bdc6c1
commit
f905108d8e
@ -1,5 +1,13 @@
|
||||
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
|
||||
USEMODULE += cc2538_rf
|
||||
ifeq (,$(filter cc2538_rf,$(USEMODULE)))
|
||||
USEMODULE += at86rf215
|
||||
endif
|
||||
endif
|
||||
|
||||
# at86rf215 is hard-wired to sub-GHz, but 2.4 GHz can be switched between
|
||||
# at86rf215 and cc2538_rf. Use 2.4 GHz for cc2538_rf if both are used.
|
||||
ifeq (at86rf215 cc2538_rf, $(filter at86rf215 cc2538_rf,$(USEMODULE)))
|
||||
DISABLE_MODULE += at86rf215_24ghz
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
|
@ -36,9 +36,15 @@ void board_init(void)
|
||||
gpio_init(RF24_SWITCH_CC2538_PIN, GPIO_OUT);
|
||||
gpio_init(RF24_SWITCH_AT86RF215_PIN, GPIO_OUT);
|
||||
|
||||
/* start with cc2538 2.4ghz radio*/
|
||||
RF24_SWITCH_CC2538_ON;
|
||||
#ifdef MODULE_CC2538_RF
|
||||
/* use cc2538 2.4ghz radio*/
|
||||
RF24_SWITCH_AT86RF215_OFF;
|
||||
RF24_SWITCH_CC2538_ON;
|
||||
#else
|
||||
/* use at86rf215 2.4ghz radio*/
|
||||
RF24_SWITCH_CC2538_OFF;
|
||||
RF24_SWITCH_AT86RF215_ON;
|
||||
#endif
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
@ -76,6 +76,16 @@
|
||||
#define RF24_SWITCH_AT86RF215_TOGGLE (RF_SWITCH_PORT->DATA ^= RF24_SWITCH_AT86RF215_MASK)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name AT86RF215 configuration
|
||||
* @{
|
||||
*/
|
||||
#define AT86RF215_PARAM_SPI SPI_DEV(0)
|
||||
#define AT86RF215_PARAM_CS GPIO_PIN(0, 3) /* A3 */
|
||||
#define AT86RF215_PARAM_INT GPIO_PIN(3, 0) /* D0 */
|
||||
#define AT86RF215_PARAM_RESET GPIO_PIN(3, 1) /* D1 */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name xtimer configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user