00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _USB_ENUM_H_
00024 #define _USB_ENUM_H_
00025
00026
00027
00028 #include "modules/usb/usb_task.h"
00029 #include "usb_descriptors.h"
00030
00031
00032
00033
00034
00037
00038
00039
00040
00041 #define ATTACHED 0
00042 #define POWERED 1
00043 #define DEFAULT 2
00044 #define ADDRESSED 3
00045 #define CONFIGURED 4
00046 #define SUSPENDED 5
00047
00048 #define USB_CONFIG_ATTRIBUTES_RESERVED 0x80
00049 #define USB_CONFIG_BUSPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x00)
00050 #define USB_CONFIG_SELFPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x40)
00051 #define USB_CONFIG_REMOTEWAKEUP (USB_CONFIG_ATTRIBUTES_RESERVED | 0x20)
00052
00053 #define USB_STATUS_REMOTEWAKEUP 0x02
00054
00055
00056
00059 #define Is_device_enumerated() ((usb_configuration_nb!=0) ? TRUE : FALSE)
00060 #define Is_device_not_enumerated() ((usb_configuration_nb!=0) ? FALSE : TRUE)
00061
00062
00063
00064
00084 void usb_process_request( void);
00085
00086 extern U8 usb_configuration_nb;
00087
00089
00090 #endif // _USB_ENUM_H_
00091