diff options
Diffstat (limited to 'usb.h')
| -rw-r--r-- | usb.h | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -2,11 +2,13 @@ | |||
| 2 | #define USB_H 1 | 2 | #define USB_H 1 |
| 3 | 3 | ||
| 4 | #include <stdint.h> | 4 | #include <stdint.h> |
| 5 | #include <stdbool.h> | ||
| 5 | #include <avr/io.h> | 6 | #include <avr/io.h> |
| 6 | 7 | ||
| 7 | 8 | ||
| 8 | void usb_init(void); // initialize everything | 9 | void usb_init(void); // initialize everything |
| 9 | uint8_t usb_configured(void); // is the USB port configured | 10 | uint8_t usb_configured(void); // is the USB port configured |
| 11 | void usb_remote_wakeup(void); | ||
| 10 | 12 | ||
| 11 | 13 | ||
| 12 | 14 | ||
| @@ -78,5 +80,13 @@ uint8_t usb_configured(void); // is the USB port configured | |||
| 78 | #define CDC_SET_LINE_CODING 0x20 | 80 | #define CDC_SET_LINE_CODING 0x20 |
| 79 | #define CDC_GET_LINE_CODING 0x21 | 81 | #define CDC_GET_LINE_CODING 0x21 |
| 80 | #define CDC_SET_CONTROL_LINE_STATE 0x22 | 82 | #define CDC_SET_CONTROL_LINE_STATE 0x22 |
| 83 | // HID feature selectors | ||
| 84 | #define DEVICE_REMOTE_WAKEUP 1 | ||
| 85 | #define ENDPOINT_HALT 0 | ||
| 86 | #define TEST_MODE 2 | ||
| 87 | |||
| 88 | |||
| 89 | extern bool remote_wakeup; | ||
| 90 | extern bool suspend; | ||
| 81 | 91 | ||
| 82 | #endif | 92 | #endif |
