mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
59 lines
2.2 KiB
C
59 lines
2.2 KiB
C
|
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
|
||
|
* File Name : usb_pwr.h
|
||
|
* Author : MCD Application Team
|
||
|
* Version : V3.2.1
|
||
|
* Date : 07/05/2010
|
||
|
* Description : Connection/disconnection & power management header
|
||
|
********************************************************************************
|
||
|
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
||
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
||
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
||
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
||
|
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
||
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
||
|
*******************************************************************************/
|
||
|
|
||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||
|
#ifndef __USB_PWR_H
|
||
|
#define __USB_PWR_H
|
||
|
|
||
|
/* Includes ------------------------------------------------------------------*/
|
||
|
/* Exported types ------------------------------------------------------------*/
|
||
|
typedef enum _RESUME_STATE
|
||
|
{
|
||
|
RESUME_EXTERNAL,
|
||
|
RESUME_INTERNAL,
|
||
|
RESUME_LATER,
|
||
|
RESUME_WAIT,
|
||
|
RESUME_START,
|
||
|
RESUME_ON,
|
||
|
RESUME_OFF,
|
||
|
RESUME_ESOF
|
||
|
} RESUME_STATE;
|
||
|
|
||
|
typedef enum _DEVICE_STATE
|
||
|
{
|
||
|
UNCONNECTED,
|
||
|
ATTACHED,
|
||
|
POWERED,
|
||
|
SUSPENDED,
|
||
|
ADDRESSED,
|
||
|
CONFIGURED
|
||
|
} DEVICE_STATE;
|
||
|
|
||
|
/* Exported constants --------------------------------------------------------*/
|
||
|
/* Exported macro ------------------------------------------------------------*/
|
||
|
/* Exported functions ------------------------------------------------------- */
|
||
|
void Suspend(void);
|
||
|
void Resume_Init(void);
|
||
|
void Resume(RESUME_STATE eResumeSetVal);
|
||
|
RESULT PowerOn(void);
|
||
|
RESULT PowerOff(void);
|
||
|
/* External variables --------------------------------------------------------*/
|
||
|
extern __IO uint32_t bDeviceState; /* USB device status */
|
||
|
extern __IO bool fSuspendEnabled; /* true when suspend is possible */
|
||
|
|
||
|
#endif /*__USB_PWR_H*/
|
||
|
|
||
|
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
|