1
0
Fork 0

add system controls(power down/wake up) from generic desktop page(HID)

This commit is contained in:
tmk 2010-11-18 22:35:49 +09:00
parent 02d955e9fe
commit 9019c901dd
7 changed files with 140 additions and 51 deletions

10
usb.h
View file

@ -2,11 +2,13 @@
#define USB_H 1
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
void usb_init(void); // initialize everything
uint8_t usb_configured(void); // is the USB port configured
void usb_remote_wakeup(void);
@ -78,5 +80,13 @@ uint8_t usb_configured(void); // is the USB port configured
#define CDC_SET_LINE_CODING 0x20
#define CDC_GET_LINE_CODING 0x21
#define CDC_SET_CONTROL_LINE_STATE 0x22
// HID feature selectors
#define DEVICE_REMOTE_WAKEUP 1
#define ENDPOINT_HALT 0
#define TEST_MODE 2
extern bool remote_wakeup;
extern bool suspend;
#endif