Added HID protocol (bios/normal mode)

This commit is contained in:
NicoHood 2015-10-10 07:52:22 +02:00
parent 5dd1e991fd
commit 24034031b6
3 changed files with 9 additions and 0 deletions

View file

@ -101,6 +101,10 @@ uint8_t BootKeyboard_::getLeds(void){
return leds;
}
uint8_t BootKeyboard_::getProtocol(void){
return protocol;
}
void BootKeyboard_::sendReport(void* data, int length){
USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, length);
}

View file

@ -35,6 +35,7 @@ class BootKeyboard_ : public PUSBListNode, public KeyboardAPI
public:
BootKeyboard_(void);
uint8_t getLeds(void);
uint8_t getProtocol(void);
protected:
// Implementation of the PUSBListNode

View file

@ -37,6 +37,10 @@ THE SOFTWARE.
#define HID_REPORT_DESCRIPTOR_TYPE 0x22
#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
// Keyboard/Mouse protocols (normal or bios) HID1.11 Page 8 4.2 Subclass
#define HID_PROTOCOL_NO_SUBCLASS 0
#define HID_PROTOCOL_BOOT 1
typedef struct
{
uint8_t len; // 9