Rev 1 | Rev 304 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
273 | killagreg | 1 | /******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** |
1 | ingob | 2 | * File Name : usb_pwr.h |
3 | * Author : MCD Application Team |
||
273 | killagreg | 4 | * Version : V2.0.0 |
5 | * Date : 09/29/2008 |
||
1 | ingob | 6 | * Description : Connection/disconnection & power management header |
7 | ******************************************************************************** |
||
273 | killagreg | 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
1 | ingob | 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
||
11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
||
12 | * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
||
13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
||
14 | *******************************************************************************/ |
||
273 | killagreg | 15 | |
1 | ingob | 16 | /* Define to prevent recursive inclusion -------------------------------------*/ |
17 | #ifndef __USB_PWR_H |
||
18 | #define __USB_PWR_H |
||
273 | killagreg | 19 | |
1 | ingob | 20 | /* Includes ------------------------------------------------------------------*/ |
21 | /* Exported types ------------------------------------------------------------*/ |
||
273 | killagreg | 22 | typedef enum _RESUME_STATE |
23 | { |
||
24 | RESUME_EXTERNAL, |
||
25 | RESUME_INTERNAL, |
||
26 | RESUME_LATER, |
||
27 | RESUME_WAIT, |
||
28 | RESUME_START, |
||
29 | RESUME_ON, |
||
30 | RESUME_OFF, |
||
31 | RESUME_ESOF |
||
1 | ingob | 32 | } RESUME_STATE; |
33 | |||
273 | killagreg | 34 | typedef enum _DEVICE_STATE |
35 | { |
||
36 | UNCONNECTED, |
||
37 | ATTACHED, |
||
38 | POWERED, |
||
39 | SUSPENDED, |
||
40 | ADDRESSED, |
||
41 | CONFIGURED |
||
1 | ingob | 42 | } DEVICE_STATE; |
273 | killagreg | 43 | |
44 | /* Exported constants --------------------------------------------------------*/ |
||
45 | /* Exported macro ------------------------------------------------------------*/ |
||
1 | ingob | 46 | /* Exported functions ------------------------------------------------------- */ |
47 | void Suspend(void); |
||
48 | void Resume_Init(void); |
||
49 | void Resume(RESUME_STATE eResumeSetVal); |
||
50 | RESULT PowerOn(void); |
||
51 | RESULT PowerOff(void); |
||
273 | killagreg | 52 | |
53 | /* External variables --------------------------------------------------------*/ |
||
54 | extern vu32 bDeviceState; /* USB device status */ |
||
55 | extern volatile bool fSuspendEnabled; /* true when suspend is possible */ |
||
56 | |||
57 | #endif /*__USB_PWR_H*/ |
||
58 | |||
59 | /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ |