00001 /******************** (C) COPYRIGHT 2010 STMicroelectronics ******************** 00002 * File Name : usb_pwr.h 00003 * Author : MCD Application Team 00004 * Version : V3.1.1 00005 * Date : 04/07/2010 00006 * Description : Connection/disconnection & power management header 00007 ******************************************************************************** 00008 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00009 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. 00010 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE 00012 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING 00013 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00014 *******************************************************************************/ 00015 00016 /* Define to prevent recursive inclusion -------------------------------------*/ 00017 #ifndef __USB_PWR_H 00018 #define __USB_PWR_H 00019 00020 /* Includes ------------------------------------------------------------------*/ 00021 /* Exported types ------------------------------------------------------------*/ 00022 typedef enum _RESUME_STATE 00023 { 00024 RESUME_EXTERNAL, 00025 RESUME_INTERNAL, 00026 RESUME_LATER, 00027 RESUME_WAIT, 00028 RESUME_START, 00029 RESUME_ON, 00030 RESUME_OFF, 00031 RESUME_ESOF 00032 } RESUME_STATE; 00033 00034 typedef enum _DEVICE_STATE 00035 { 00036 UNCONNECTED, 00037 ATTACHED, 00038 POWERED, 00039 SUSPENDED, 00040 ADDRESSED, 00041 CONFIGURED 00042 } DEVICE_STATE; 00043 00044 /* Exported constants --------------------------------------------------------*/ 00045 /* Exported macro ------------------------------------------------------------*/ 00046 /* Exported functions ------------------------------------------------------- */ 00047 void Suspend(void); 00048 void Resume_Init(void); 00049 void Resume(RESUME_STATE eResumeSetVal); 00050 00051 /* External variables --------------------------------------------------------*/ 00052 extern __IO DEVICE_STATE bDeviceState; /* USB device status */ 00053 extern __IO bool fSuspendEnabled; /* true when suspend is possible */ 00054 00055 #endif /*__USB_PWR_H*/ 00056 00057 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/