Create release.yml
[betaflight.git] / src / main / vcp / usb_pwr.h
blobeb0baec8029a06d0faf6ea7183fdc0b080737071
1 /**
2 ******************************************************************************
3 * @file usb_pwr.h
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 21-January-2013
7 * @brief Connection/disconnection & power management header
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USB_PWR_H
30 #define __USB_PWR_H
32 /* Includes ------------------------------------------------------------------*/
33 /* Exported types ------------------------------------------------------------*/
34 typedef enum _RESUME_STATE {
35 RESUME_EXTERNAL,
36 RESUME_INTERNAL,
37 RESUME_LATER,
38 RESUME_WAIT,
39 RESUME_START,
40 RESUME_ON,
41 RESUME_OFF,
42 RESUME_ESOF
43 } RESUME_STATE;
45 typedef enum _DEVICE_STATE {
46 UNCONNECTED,
47 ATTACHED,
48 POWERED,
49 SUSPENDED,
50 ADDRESSED,
51 CONFIGURED
52 } DEVICE_STATE;
54 /* Exported constants --------------------------------------------------------*/
55 /* Exported macro ------------------------------------------------------------*/
56 /* Exported functions ------------------------------------------------------- */
57 void Suspend(void);
58 void Resume_Init(void);
59 void Resume(RESUME_STATE eResumeSetVal);
60 RESULT PowerOn(void);
61 RESULT PowerOff(void);
63 /* External variables --------------------------------------------------------*/
64 extern __IO uint32_t bDeviceState; /* USB device status */
65 extern __IO boolean fSuspendEnabled; /* true when suspend is possible */ // HJI
66 #endif /*__USB_PWR_H*/
68 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/