コード例 #1
0
/**
  * @brief  Handles wake-up restoring normal operations
  * @param  None.
  * @retval USB_SUCCESS.
  */
void Resume_Init(void)
{
	uint16_t wCNTR;

	/* ------------------ ONLY WITH BUS-POWERED DEVICES ---------------------- */
	/* restart the clocks */
	/* ...  */

	/* CNTR_LPMODE = 0 */
	wCNTR = _GetCNTR();
	wCNTR &= (~CNTR_LPMODE);
	_SetCNTR(wCNTR);


	/* restore full power */
	/* ... on connected devices */
	Leave_LowPowerMode();

	/* reset FSUSP bit */
	_SetCNTR(IMR_MSK);

	/* reverse suspend preparation */
	/* ... */

}
コード例 #2
0
ファイル: usb_pwr.c プロジェクト: rgwan/stm32-gcc
/*******************************************************************************
* Function Name  : Resume_Init
* Description    : Handles wake-up restoring normal operations
* Input          : None.
* Output         : None.
* Return         : USB_SUCCESS.
*******************************************************************************/
void Resume_Init(void)
{
  /* ------------------ ONLY WITH BUS-POWERED DEVICES ---------------------- */
  /* restart the clocks */
  /* ...  */
#ifndef STM32F10X_CL
  uint16_t wCNTR;
  
  /* CNTR_LPMODE = 0 */
  wCNTR = _GetCNTR();
  wCNTR &= (~CNTR_LPMODE);
  _SetCNTR(wCNTR);
#endif /* STM32F10X_CL */
  
  /* restore full power */
  /* ... on connected devices */
   //  dbg("Resume_Init CONFIGURED\n");
  Leave_LowPowerMode();

#ifndef STM32F10X_CL
  /* reset FSUSP bit */
  _SetCNTR(IMR_MSK);
#endif /* STM32F10X_CL */
  
  /* reverse suspend preparation */
  /* ... */
}
コード例 #3
0
ファイル: usb_pwr.c プロジェクト: bistromath/tach
/*******************************************************************************
* Function Name  : Resume_Init
* Description    : Handles wake-up restoring normal operations
* Input          : None.
* Output         : None.
* Return         : USB_SUCCESS.
*******************************************************************************/
void Resume_Init(void)
{
#ifndef STM32F10X_CL
  uint16_t wCNTR;
#endif /* STM32F10X_CL */  

  /* ------------------ ONLY WITH BUS-POWERED DEVICES ---------------------- */
  /* restart the clocks */
  /* ...  */

#ifndef STM32F10X_CL
  /* CNTR_LPMODE = 0 */
  wCNTR = _GetCNTR();
  wCNTR &= (~CNTR_LPMODE);
  _SetCNTR(wCNTR);
#endif /* STM32F10X_CL */

#ifdef STM32F10X_CL
  /* Ungate the PHY and AHB USB clocks  */
  _OTGD_FS_UNGATE_PHYCLK;
#endif /* STM32F10X_CL */    
  
  /* restore full power */
  /* ... on connected devices */
  Leave_LowPowerMode();

#ifndef STM32F10X_CL
  /* reset FSUSP bit */
  _SetCNTR(IMR_MSK);
#endif /* STM32F10X_CL */

  /* reverse suspend preparation */
  /* ... */ 

}
コード例 #4
0
ファイル: usb_pwr.c プロジェクト: mambrus/bitfire
/*******************************************************************************
* Function Name  : Resume_Init
* Description    : Handles wake-up restoring normal operations
* Input          : None
* Return         : None
*******************************************************************************/
void Resume_Init(void)
{
 u16 wCNTR;

    fCellSuspended= FALSE;

    /* CNTR_LPMODE = 0 */
    wCNTR = _GetCNTR();
    wCNTR &= (~CNTR_LPMODE);
    _SetCNTR(wCNTR);

     /* restore full power */
     /* ... on connected devices */

     Leave_LowPowerMode();

     /* reset FSUSP bit */
     _SetCNTR(IMR_MSK);

     /* reverse suspend preparation */
     /* ... */

}/* Resume_Init() */