/**************************************************************************//** * @brief Initialize EFM32GG_DK3750 board support package functionality * @param[in] mode Initialize in EBI or SPI mode *****************************************************************************/ void DVK_init(DVK_Init_TypeDef mode) { bool ret = false; if (mode == DVK_Init_EBI) { dvkOperationMode = mode; DVK_busControlMode(DVK_BusControl_EBI); ret = DVK_EBI_init(); } if (mode == DVK_Init_SPI) { dvkOperationMode = mode; DVK_busControlMode(DVK_BusControl_SPI); ret = DVK_SPI_init(); } if (ret == false) { /* Unable to access board control, this is an abornomal situation. */ /* Try to restart kit and reprogram EFM32 with a standard example */ /* as this is most likely caused by a peripheral misconfiguration. */ while (1) ; } DVK_setEnergyMode(0); }
/**************************************************************************//** * @brief Initializes DVK, configures board control access *****************************************************************************/ bool DVK_init(void) { bool ret; #ifdef DVK_EBI_CONTROL ret = DVK_EBI_init(); #endif #ifdef DVK_SPI_CONTROL ret = DVK_SPI_init(); #endif if ( ret == false ) { /* Board is configured in wrong mode, please restart KIT! */ while(1); } /* Inform AEM application that we are in Energy Mode 0 by default */ DVK_setEnergyMode(0); return ret; }