]> git.gir.st - tmk_keyboard.git/blob - pjrc/usb_extra.h
added protocol stack: pjrc, vusb
[tmk_keyboard.git] / pjrc / usb_extra.h
1 #ifndef USB_EXTRA_H
2 #define USB_EXTRA_H 1
3 /*
4 * Enhanced keyboard features for Windows:
5 * Audio control and System control
6 *
7 * http://www.microsoft.com/whdc/archive/w2kbd.mspx
8 */
9
10 #include <stdint.h>
11 #include "usb.h"
12
13
14 #define EXTRA_INTERFACE 3
15 #define EXTRA_ENDPOINT 4
16 #define EXTRA_SIZE 2
17 #define EXTRA_BUFFER EP_DOUBLE_BUFFER
18
19
20 // Consumer Page(0x0C) Consumer Control(0x01)
21 #define AUDIO_VOL_UP (1<<0)
22 #define AUDIO_VOL_DOWN (1<<1)
23 #define AUDIO_MUTE (1<<2)
24
25 // Generic Desktop Page(0x01) System Control(0x80)
26 #define SYSTEM_POWER_DOWN (1<<0)
27 #define SYSTEM_SLEEP (1<<1)
28 #define SYSTEM_WAKE_UP (1<<2)
29
30
31 int8_t usb_extra_audio_send(uint8_t bits);
32 int8_t usb_extra_system_send(uint8_t bits);
33
34 #endif
Imprint / Impressum