emlib/src/em_emu.c
void EMU_EM23Init(const EMU_EM23Init_TypeDef *em23Init)
{
#if defined(_EMU_CTRL_EMVREG_MASK)
  EMU->CTRL = em23Init->em23VregFullEn ? (EMU->CTRL | EMU_CTRL_EMVREG)
              : (EMU->CTRL & ~EMU_CTRL_EMVREG);
#elif defined(_EMU_CTRL_EM23VREG_MASK)
  EMU->CTRL = em23Init->em23VregFullEn ? (EMU->CTRL | EMU_CTRL_EM23VREG)
              : (EMU->CTRL & ~EMU_CTRL_EM23VREG);
#else
  (void)em23Init;
#endif

#if defined(_EMU_CTRL_EM23VSCALE_MASK)
  EMU->CTRL = (EMU->CTRL & ~_EMU_CTRL_EM23VSCALE_MASK)
              | (em23Init->vScaleEM23Voltage << _EMU_CTRL_EM23VSCALE_SHIFT);
#endif
}
/***************************************************************************/
/**
 * @brief
 *   Update EMU module with Energy Mode 2 and 3 configuration
 *
 * @param[in] em23Init
 *    Energy Mode 2 and 3 configuration structure
 ******************************************************************************/
@brief
Update EMU module with Energy Mode 2 and 3 configuration

@param[in] em23Init
Energy Mode 2 and 3 configuration structure
@brief Update EMU module with Energy Mode 2 and 3 configuration @param [ in ] em23Init Energy Mode 2 and 3 configuration structure
void EMU_EM23Init(const EMU_EM23Init_TypeDef *em23Init)
{
#if defined(_EMU_CTRL_EMVREG_MASK)
  EMU->CTRL = em23Init->em23VregFullEn ? (EMU->CTRL | EMU_CTRL_EMVREG)
              : (EMU->CTRL & ~EMU_CTRL_EMVREG);
#elif defined(_EMU_CTRL_EM23VREG_MASK)
  EMU->CTRL = em23Init->em23VregFullEn ? (EMU->CTRL | EMU_CTRL_EM23VREG)
              : (EMU->CTRL & ~EMU_CTRL_EM23VREG);
#else
  (void)em23Init;
#endif
#if defined(_EMU_CTRL_EM23VSCALE_MASK)
  EMU->CTRL = (EMU->CTRL & ~_EMU_CTRL_EM23VSCALE_MASK)
              | (em23Init->vScaleEM23Voltage << _EMU_CTRL_EM23VSCALE_SHIFT);
#endif
}
void EMU_EM23Init ( const EMU_EM23Init_TypeDef * em23Init ) { #if defined ( _EMU_CTRL_EMVREG_MASK ) EMU -> CTRL = em23Init -> em23VregFullEn ? ( EMU -> CTRL | EMU_CTRL_EMVREG ) : ( EMU -> CTRL & ~ EMU_CTRL_EMVREG ) ; #elif defined ( _EMU_CTRL_EM23VREG_MASK ) EMU -> CTRL = em23Init -> em23VregFullEn ? ( EMU -> CTRL | EMU_CTRL_EM23VREG ) : ( EMU -> CTRL & ~ EMU_CTRL_EM23VREG ) ; #else ( void ) em23Init ; #endif #if defined ( _EMU_CTRL_EM23VSCALE_MASK ) EMU -> CTRL = ( EMU -> CTRL & ~ _EMU_CTRL_EM23VSCALE_MASK ) | ( em23Init -> vScaleEM23Voltage << _EMU_CTRL_EM23VSCALE_SHIFT ) ; #endif }
@brief
   Update EMU module with Energy Mode 2 and 3 configuration
@brief Update EMU module with Energy Mode 2 and 3 configuration