diff --git a/configs/samv71-xult/src/sam_bringup.c b/configs/samv71-xult/src/sam_bringup.c index b24cfc96432..6234c845ae0 100644 --- a/configs/samv71-xult/src/sam_bringup.c +++ b/configs/samv71-xult/src/sam_bringup.c @@ -529,6 +529,16 @@ int sam_bringup(void) } #endif +#ifdef HAVE_MRF24J40 + /* Configure MRF24J40 wireless */ + + ret = sam_mrf24j40_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_mrf24j40_initialize() failed: %d\n", ret); + } +#endif + #ifdef HAVE_ELF /* Initialize the ELF binary loader */ diff --git a/configs/samv71-xult/src/samv71-xult.h b/configs/samv71-xult/src/samv71-xult.h index ae2b71b3a0c..ef4a5151407 100644 --- a/configs/samv71-xult/src/samv71-xult.h +++ b/configs/samv71-xult/src/samv71-xult.h @@ -386,6 +386,10 @@ # undef HAVE_MRF24J40 #endif +#if !defined(CONFIG_SAMV71XULT_MB1_BEE) && !defined(CONFIG_SAMV71XULT_MB2_BEE) +# undef HAVE_MRF24J40 +#endif + #ifndef CONFIG_SAMV7_SPI0_MASTER # undef HAVE_MRF24J40 #endif @@ -843,5 +847,21 @@ int sam_wm8904_initialize(int minor); int sam_audio_null_initialize(int minor); #endif /* HAVE_AUDIO_NULL */ +/**************************************************************************** + * Name: stm32_mrf24j40_initialize + * + * Description: + * Initialize the MRF24J40 device. + * + * Returned Value: + * Zero is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +#ifdef HAVE_MRF24J40 +int sam_mrf24j40_initialize(void); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SAMV71_XULT_SRC_SAMV71_XULT_H */