mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/samr21-xpro: only configure antenna switch if radio is used
This commit is contained in:
parent
41bbafdfe4
commit
ec397cbc5e
@ -41,12 +41,15 @@ void board_init(void)
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
LED0_OFF;
|
||||
|
||||
/* initialize the on-board antenna switch */
|
||||
gpio_init(RFCTL1_PIN, GPIO_OUT);
|
||||
gpio_init(RFCTL2_PIN, GPIO_OUT);
|
||||
/* set default antenna switch configuration */
|
||||
board_antenna_config(RFCTL_ANTENNA_DEFAULT);
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* initialize the on-board antenna switch */
|
||||
if (IS_USED(MODULE_AT86RF233)) {
|
||||
gpio_init(RFCTL1_PIN, GPIO_OUT);
|
||||
gpio_init(RFCTL2_PIN, GPIO_OUT);
|
||||
|
||||
/* set default antenna switch configuration */
|
||||
board_antenna_config(RFCTL_ANTENNA_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user