text: /**
   * @file    usb_pwr.h
   * @author  MCD Application Team
   * @version V4.1.0
   * @date    26-May-2017
   * @brief   Connection/disconnection & power management header
   */
  #pragma once
  
  #include <stdbool.h>
  #include "peripherals/stm32-usb/usb_core.h"
  #include "peripherals/stm32f3/stm32f3xx_hal_cortex.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 */
  
  /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  