mirror of
https://github.com/eddyem/IR-controller.git
synced 2025-12-06 10:45:15 +03:00
55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
/*
|
|
* usb_pwr.h
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
* MA 02110-1301, USA.
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef __USB_PWR_H__
|
|
#define __USB_PWR_H__
|
|
#include "includes.h"
|
|
|
|
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;
|
|
|
|
void Suspend(void);
|
|
void Resume_Init(void);
|
|
void Resume(RESUME_STATE eResumeSetVal);
|
|
RESULT PowerOn(void);
|
|
RESULT PowerOff(void);
|
|
|
|
extern __IO uint32_t bDeviceState;// USB device status
|
|
extern __IO bool fSuspendEnabled; // true when suspend is possible
|
|
|
|
#endif // __USB_PWR_H__
|