diff --git a/examples/HID/USBHIDBootKbd/USBHIDBootKbd.pde b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.pde new file mode 100644 index 00000000..1b1d7ebf --- /dev/null +++ b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.pde @@ -0,0 +1,96 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +class KbdRptParser : public KeyboardReportParser +{ + void PrintKey(uint8_t mod, uint8_t key); + +protected: + virtual void OnKeyDown (uint8_t mod, uint8_t key); + virtual void OnKeyUp (uint8_t mod, uint8_t key); + virtual void OnKeyPressed(uint8_t key); +}; + +void KbdRptParser::PrintKey(uint8_t m, uint8_t key) +{ + MODIFIERKEYS mod; + *((uint8_t*)&mod) = m; + Serial.print((mod.bmLeftCtrl == 1) ? "C" : " "); + Serial.print((mod.bmLeftShift == 1) ? "S" : " "); + Serial.print((mod.bmLeftAlt == 1) ? "A" : " "); + Serial.print((mod.bmLeftGUI == 1) ? "G" : " "); + + Serial.print(" >"); + PrintHex(key); + Serial.print("< "); + + Serial.print((mod.bmRightCtrl == 1) ? "C" : " "); + Serial.print((mod.bmRightShift == 1) ? "S" : " "); + Serial.print((mod.bmRightAlt == 1) ? "A" : " "); + Serial.println((mod.bmRightGUI == 1) ? "G" : " "); +}; + +void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key) +{ + Serial.print("DN "); + PrintKey(mod, key); + uint8_t c = OemToAscii(mod, key); + + if (c) + OnKeyPressed(c); +} + +void KbdRptParser::OnKeyUp(uint8_t mod, uint8_t key) +{ + Serial.print("UP "); + PrintKey(mod, key); +} + +void KbdRptParser::OnKeyPressed(uint8_t key) +{ + Serial.print("ASCII: "); + Serial.println(key); +}; + +USB Usb; +//USBHub Hub(&Usb); +HIDBoot Keyboard(&Usb); + +uint32_t next_time; + +KbdRptParser Prs; + +void setup() +{ + Serial.begin( 115200 ); + Serial.println("Start"); + + if (Usb.Init() == -1) + Serial.println("OSC did not start."); + + delay( 200 ); + + next_time = millis() + 5000; + + Keyboard.SetReportParser(0, (HIDReportParser*)&Prs); +} + +void loop() +{ + Usb.Task(); +} + diff --git a/examples/HID/USBHIDBootMouse/USBHIDBootMouse.pde b/examples/HID/USBHIDBootMouse/USBHIDBootMouse.pde new file mode 100644 index 00000000..10e97eb6 --- /dev/null +++ b/examples/HID/USBHIDBootMouse/USBHIDBootMouse.pde @@ -0,0 +1,87 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +class MouseRptParser : public MouseReportParser +{ +protected: + virtual void OnMouseMove (MOUSEINFO *mi); + virtual void OnLeftButtonUp (MOUSEINFO *mi); + virtual void OnLeftButtonDown (MOUSEINFO *mi); + virtual void OnRightButtonUp (MOUSEINFO *mi); + virtual void OnRightButtonDown (MOUSEINFO *mi); + virtual void OnMiddleButtonUp (MOUSEINFO *mi); + virtual void OnMiddleButtonDown (MOUSEINFO *mi); +}; +void MouseRptParser::OnMouseMove(MOUSEINFO *mi) +{ + Serial.print("dx="); + Serial.print(mi->dX, DEC); + Serial.print(" dy="); + Serial.println(mi->dY, DEC); +}; +void MouseRptParser::OnLeftButtonUp (MOUSEINFO *mi) +{ + Serial.println("L Butt Up"); +}; +void MouseRptParser::OnLeftButtonDown (MOUSEINFO *mi) +{ + Serial.println("L Butt Dn"); +}; +void MouseRptParser::OnRightButtonUp (MOUSEINFO *mi) +{ + Serial.println("R Butt Up"); +}; +void MouseRptParser::OnRightButtonDown (MOUSEINFO *mi) +{ + Serial.println("R Butt Dn"); +}; +void MouseRptParser::OnMiddleButtonUp (MOUSEINFO *mi) +{ + Serial.println("M Butt Up"); +}; +void MouseRptParser::OnMiddleButtonDown (MOUSEINFO *mi) +{ + Serial.println("M Butt Dn"); +}; + +USB Usb; +//USBHub Hub(&Usb); +HIDBoot Mouse(&Usb); + +uint32_t next_time; + +MouseRptParser Prs; + +void setup() +{ + Serial.begin( 115200 ); + Serial.println("Start"); + + if (Usb.Init() == -1) + Serial.println("OSC did not start."); + + delay( 200 ); + + next_time = millis() + 5000; + + Mouse.SetReportParser(0, (HIDReportParser*)&Prs); +} + +void loop() +{ + Usb.Task(); +} + diff --git a/examples/USB_desc/USB_desc.pde b/examples/USB_desc/USB_desc.pde new file mode 100644 index 00000000..1a7b0f78 --- /dev/null +++ b/examples/USB_desc/USB_desc.pde @@ -0,0 +1,347 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pgmstrings.h" + +USB Usb; +USBHub Hub1(&Usb); +USBHub Hub2(&Usb); +USBHub Hub3(&Usb); +USBHub Hub4(&Usb); +USBHub Hub5(&Usb); +USBHub Hub6(&Usb); +USBHub Hub7(&Usb); + +uint32_t next_time; + +void PrintAllAddresses(UsbDevice *pdev) +{ + UsbDeviceAddress adr; + adr.devAddress = pdev->address; + Serial.print("\r\nAddr:"); + Serial.print(adr.devAddress, HEX); + Serial.print("("); + Serial.print(adr.bmHub, HEX); + Serial.print("."); + Serial.print(adr.bmParent, HEX); + Serial.print("."); + Serial.print(adr.bmAddress, HEX); + Serial.println(")"); +} + +void PrintAddress(uint8_t addr) +{ + UsbDeviceAddress adr; + adr.devAddress = addr; + Serial.print("\r\nADDR:\t"); + Serial.println(adr.devAddress,HEX); + Serial.print("DEV:\t"); + Serial.println(adr.bmAddress,HEX); + Serial.print("PRNT:\t"); + Serial.println(adr.bmParent,HEX); + Serial.print("HUB:\t"); + Serial.println(adr.bmHub,HEX); +} + +void setup() +{ + Serial.begin( 115200 ); + Serial.println("Start"); + + if (Usb.Init() == -1) + Serial.println("OSC did not start."); + + delay( 200 ); + + next_time = millis() + 10000; +} + +byte getdevdescr( byte addr, byte &num_conf ); + +void PrintDescriptors(uint8_t addr) +{ + uint8_t rcode = 0; + byte num_conf = 0; + + rcode = getdevdescr( (byte)addr, num_conf ); + if( rcode ) + { + printProgStr(Gen_Error_str); + print_hex( rcode, 8 ); + } + Serial.print("\r\n"); + + for (int i=0; iaddress, 8); + Serial.println("\r\n--"); + PrintDescriptors( pdev->address ); +} + +void loop() +{ + Usb.Task(); + + if( Usb.getUsbTaskState() == USB_STATE_RUNNING ) + { + //if (millis() >= next_time) + { + Usb.ForEachUsbDevice(&PrintAllDescriptors); + Usb.ForEachUsbDevice(&PrintAllAddresses); + + while( 1 ); //stop + } + } +} + +byte getdevdescr( byte addr, byte &num_conf ) +{ + USB_DEVICE_DESCRIPTOR buf; + byte rcode; + rcode = Usb.getDevDescr( addr, 0, 0x12, ( uint8_t *)&buf ); + if( rcode ) { + return( rcode ); + } + printProgStr(Dev_Header_str); + printProgStr(Dev_Length_str); + print_hex( buf.bLength, 8 ); + printProgStr(Dev_Type_str); + print_hex( buf.bDescriptorType, 8 ); + printProgStr(Dev_Version_str); + print_hex( buf.bcdUSB, 16 ); + printProgStr(Dev_Class_str); + print_hex( buf.bDeviceClass, 8 ); + printProgStr(Dev_Subclass_str); + print_hex( buf.bDeviceSubClass, 8 ); + printProgStr(Dev_Protocol_str); + print_hex( buf.bDeviceProtocol, 8 ); + printProgStr(Dev_Pktsize_str); + print_hex( buf.bMaxPacketSize0, 8 ); + printProgStr(Dev_Vendor_str); + print_hex( buf.idVendor, 16 ); + printProgStr(Dev_Product_str); + print_hex( buf.idProduct, 16 ); + printProgStr(Dev_Revision_str); + print_hex( buf.bcdDevice, 16 ); + printProgStr(Dev_Mfg_str); + print_hex( buf.iManufacturer, 8 ); + printProgStr(Dev_Prod_str); + print_hex( buf.iProduct, 8 ); + printProgStr(Dev_Serial_str); + print_hex( buf.iSerialNumber, 8 ); + printProgStr(Dev_Nconf_str); + print_hex( buf.bNumConfigurations, 8 ); + num_conf = buf.bNumConfigurations; + return( 0 ); +} + +void printhubdescr(uint8_t *descrptr, uint8_t addr) +{ + HubDescriptor *pHub = (HubDescriptor*) descrptr; + uint8_t len = *((uint8_t*)descrptr); + + printProgStr(PSTR("\r\n\r\nHub Descriptor:\r\n")); + printProgStr(PSTR("bDescLength:\t\t")); + Serial.println(pHub->bDescLength, HEX); + + printProgStr(PSTR("bDescriptorType:\t")); + Serial.println(pHub->bDescriptorType, HEX); + + printProgStr(PSTR("bNbrPorts:\t\t")); + Serial.println(pHub->bNbrPorts, HEX); + + printProgStr(PSTR("LogPwrSwitchMode:\t")); + Serial.println(pHub->LogPwrSwitchMode, BIN); + + printProgStr(PSTR("CompoundDevice:\t\t")); + Serial.println(pHub->CompoundDevice, BIN); + + printProgStr(PSTR("OverCurrentProtectMode:\t")); + Serial.println(pHub->OverCurrentProtectMode, BIN); + + printProgStr(PSTR("TTThinkTime:\t\t")); + Serial.println(pHub->TTThinkTime, BIN); + + printProgStr(PSTR("PortIndicatorsSupported:")); + Serial.println(pHub->PortIndicatorsSupported, BIN); + + printProgStr(PSTR("Reserved:\t\t")); + Serial.println(pHub->Reserved, HEX); + + printProgStr(PSTR("bPwrOn2PwrGood:\t\t")); + Serial.println(pHub->bPwrOn2PwrGood, HEX); + + printProgStr(PSTR("bHubContrCurrent:\t")); + Serial.println(pHub->bHubContrCurrent, HEX); + + for (uint8_t i=7; ibNbrPorts; i++) + // PrintHubPortStatus(&Usb, addr, i, 1); +} + +byte getconfdescr( byte addr, byte conf ) +{ + uint8_t buf[ BUFSIZE ]; + uint8_t* buf_ptr = buf; + byte rcode; + byte descr_length; + byte descr_type; + unsigned int total_length; + rcode = Usb.getConfDescr( addr, 0, 4, conf, buf ); //get total length + LOBYTE( total_length ) = buf[ 2 ]; + HIBYTE( total_length ) = buf[ 3 ]; + if( total_length > 256 ) { //check if total length is larger than buffer + printProgStr(Conf_Trunc_str); + total_length = 256; + } + rcode = Usb.getConfDescr( addr, 0, total_length, conf, buf ); //get the whole descriptor + while( buf_ptr < buf + total_length ) { //parsing descriptors + descr_length = *( buf_ptr ); + descr_type = *( buf_ptr + 1 ); + switch( descr_type ) { + case( USB_DESCRIPTOR_CONFIGURATION ): + printconfdescr( buf_ptr ); + break; + case( USB_DESCRIPTOR_INTERFACE ): + printintfdescr( buf_ptr ); + break; + case( USB_DESCRIPTOR_ENDPOINT ): + printepdescr( buf_ptr ); + break; + case 0x29: + printhubdescr( buf_ptr, addr ); + break; + default: + printunkdescr( buf_ptr ); + break; + }//switch( descr_type + buf_ptr = ( buf_ptr + descr_length ); //advance buffer pointer + }//while( buf_ptr <=... + return( 0 ); +} +/* prints hex numbers with leading zeroes */ +// copyright, Peter H Anderson, Baltimore, MD, Nov, '07 +// source: http://www.phanderson.com/arduino/arduino_display.html +void print_hex(int v, int num_places) +{ + int mask=0, n, num_nibbles, digit; + + for (n=1; n<=num_places; n++) { + mask = (mask << 1) | 0x0001; + } + v = v & mask; // truncate v to specified number of places + + num_nibbles = num_places / 4; + if ((num_places % 4) != 0) { + ++num_nibbles; + } + do { + digit = ((v >> (num_nibbles-1) * 4)) & 0x0f; + Serial.print(digit, HEX); + } + while(--num_nibbles); +} +/* function to print configuration descriptor */ +void printconfdescr( uint8_t* descr_ptr ) +{ + USB_CONFIGURATION_DESCRIPTOR* conf_ptr = ( USB_CONFIGURATION_DESCRIPTOR* )descr_ptr; + printProgStr(Conf_Header_str); + printProgStr(Conf_Totlen_str); + print_hex( conf_ptr->wTotalLength, 16 ); + printProgStr(Conf_Nint_str); + print_hex( conf_ptr->bNumInterfaces, 8 ); + printProgStr(Conf_Value_str); + print_hex( conf_ptr->bConfigurationValue, 8 ); + printProgStr(Conf_String_str); + print_hex( conf_ptr->iConfiguration, 8 ); + printProgStr(Conf_Attr_str); + print_hex( conf_ptr->bmAttributes, 8 ); + printProgStr(Conf_Pwr_str); + print_hex( conf_ptr->bMaxPower, 8 ); + return; +} +/* function to print interface descriptor */ +void printintfdescr( uint8_t* descr_ptr ) +{ + USB_INTERFACE_DESCRIPTOR* intf_ptr = ( USB_INTERFACE_DESCRIPTOR* )descr_ptr; + printProgStr(Int_Header_str); + printProgStr(Int_Number_str); + print_hex( intf_ptr->bInterfaceNumber, 8 ); + printProgStr(Int_Alt_str); + print_hex( intf_ptr->bAlternateSetting, 8 ); + printProgStr(Int_Endpoints_str); + print_hex( intf_ptr->bNumEndpoints, 8 ); + printProgStr(Int_Class_str); + print_hex( intf_ptr->bInterfaceClass, 8 ); + printProgStr(Int_Subclass_str); + print_hex( intf_ptr->bInterfaceSubClass, 8 ); + printProgStr(Int_Protocol_str); + print_hex( intf_ptr->bInterfaceProtocol, 8 ); + printProgStr(Int_String_str); + print_hex( intf_ptr->iInterface, 8 ); + return; +} +/* function to print endpoint descriptor */ +void printepdescr( uint8_t* descr_ptr ) +{ + USB_ENDPOINT_DESCRIPTOR* ep_ptr = ( USB_ENDPOINT_DESCRIPTOR* )descr_ptr; + printProgStr(End_Header_str); + printProgStr(End_Address_str); + print_hex( ep_ptr->bEndpointAddress, 8 ); + printProgStr(End_Attr_str); + print_hex( ep_ptr->bmAttributes, 8 ); + printProgStr(End_Pktsize_str); + print_hex( ep_ptr->wMaxPacketSize, 16 ); + printProgStr(End_Interval_str); + print_hex( ep_ptr->bInterval, 8 ); + + return; +} +/*function to print unknown descriptor */ +void printunkdescr( uint8_t* descr_ptr ) +{ + byte length = *descr_ptr; + byte i; + printProgStr(Unk_Header_str); + printProgStr(Unk_Length_str); + print_hex( *descr_ptr, 8 ); + printProgStr(Unk_Type_str); + print_hex( *(descr_ptr + 1 ), 8 ); + printProgStr(Unk_Contents_str); + descr_ptr += 2; + for( i = 0; i < length; i++ ) { + print_hex( *descr_ptr, 8 ); + descr_ptr++; + } +} + + +/* Print a string from Program Memory directly to save RAM */ +void printProgStr(const prog_char str[]) +{ + char c; + if(!str) return; + while((c = pgm_read_byte(str++))) + Serial.print(c,BYTE); +} diff --git a/examples/USB_desc/pgmstrings.h b/examples/USB_desc/pgmstrings.h new file mode 100644 index 00000000..bdb0077e --- /dev/null +++ b/examples/USB_desc/pgmstrings.h @@ -0,0 +1,52 @@ +#if !defined(__PGMSTRINGS_H__) +#define __PGMSTRINGS_H__ + +#define LOBYTE(x) ((char*)(&(x)))[0] +#define HIBYTE(x) ((char*)(&(x)))[1] +#define BUFSIZE 256 //buffer size + + +/* Print strings in Program Memory */ +const char Gen_Error_str[] PROGMEM = "\r\nRequest error. Error code:\t"; +const char Dev_Header_str[] PROGMEM ="\r\nDevice descriptor: "; +const char Dev_Length_str[] PROGMEM ="\r\nDescriptor Length:\t"; +const char Dev_Type_str[] PROGMEM ="\r\nDescriptor type:\t"; +const char Dev_Version_str[] PROGMEM ="\r\nUSB version:\t\t"; +const char Dev_Class_str[] PROGMEM ="\r\nDevice class:\t\t"; +const char Dev_Subclass_str[] PROGMEM ="\r\nDevice Subclass:\t"; +const char Dev_Protocol_str[] PROGMEM ="\r\nDevice Protocol:\t"; +const char Dev_Pktsize_str[] PROGMEM ="\r\nMax.packet size:\t"; +const char Dev_Vendor_str[] PROGMEM ="\r\nVendor ID:\t\t"; +const char Dev_Product_str[] PROGMEM ="\r\nProduct ID:\t\t"; +const char Dev_Revision_str[] PROGMEM ="\r\nRevision ID:\t\t"; +const char Dev_Mfg_str[] PROGMEM ="\r\nMfg.string index:\t"; +const char Dev_Prod_str[] PROGMEM ="\r\nProd.string index:\t"; +const char Dev_Serial_str[] PROGMEM ="\r\nSerial number index:\t"; +const char Dev_Nconf_str[] PROGMEM ="\r\nNumber of conf.:\t"; +const char Conf_Trunc_str[] PROGMEM ="Total length truncated to 256 bytes"; +const char Conf_Header_str[] PROGMEM ="\r\nConfiguration descriptor:"; +const char Conf_Totlen_str[] PROGMEM ="\r\nTotal length:\t\t"; +const char Conf_Nint_str[] PROGMEM ="\r\nNum.intf:\t\t"; +const char Conf_Value_str[] PROGMEM ="\r\nConf.value:\t\t"; +const char Conf_String_str[] PROGMEM ="\r\nConf.string:\t\t"; +const char Conf_Attr_str[] PROGMEM ="\r\nAttr.:\t\t\t"; +const char Conf_Pwr_str[] PROGMEM ="\r\nMax.pwr:\t\t"; +const char Int_Header_str[] PROGMEM ="\r\n\r\nInterface descriptor:"; +const char Int_Number_str[] PROGMEM ="\r\nIntf.number:\t\t"; +const char Int_Alt_str[] PROGMEM ="\r\nAlt.:\t\t\t"; +const char Int_Endpoints_str[] PROGMEM ="\r\nEndpoints:\t\t"; +const char Int_Class_str[] PROGMEM ="\r\nIntf. Class:\t\t"; +const char Int_Subclass_str[] PROGMEM ="\r\nIntf. Subclass:\t\t"; +const char Int_Protocol_str[] PROGMEM ="\r\nIntf. Protocol:\t\t"; +const char Int_String_str[] PROGMEM ="\r\nIntf.string:\t\t"; +const char End_Header_str[] PROGMEM ="\r\n\r\nEndpoint descriptor:"; +const char End_Address_str[] PROGMEM ="\r\nEndpoint address:\t"; +const char End_Attr_str[] PROGMEM ="\r\nAttr.:\t\t\t"; +const char End_Pktsize_str[] PROGMEM ="\r\nMax.pkt size:\t\t"; +const char End_Interval_str[] PROGMEM ="\r\nPolling interval:\t"; +const char Unk_Header_str[] PROGMEM = "\r\nUnknown descriptor:"; +const char Unk_Length_str[] PROGMEM ="\r\nLength:\t\t"; +const char Unk_Type_str[] PROGMEM ="\r\nType:\t\t"; +const char Unk_Contents_str[] PROGMEM ="\r\nContents:\t"; + +#endif // __PGMSTRINGS_H__ \ No newline at end of file diff --git a/hid.cpp b/hid.cpp new file mode 100644 index 00000000..1e5449e7 --- /dev/null +++ b/hid.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#include "hid.h" + +//const uint16_t HID::maxHidInterfaces = 3; +//const uint16_t HID::maxEpPerInterface = 2; +const uint8_t HID::epInterruptInIndex = 1; +const uint8_t HID::epInterruptOutIndex = 2; + + +//get HID report descriptor +uint8_t HID::GetReportDescr( uint8_t ep, USBReadParser *parser ) +{ + const uint8_t constBufLen = 64; + uint8_t buf[constBufLen]; + + //HexDumper HexDump; + + //return( pUsb->ctrlReq( bAddress, ep, /*bmREQ_HIDREPORT*/0x81, USB_REQUEST_GET_DESCRIPTOR, 0x00, + // HID_DESCRIPTOR_REPORT, 0x0000, constBufLen, constBufLen, buf, NULL )); + + uint8_t rcode = pUsb->ctrlReq( bAddress, ep, /*bmREQ_HIDREPORT*/0x81, USB_REQUEST_GET_DESCRIPTOR, 0x00, + HID_DESCRIPTOR_REPORT, 0x0000, 0x4C1, constBufLen, buf, (USBReadParser*)parser ); + + //return ((rcode != hrSTALL) ? rcode : 0); + return rcode; +} +//uint8_t HID::getHidDescr( uint8_t ep, uint16_t nbytes, uint8_t* dataptr ) +//{ +// return( pUsb->ctrlReq( bAddress, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, HID_DESCRIPTOR_HID, 0x0000, nbytes, dataptr )); +//} +uint8_t HID::SetReport( uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t* dataptr ) +{ + return( pUsb->ctrlReq( bAddress, ep, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, report_id, report_type, iface, nbytes, nbytes, dataptr, NULL )); +} +uint8_t HID::GetReport( uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t* dataptr ) +{ + return( pUsb->ctrlReq( bAddress, ep, bmREQ_HIDIN, HID_REQUEST_GET_REPORT, report_id, report_type, iface, nbytes, nbytes, dataptr, NULL )); +} +uint8_t HID::GetIdle( uint8_t iface, uint8_t reportID, uint8_t* dataptr ) +{ + return( pUsb->ctrlReq( bAddress, 0, bmREQ_HIDIN, HID_REQUEST_GET_IDLE, reportID, 0, iface, 0x0001, 0x0001, dataptr, NULL )); +} +uint8_t HID::SetIdle( uint8_t iface, uint8_t reportID, uint8_t duration ) +{ + return( pUsb->ctrlReq( bAddress, 0, bmREQ_HIDOUT, HID_REQUEST_SET_IDLE, reportID, duration, iface, 0x0000, 0x0000, NULL, NULL )); +} +uint8_t HID::SetProtocol( uint8_t iface, uint8_t protocol ) +{ + return( pUsb->ctrlReq( bAddress, 0, bmREQ_HIDOUT, HID_REQUEST_SET_PROTOCOL, protocol, 0x00, iface, 0x0000, 0x0000, NULL, NULL )); +} +uint8_t HID::GetProtocol( uint8_t iface, uint8_t* dataptr ) +{ + return( pUsb->ctrlReq( bAddress, 0, bmREQ_HIDIN, HID_REQUEST_GET_PROTOCOL, 0x00, 0x00, iface, 0x0001, 0x0001, dataptr, NULL )); +} + +void HID::PrintEndpointDescriptor( const USB_ENDPOINT_DESCRIPTOR* ep_ptr ) +{ + Notify(PSTR("Endpoint descriptor:")); + Notify(PSTR("\r\nLength:\t\t")); + PrintHex(ep_ptr->bLength); + Notify(PSTR("\r\nType:\t\t")); + PrintHex(ep_ptr->bDescriptorType); + Notify(PSTR("\r\nAddress:\t")); + PrintHex(ep_ptr->bEndpointAddress); + Notify(PSTR("\r\nAttributes:\t")); + PrintHex(ep_ptr->bmAttributes); + Notify(PSTR("\r\nMaxPktSize:\t")); + PrintHex(ep_ptr->wMaxPacketSize); + Notify(PSTR("\r\nPoll Intrv:\t")); + PrintHex(ep_ptr->bInterval); +} + +void HID::PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc) +{ + Notify(PSTR("\r\n\r\nHID Descriptor:\r\n")); + Notify(PSTR("bDescLength:\t\t")); + PrintHex(pDesc->bLength); + + Notify(PSTR("\r\nbDescriptorType:\t")); + PrintHex(pDesc->bDescriptorType); + + Notify(PSTR("\r\nbcdHID:\t\t\t")); + PrintHex(pDesc->bcdHID); + + Notify(PSTR("\r\nbCountryCode:\t\t")); + PrintHex(pDesc->bCountryCode); + + Notify(PSTR("\r\nbNumDescriptors:\t")); + PrintHex(pDesc->bNumDescriptors); + + Notify(PSTR("\r\nbDescrType:\t\t")); + PrintHex(pDesc->bDescrType); + + Notify(PSTR("\r\nwDescriptorLength:\t")); + PrintHex(pDesc->wDescriptorLength); +} diff --git a/hid.h b/hid.h new file mode 100644 index 00000000..f32a13c7 --- /dev/null +++ b/hid.h @@ -0,0 +1,215 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#if !defined(__HID_H__) +#define __HID_H__ + +#include +#include +#include "avrpins.h" +#include "max3421e.h" +#include "usbhost.h" +#include "usb_ch9.h" +#include "Usb.h" +#include + +#include "printhex.h" +#include "hexdump.h" +#include "message.h" + +#include "confdescparser.h" +#include "hidusagestr.h" + +#define DATA_SIZE_MASK 0x03 +#define TYPE_MASK 0x0C +#define TAG_MASK 0xF0 + +#define DATA_SIZE_0 0x00 +#define DATA_SIZE_1 0x01 +#define DATA_SIZE_2 0x02 +#define DATA_SIZE_4 0x03 + +#define TYPE_MAIN 0x00 +#define TYPE_GLOBAL 0x04 +#define TYPE_LOCAL 0x08 + +#define TAG_MAIN_INPUT 0x80 +#define TAG_MAIN_OUTPUT 0x90 +#define TAG_MAIN_COLLECTION 0xA0 +#define TAG_MAIN_FEATURE 0xB0 +#define TAG_MAIN_ENDCOLLECTION 0xC0 + +#define TAG_GLOBAL_USAGEPAGE 0x00 +#define TAG_GLOBAL_LOGICALMIN 0x10 +#define TAG_GLOBAL_LOGICALMAX 0x20 +#define TAG_GLOBAL_PHYSMIN 0x30 +#define TAG_GLOBAL_PHYSMAX 0x40 +#define TAG_GLOBAL_UNITEXP 0x50 +#define TAG_GLOBAL_UNIT 0x60 +#define TAG_GLOBAL_REPORTSIZE 0x70 +#define TAG_GLOBAL_REPORTID 0x80 +#define TAG_GLOBAL_REPORTCOUNT 0x90 +#define TAG_GLOBAL_PUSH 0xA0 +#define TAG_GLOBAL_POP 0xB0 + +#define TAG_LOCAL_USAGE 0x00 +#define TAG_LOCAL_USAGEMIN 0x10 +#define TAG_LOCAL_USAGEMAX 0x20 + +/* HID requests */ +#define bmREQ_HIDOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE +#define bmREQ_HIDIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE +#define bmREQ_HIDREPORT USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_INTERFACE + +/* HID constants. Not part of chapter 9 */ +/* Class-Specific Requests */ +#define HID_REQUEST_GET_REPORT 0x01 +#define HID_REQUEST_GET_IDLE 0x02 +#define HID_REQUEST_GET_PROTOCOL 0x03 +#define HID_REQUEST_SET_REPORT 0x09 +#define HID_REQUEST_SET_IDLE 0x0A +#define HID_REQUEST_SET_PROTOCOL 0x0B + +/* Class Descriptor Types */ +#define HID_DESCRIPTOR_HID 0x21 +#define HID_DESCRIPTOR_REPORT 0x22 +#define HID_DESRIPTOR_PHY 0x23 + +/* Protocol Selection */ +#define HID_BOOT_PROTOCOL 0x00 +#define HID_RPT_PROTOCOL 0x01 + +/* HID Interface Class Code */ +#define HID_INTF 0x03 + +/* HID Interface Class SubClass Codes */ +#define HID_BOOT_INTF_SUBCLASS 0x01 + +/* HID Interface Class Protocol Codes */ +#define HID_PROTOCOL_NONE 0x00 +#define HID_PROTOCOL_KEYBOARD 0x01 +#define HID_PROTOCOL_MOUSE 0x02 + +///* HID descriptor */ +//typedef struct +//{ +// uint8_t bLength; +// uint8_t bDescriptorType; +// uint16_t bcdHID; // HID class specification release +// uint8_t bCountryCode; +// uint8_t bNumDescriptors; // Number of additional class specific descriptors +// uint8_t bDescrType; // Type of class descriptor +// uint16_t wDescriptorLength; // Total size of the Report descriptor +//} USB_HID_DESCRIPTOR; +// +//typedef struct +//{ +// uint8_t bDescrType; // Type of class descriptor +// uint16_t wDescriptorLength; // Total size of the Report descriptor +//} HID_CLASS_DESCRIPTOR_LEN_AND_TYPE; + +struct HidItemPrefix +{ + uint8_t bSize : 2; + uint8_t bType : 2; + uint8_t bTag : 4; +}; + +#define HID_ITEM_TYPE_MAIN 0 +#define HID_ITEM_TYPE_GLOBAL 1 +#define HID_ITEM_TYPE_LOCAL 2 +#define HID_ITEM_TYPE_RESERVED 3 + +#define HID_LONG_ITEM_PREFIX 0xfe // Long item prefix value + +#define bmHID_MAIN_ITEM_TAG 0xfc // Main item tag mask + +#define bmHID_MAIN_ITEM_INPUT 0x80 // Main item Input tag value +#define bmHID_MAIN_ITEM_OUTPUT 0x90 // Main item Output tag value +#define bmHID_MAIN_ITEM_FEATURE 0xb0 // Main item Feature tag value +#define bmHID_MAIN_ITEM_COLLECTION 0xa0 // Main item Collection tag value +#define bmHID_MAIN_ITEM_END_COLLECTION 0xce // Main item End Collection tag value + +#define HID_MAIN_ITEM_COLLECTION_PHYSICAL 0 +#define HID_MAIN_ITEM_COLLECTION_APPLICATION 1 +#define HID_MAIN_ITEM_COLLECTION_LOGICAL 2 +#define HID_MAIN_ITEM_COLLECTION_REPORT 3 +#define HID_MAIN_ITEM_COLLECTION_NAMED_ARRAY 4 +#define HID_MAIN_ITEM_COLLECTION_USAGE_SWITCH 5 +#define HID_MAIN_ITEM_COLLECTION_USAGE_MODIFIER 6 + +struct MainItemIOFeature +{ + uint8_t bmIsConstantOrData : 1; + uint8_t bmIsArrayOrVariable : 1; + uint8_t bmIsRelativeOrAbsolute : 1; + uint8_t bmIsWrapOrNoWrap : 1; + uint8_t bmIsNonLonearOrLinear : 1; + uint8_t bmIsNoPreferedOrPrefered : 1; + uint8_t bmIsNullOrNoNull : 1; + uint8_t bmIsVolatileOrNonVolatile : 1; +}; + +class HID; + +class HIDReportParser +{ +public: + virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) = 0; +}; + +#define MAX_REPORT_PARSERS 2 + +#define maxHidInterfaces 3 +#define maxEpPerInterface 2 +#define totalEndpoints (maxHidInterfaces * maxEpPerInterface + 1) + +#define HID_MAX_HID_CLASS_DESCRIPTORS 5 + +class HID : public USBDeviceConfig, public UsbConfigXtracter +{ +protected: + USB *pUsb; // USB class instance pointer + uint8_t bAddress; // address + +protected: + static const uint8_t epInterruptInIndex; // InterruptIN endpoint index + static const uint8_t epInterruptOutIndex; // InterruptOUT endpoint index + + void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr); + void PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc); + + virtual HIDReportParser* GetReportParser(uint8_t id); + +public: + HID(USB *pusb) : pUsb(pusb) {}; + + const USB* GetUsb() { return pUsb; }; + virtual bool SetReportParser(uint8_t id, HIDReportParser *prs); + + uint8_t SetProtocol( uint8_t iface, uint8_t protocol ); + uint8_t GetProtocol( uint8_t iface, uint8_t* dataptr ); + uint8_t GetIdle( uint8_t iface, uint8_t reportID, uint8_t* dataptr ); + uint8_t SetIdle( uint8_t iface, uint8_t reportID, uint8_t duration ); + + uint8_t GetReportDescr( uint8_t ep, USBReadParser *parser = NULL); + + uint8_t GetHidDescr( uint8_t ep, uint16_t nbytes, uint8_t* dataptr ); + uint8_t GetReport( uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t* dataptr ); + uint8_t SetReport( uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t* dataptr ); +}; + +#endif // __HID_H__ \ No newline at end of file diff --git a/hidboot.cpp b/hidboot.cpp new file mode 100644 index 00000000..2458401a --- /dev/null +++ b/hidboot.cpp @@ -0,0 +1,154 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#include "hidboot.h" + +void MouseReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) +{ + MOUSEINFO *pmi = (MOUSEINFO*)buf; + + if (prevState.mouseInfo.bmLeftButton == 0 && pmi->bmLeftButton == 1) + OnLeftButtonDown(pmi); + + if (prevState.mouseInfo.bmLeftButton == 1 && pmi->bmLeftButton == 0) + OnLeftButtonUp(pmi); + + if (prevState.mouseInfo.bmRightButton == 0 && pmi->bmRightButton == 1) + OnRightButtonDown(pmi); + + if (prevState.mouseInfo.bmRightButton == 1 && pmi->bmRightButton == 0) + OnRightButtonUp(pmi); + + if (prevState.mouseInfo.bmMiddleButton == 0 && pmi->bmMiddleButton == 1) + OnMiddleButtonDown(pmi); + + if (prevState.mouseInfo.bmMiddleButton == 1 && pmi->bmMiddleButton == 0) + OnMiddleButtonUp(pmi); + + if (prevState.mouseInfo.dX != pmi->dX || prevState.mouseInfo.dY != pmi->dY) + OnMouseMove(pmi); + + for (uint8_t i=0; i<3; i++) + prevState.bInfo[i] = buf[i]; +}; + +void KeyboardReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) +{ + // On error - return + if (buf[2] == 1) + return; + + KBDINFO *pki = (KBDINFO*)buf; + + for (uint8_t i=2; i<8; i++) + { + bool down = false; + bool up = false; + + for (uint8_t j=2; j<8; j++) + { + if (buf[i] == prevState.bInfo[j] && buf[i] != 1) + down = true; + if (buf[j] == prevState.bInfo[i] && prevState.bInfo[i] != 1) + up = true; + } + if (!down) + { + HandleLockingKeys(hid, buf[i]); + OnKeyDown(*buf, buf[i]); + } + if (!up) + OnKeyUp(prevState.bInfo[0], prevState.bInfo[i]); + } + for (uint8_t i=0; i<8; i++) + prevState.bInfo[i] = buf[i]; +}; + +uint8_t KeyboardReportParser::HandleLockingKeys(HID *hid, uint8_t key) +{ + uint8_t old_keys = kbdLockingKeys.bLeds; + + switch (key) + { + case KEY_NUM_LOCK: + kbdLockingKeys.kbdLeds.bmNumLock = ~kbdLockingKeys.kbdLeds.bmNumLock; + break; + case KEY_CAPS_LOCK: + kbdLockingKeys.kbdLeds.bmCapsLock = ~kbdLockingKeys.kbdLeds.bmCapsLock; + break; + case KEY_SCROLL_LOCK: + kbdLockingKeys.kbdLeds.bmScrollLock = ~kbdLockingKeys.kbdLeds.bmScrollLock; + break; + } + + if (old_keys != kbdLockingKeys.bLeds && hid) + return (hid->SetReport(0, 0/*hid->GetIface()*/, 2, 0, 1, &kbdLockingKeys.bLeds)); + + return 0; +} + +const uint8_t KeyboardReportParser::numKeys[] PROGMEM = { '!', '@', '#', '$', '%', '^', '&', '*', '(', ')' }; +const uint8_t KeyboardReportParser::symKeysUp[] PROGMEM = { '_', '+', '{', '}', '|', '~', ':', '"', '~', '<', '>', '?' }; +const uint8_t KeyboardReportParser::symKeysLo[] PROGMEM = { '-', '=', '[', ']', '\\', ' ', ';', '\'', '`', ',', '.', '/' }; +const uint8_t KeyboardReportParser::padKeys[] PROGMEM = { '/', '*', '-', '+', 0x13 }; + +uint8_t KeyboardReportParser::OemToAscii(uint8_t mod, uint8_t key) +{ + uint8_t shift = (mod & 0x22); + + // [a-z] + if (key > 0x03 && key < 0x1e) + { + // Upper case letters + if ( (kbdLockingKeys.kbdLeds.bmCapsLock == 0 && (mod & 2)) || + (kbdLockingKeys.kbdLeds.bmCapsLock == 1 && (mod & 2) == 0) ) + return (key - 4 + 'A'); + + // Lower case letters + else + return (key - 4 + 'a'); + } + // Numbers + else if (key > 0x1d && key < 0x27) + { + if (shift) + return ((uint8_t)pgm_read_byte(&numKeys[key - 0x1e])); + else + return (key - 0x1e + '1'); + } + // Keypad Numbers + else if (key > 0x58 && key < 0x62) + { + if (kbdLockingKeys.kbdLeds.bmNumLock == 1) + return (key - 0x59 + '1'); + } + else if (key > 0x2c && key < 0x39) + return ((shift) ? (uint8_t)pgm_read_byte(&symKeysUp[key-0x2d]) : (uint8_t)pgm_read_byte(&symKeysLo[key-0x2d])); + else if (key > 0x53 && key < 0x59) + return (uint8_t)pgm_read_byte(&padKeys[key - 0x54]); + else + { + switch (key) + { + case KEY_SPACE: return(0x20); + case KEY_ENTER: return(0x13); + case KEY_ZERO: return((shift) ? ')' : '0'); + case KEY_ZERO2: return((kbdLockingKeys.kbdLeds.bmNumLock == 1) ? '0' : 0); + case KEY_PERIOD: return((kbdLockingKeys.kbdLeds.bmNumLock == 1) ? '.' : 0); + } + } + return( 0 ); +} diff --git a/hidboot.h b/hidboot.h new file mode 100644 index 00000000..ba6f3d21 --- /dev/null +++ b/hidboot.h @@ -0,0 +1,493 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#if !defined(__HIDBOOT_H__) +#define __HIDBOOT_H__ + +#include +#include +#include "avrpins.h" +#include "max3421e.h" +#include "usbhost.h" +#include "usb_ch9.h" +#include "Usb.h" +#include "hid.h" +#include + +#include "printhex.h" +#include "hexdump.h" +#include "message.h" + +#include "confdescparser.h" + +#define KEY_SPACE 0x2c +#define KEY_ZERO 0x27 +#define KEY_ZERO2 0x62 +#define KEY_ENTER 0x28 +#define KEY_PERIOD 0x63 + +struct MOUSEINFO +{ + struct + { + uint8_t bmLeftButton : 1; + uint8_t bmRightButton : 1; + uint8_t bmMiddleButton : 1; + uint8_t bmDummy : 1; + }; + int8_t dX; + int8_t dY; +}; + +class MouseReportParser : public HIDReportParser +{ + union + { + MOUSEINFO mouseInfo; + uint8_t bInfo[3]; + } prevState; + +public: + virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); + +protected: + virtual void OnMouseMove (MOUSEINFO *mi) {}; + virtual void OnLeftButtonUp (MOUSEINFO *mi) {}; + virtual void OnLeftButtonDown (MOUSEINFO *mi) {}; + virtual void OnRightButtonUp (MOUSEINFO *mi) {}; + virtual void OnRightButtonDown (MOUSEINFO *mi) {}; + virtual void OnMiddleButtonUp (MOUSEINFO *mi) {}; + virtual void OnMiddleButtonDown (MOUSEINFO *mi) {}; +}; + +struct MODIFIERKEYS +{ + uint8_t bmLeftCtrl : 1; + uint8_t bmLeftShift : 1; + uint8_t bmLeftAlt : 1; + uint8_t bmLeftGUI : 1; + uint8_t bmRightCtrl : 1; + uint8_t bmRightShift : 1; + uint8_t bmRightAlt : 1; + uint8_t bmRightGUI : 1; +}; + +struct KBDINFO +{ + struct + { + uint8_t bmLeftCtrl : 1; + uint8_t bmLeftShift : 1; + uint8_t bmLeftAlt : 1; + uint8_t bmLeftGUI : 1; + uint8_t bmRightCtrl : 1; + uint8_t bmRightShift : 1; + uint8_t bmRightAlt : 1; + uint8_t bmRightGUI : 1; + }; + uint8_t bReserved; + uint8_t Keys[6]; +}; + +struct KBDLEDS +{ + uint8_t bmNumLock : 1; + uint8_t bmCapsLock : 1; + uint8_t bmScrollLock : 1; + uint8_t bmCompose : 1; + uint8_t bmKana : 1; + uint8_t bmReserved : 3; +}; + +#define KEY_NUM_LOCK 0x53 +#define KEY_CAPS_LOCK 0x39 +#define KEY_SCROLL_LOCK 0x47 + +class KeyboardReportParser : public HIDReportParser +{ + static const uint8_t numKeys[]; + static const uint8_t symKeysUp[]; + static const uint8_t symKeysLo[]; + static const uint8_t padKeys[]; + +protected: + union + { + KBDINFO kbdInfo; + uint8_t bInfo[sizeof(KBDINFO)]; + } prevState; + + union + { + KBDLEDS kbdLeds; + uint8_t bLeds; + } kbdLockingKeys; + + uint8_t OemToAscii(uint8_t mod, uint8_t key); + +public: + KeyboardReportParser() { kbdLockingKeys.bLeds = 0; }; + + virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); + +protected: + uint8_t HandleLockingKeys(HID* hid, uint8_t key); + + virtual void OnKeyDown (uint8_t mod, uint8_t key) {}; + virtual void OnKeyUp (uint8_t mod, uint8_t key) {}; +}; + +#define totalEndpoints 2 + +#define HID_MAX_HID_CLASS_DESCRIPTORS 5 + +template +class HIDBoot : public HID //public USBDeviceConfig, public UsbConfigXtracter +{ + EpInfo epInfo[totalEndpoints]; + + HIDReportParser *pRptParser; + + uint8_t bConfNum; // configuration number + uint8_t bIfaceNum; // Interface Number + uint8_t bNumIface; // number of interfaces in the configuration + uint8_t bNumEP; // total number of EP in the configuration + uint32_t qNextPollTime; // next poll time + bool bPollEnable; // poll enable flag + + void Initialize(); + + virtual HIDReportParser* GetReportParser(uint8_t id) { return pRptParser; }; + +public: + HIDBoot(USB *p); + + virtual bool SetReportParser(uint8_t id, HIDReportParser *prs) { pRptParser = prs; }; + + // USBDeviceConfig implementation + virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed); + virtual uint8_t Release(); + virtual uint8_t Poll(); + virtual uint8_t GetAddress() { return bAddress; }; + + // UsbConfigXtracter implementation + virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep); +}; + +template +HIDBoot::HIDBoot(USB *p) : + HID(p), + qNextPollTime(0), + bPollEnable(false), + pRptParser(NULL) +{ + Initialize(); + + if (pUsb) + pUsb->RegisterDeviceClass(this); +} + +template +void HIDBoot::Initialize() +{ + for(uint8_t i=0; i +uint8_t HIDBoot::Init(uint8_t parent, uint8_t port, bool lowspeed) +{ + const uint8_t constBufSize = sizeof(USB_DEVICE_DESCRIPTOR); + + uint8_t buf[constBufSize]; + uint8_t rcode; + UsbDevice *p = NULL; + EpInfo *oldep_ptr = NULL; + uint8_t len = 0; + uint16_t cd_len = 0; + + uint8_t num_of_conf; // number of configurations + uint8_t num_of_intf; // number of interfaces + + AddressPool &addrPool = pUsb->GetAddressPool(); + + USBTRACE("BM Init\r\n"); + + if (bAddress) + return USB_ERROR_CLASS_INSTANCE_ALREADY_IN_USE; + + // Get pointer to pseudo device with address 0 assigned + p = addrPool.GetUsbDevicePtr(0); + + if (!p) + return USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL; + + if (!p->epinfo) + { + USBTRACE("epinfo\r\n"); + return USB_ERROR_EPINFO_IS_NULL; + } + + // Save old pointer to EP_RECORD of address 0 + oldep_ptr = p->epinfo; + + // Temporary assign new pointer to epInfo to p->epinfo in order to avoid toggle inconsistence + p->epinfo = epInfo; + + p->lowspeed = lowspeed; + + // Get device descriptor + rcode = pUsb->getDevDescr( 0, 0, 8, (uint8_t*)buf ); + + if (!rcode) + len = (buf[0] > constBufSize) ? constBufSize : buf[0]; + + if( rcode ) + { + // Restore p->epinfo + p->epinfo = oldep_ptr; + + goto FailGetDevDescr; + } + + // Restore p->epinfo + p->epinfo = oldep_ptr; + + // Allocate new address according to device class + bAddress = addrPool.AllocAddress(parent, false, port); + + if (!bAddress) + return USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL; + + // Extract Max Packet Size from the device descriptor + epInfo[0].maxPktSize = (uint8_t)((USB_DEVICE_DESCRIPTOR*)buf)->bMaxPacketSize0; + + // Assign new address to the device + rcode = pUsb->setAddr( 0, 0, bAddress ); + + if (rcode) + { + p->lowspeed = false; + addrPool.FreeAddress(bAddress); + bAddress = 0; + USBTRACE2("setAddr:",rcode); + return rcode; + } + + USBTRACE2("Addr:", bAddress); + + p->lowspeed = false; + + p = addrPool.GetUsbDevicePtr(bAddress); + + if (!p) + return USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL; + + p->lowspeed = lowspeed; + + if (len) + rcode = pUsb->getDevDescr( bAddress, 0, len, (uint8_t*)buf ); + + if(rcode) + goto FailGetDevDescr; + + num_of_conf = ((USB_DEVICE_DESCRIPTOR*)buf)->bNumConfigurations; + + // Assign epInfo to epinfo pointer + rcode = pUsb->setEpInfoEntry(bAddress, 1, epInfo); + + if (rcode) + goto FailSetDevTblEntry; + + USBTRACE2("NC:", num_of_conf); + + for (uint8_t i=0; i HexDump; + ConfigDescParser< + USB_CLASS_HID, + HID_BOOT_INTF_SUBCLASS, + BOOT_PROTOCOL, + CP_MASK_COMPARE_ALL> confDescrParser(this); + + rcode = pUsb->getConfDescr(bAddress, 0, i, &HexDump); + rcode = pUsb->getConfDescr(bAddress, 0, i, &confDescrParser); + + if (bNumEP > 1) + break; + } // for + + if (bNumEP < 2) + return USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED; + + USBTRACE2("\r\nbAddr:", bAddress); + USBTRACE2("\r\nbNumEP:", bNumEP); + + // Assign epInfo to epinfo pointer + rcode = pUsb->setEpInfoEntry(bAddress, bNumEP, epInfo); + + USBTRACE2("\r\nCnf:", bConfNum); + + // Set Configuration Value + rcode = pUsb->setConf(bAddress, 0, bConfNum); + + if (rcode) + goto FailSetConfDescr; + + USBTRACE2("\r\nIf:", bIfaceNum); + + rcode = SetProtocol(bIfaceNum, HID_BOOT_PROTOCOL); + + if (rcode) + goto FailSetProtocol; + + if (BOOT_PROTOCOL == 1) + { + rcode = SetIdle(bIfaceNum, 0, 0); + + if (rcode) + goto FailSetIdle; + } + USBTRACE("BM configured\r\n"); + + bPollEnable = true; + return 0; + +FailGetDevDescr: + USBTRACE("getDevDescr:"); + goto Fail; + +FailSetDevTblEntry: + USBTRACE("setDevTblEn:"); + goto Fail; + +FailGetConfDescr: + USBTRACE("getConf:"); + goto Fail; + +FailSetProtocol: + USBTRACE("SetProto:"); + goto Fail; + +FailSetIdle: + USBTRACE("SetIdle:"); + goto Fail; + +FailSetConfDescr: + USBTRACE("setConf:"); + goto Fail; + +Fail: + Serial.println(rcode, HEX); + Release(); + return rcode; +} + +template +void HIDBoot::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *pep) +{ + // If the first configuration satisfies, the others are not concidered. + if (bNumEP > 1 && conf != bConfNum) + return; + + ErrorMessage(PSTR("\r\nConf.Val"), conf); + ErrorMessage(PSTR("Iface Num"), iface); + ErrorMessage(PSTR("Alt.Set"), alt); + + bConfNum = conf; + bIfaceNum = iface; + + uint8_t index; + + if ((pep->bmAttributes & 0x03) == 3 && (pep->bEndpointAddress & 0x80) == 0x80) + { + USBTRACE("I8\r\n"); + index = epInterruptInIndex; + + // Fill in the endpoint info structure + epInfo[index].epAddr = (pep->bEndpointAddress & 0x0F); + epInfo[index].maxPktSize = (uint8_t)pep->wMaxPacketSize; + epInfo[index].epAttribs = 0; + + bNumEP ++; + + PrintEndpointDescriptor(pep); + } +} + + +template +uint8_t HIDBoot::Release() +{ + pUsb->GetAddressPool().FreeAddress(bAddress); + + bConfNum = 0; + bIfaceNum = 0; + bNumEP = 1; + bAddress = 0; + qNextPollTime = 0; + bPollEnable = false; + return 0; +} + +template +uint8_t HIDBoot::Poll() +{ + uint8_t rcode = 0; + + if (!bPollEnable) + return 0; + + if (qNextPollTime <= millis()) + { + qNextPollTime = millis() + 50; + + const uint8_t const_buff_len = 16; + uint8_t buf[const_buff_len]; + + uint16_t read = (uint16_t)epInfo[epInterruptInIndex].maxPktSize; + + uint8_t rcode = pUsb->inTransfer(bAddress, epInfo[epInterruptInIndex].epAddr, &read, buf); + + if (rcode) + { + if (rcode != hrNAK) + USBTRACE2("Poll:", rcode); + return rcode; + } + for (uint8_t i=0; i(buf[i]); + if (read) + Serial.println(""); + + if (pRptParser) + pRptParser->Parse((HID*)this, 0, (uint8_t)read, buf); + } + return rcode; +} + + +#endif // __HIDBOOTMOUSE_H__ \ No newline at end of file diff --git a/hidescriptorparser.cpp b/hidescriptorparser.cpp new file mode 100644 index 00000000..92355fbe --- /dev/null +++ b/hidescriptorparser.cpp @@ -0,0 +1,1768 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#include "hidescriptorparser.h" +//#include "hidusagetitlearrays.cpp" + +const char *ReportDescParserBase::usagePageTitles0[] PROGMEM = +{ + pstrUsagePageGenericDesktopControls , + pstrUsagePageSimulationControls , + pstrUsagePageVRControls , + pstrUsagePageSportControls , + pstrUsagePageGameControls , + pstrUsagePageGenericDeviceControls , + pstrUsagePageKeyboardKeypad , + pstrUsagePageLEDs , + pstrUsagePageButton , + pstrUsagePageOrdinal , + pstrUsagePageTelephone , + pstrUsagePageConsumer , + pstrUsagePageDigitizer , + pstrUsagePagePID , + pstrUsagePageUnicode +}; + +const char *ReportDescParserBase::usagePageTitles1[] PROGMEM = +{ + pstrUsagePageBarCodeScanner , + pstrUsagePageScale , + pstrUsagePageMSRDevices , + pstrUsagePagePointOfSale , + pstrUsagePageCameraControl , + pstrUsagePageArcade +}; +const char *ReportDescParserBase::genDesktopTitles0[] PROGMEM = +{ + pstrUsagePointer , + pstrUsageMouse , + pstrUsageJoystick , + pstrUsageGamePad , + pstrUsageKeyboard , + pstrUsageKeypad , + pstrUsageMultiAxisController , + pstrUsageTabletPCSystemControls + +}; +const char *ReportDescParserBase::genDesktopTitles1[] PROGMEM = +{ + pstrUsageX , + pstrUsageY , + pstrUsageZ , + pstrUsageRx , + pstrUsageRy , + pstrUsageRz , + pstrUsageSlider , + pstrUsageDial , + pstrUsageWheel , + pstrUsageHatSwitch , + pstrUsageCountedBuffer , + pstrUsageByteCount , + pstrUsageMotionWakeup , + pstrUsageStart , + pstrUsageSelect , + pstrUsagePageReserved , + pstrUsageVx , + pstrUsageVy , + pstrUsageVz , + pstrUsageVbrx , + pstrUsageVbry , + pstrUsageVbrz , + pstrUsageVno , + pstrUsageFeatureNotification , + pstrUsageResolutionMultiplier +}; +const char *ReportDescParserBase::genDesktopTitles2[] PROGMEM = +{ + pstrUsageSystemControl , + pstrUsageSystemPowerDown , + pstrUsageSystemSleep , + pstrUsageSystemWakeup , + pstrUsageSystemContextMenu , + pstrUsageSystemMainMenu , + pstrUsageSystemAppMenu , + pstrUsageSystemMenuHelp , + pstrUsageSystemMenuExit , + pstrUsageSystemMenuSelect , + pstrUsageSystemMenuRight , + pstrUsageSystemMenuLeft , + pstrUsageSystemMenuUp , + pstrUsageSystemMenuDown , + pstrUsageSystemColdRestart , + pstrUsageSystemWarmRestart , + pstrUsageDPadUp , + pstrUsageDPadDown , + pstrUsageDPadRight , + pstrUsageDPadLeft +}; +const char *ReportDescParserBase::genDesktopTitles3[] PROGMEM = +{ + pstrUsageSystemDock , + pstrUsageSystemUndock , + pstrUsageSystemSetup , + pstrUsageSystemBreak , + pstrUsageSystemDebuggerBreak , + pstrUsageApplicationBreak , + pstrUsageApplicationDebuggerBreak, + pstrUsageSystemSpeakerMute , + pstrUsageSystemHibernate +}; +const char *ReportDescParserBase::genDesktopTitles4[] PROGMEM = +{ + pstrUsageSystemDisplayInvert , + pstrUsageSystemDisplayInternal , + pstrUsageSystemDisplayExternal , + pstrUsageSystemDisplayBoth , + pstrUsageSystemDisplayDual , + pstrUsageSystemDisplayToggleIntExt , + pstrUsageSystemDisplaySwapPriSec , + pstrUsageSystemDisplayLCDAutoscale +}; +const char *ReportDescParserBase::simuTitles0[] PROGMEM = +{ + pstrUsageFlightSimulationDevice , + pstrUsageAutomobileSimulationDevice , + pstrUsageTankSimulationDevice , + pstrUsageSpaceshipSimulationDevice , + pstrUsageSubmarineSimulationDevice , + pstrUsageSailingSimulationDevice , + pstrUsageMotocicleSimulationDevice , + pstrUsageSportsSimulationDevice , + pstrUsageAirplaneSimulationDevice , + pstrUsageHelicopterSimulationDevice , + pstrUsageMagicCarpetSimulationDevice, + pstrUsageBicycleSimulationDevice +}; +const char *ReportDescParserBase::simuTitles1[] PROGMEM = +{ + pstrUsageFlightControlStick , + pstrUsageFlightStick , + pstrUsageCyclicControl , + pstrUsageCyclicTrim , + pstrUsageFlightYoke , + pstrUsageTrackControl +}; +const char *ReportDescParserBase::simuTitles2[] PROGMEM = +{ + pstrUsageAileron , + pstrUsageAileronTrim , + pstrUsageAntiTorqueControl , + pstrUsageAutopilotEnable , + pstrUsageChaffRelease , + pstrUsageCollectiveControl , + pstrUsageDiveBrake , + pstrUsageElectronicCountermeasures , + pstrUsageElevator , + pstrUsageElevatorTrim , + pstrUsageRudder , + pstrUsageThrottle , + pstrUsageFlightCommunications , + pstrUsageFlareRelease , + pstrUsageLandingGear , + pstrUsageToeBrake , + pstrUsageTrigger , + pstrUsageWeaponsArm , + pstrUsageWeaponsSelect , + pstrUsageWingFlaps , + pstrUsageAccelerator , + pstrUsageBrake , + pstrUsageClutch , + pstrUsageShifter , + pstrUsageSteering , + pstrUsageTurretDirection , + pstrUsageBarrelElevation , + pstrUsageDivePlane , + pstrUsageBallast , + pstrUsageBicycleCrank , + pstrUsageHandleBars , + pstrUsageFrontBrake , + pstrUsageRearBrake +}; +const char *ReportDescParserBase::vrTitles0[] PROGMEM = +{ + pstrUsageBelt , + pstrUsageBodySuit , + pstrUsageFlexor , + pstrUsageGlove , + pstrUsageHeadTracker , + pstrUsageHeadMountedDisplay , + pstrUsageHandTracker , + pstrUsageOculometer , + pstrUsageVest , + pstrUsageAnimatronicDevice +}; +const char *ReportDescParserBase::vrTitles1[] PROGMEM = +{ + pstrUsageStereoEnable , + pstrUsageDisplayEnable +}; +const char *ReportDescParserBase::sportsCtrlTitles0[] PROGMEM = +{ + pstrUsageBaseballBat , + pstrUsageGolfClub , + pstrUsageRowingMachine , + pstrUsageTreadmill +}; +const char *ReportDescParserBase::sportsCtrlTitles1[] PROGMEM = +{ + pstrUsageOar , + pstrUsageSlope , + pstrUsageRate , + pstrUsageStickSpeed , + pstrUsageStickFaceAngle , + pstrUsageStickHeelToe , + pstrUsageStickFollowThough , + pstrUsageStickTempo , + pstrUsageStickType , + pstrUsageStickHeight +}; +const char *ReportDescParserBase::sportsCtrlTitles2[] PROGMEM = +{ + pstrUsagePutter , + pstrUsage1Iron , + pstrUsage2Iron , + pstrUsage3Iron , + pstrUsage4Iron , + pstrUsage5Iron , + pstrUsage6Iron , + pstrUsage7Iron , + pstrUsage8Iron , + pstrUsage9Iron , + pstrUsage10Iron , + pstrUsage11Iron , + pstrUsageSandWedge , + pstrUsageLoftWedge , + pstrUsagePowerWedge , + pstrUsage1Wood , + pstrUsage3Wood , + pstrUsage5Wood , + pstrUsage7Wood , + pstrUsage9Wood +}; +const char *ReportDescParserBase::gameTitles0[] PROGMEM = +{ + pstrUsage3DGameController , + pstrUsagePinballDevice , + pstrUsageGunDevice +}; +const char *ReportDescParserBase::gameTitles1[] PROGMEM = +{ + pstrUsagePointOfView , + pstrUsageTurnRightLeft , + pstrUsagePitchForwardBackward , + pstrUsageRollRightLeft , + pstrUsageMoveRightLeft , + pstrUsageMoveForwardBackward , + pstrUsageMoveUpDown , + pstrUsageLeanRightLeft , + pstrUsageLeanForwardBackward , + pstrUsageHeightOfPOV , + pstrUsageFlipper , + pstrUsageSecondaryFlipper , + pstrUsageBump , + pstrUsageNewGame , + pstrUsageShootBall , + pstrUsagePlayer , + pstrUsageGunBolt , + pstrUsageGunClip , + pstrUsageGunSelector , + pstrUsageGunSingleShot , + pstrUsageGunBurst , + pstrUsageGunAutomatic , + pstrUsageGunSafety , + pstrUsageGamepadFireJump , + pstrUsageGamepadTrigger +}; +const char *ReportDescParserBase::genDevCtrlTitles[] PROGMEM = +{ + pstrUsageBatteryStrength, + pstrUsageWirelessChannel, + pstrUsageWirelessID, + pstrUsageDiscoverWirelessControl, + pstrUsageSecurityCodeCharEntered, + pstrUsageSecurityCodeCharErased, + pstrUsageSecurityCodeCleared +}; +const char *ReportDescParserBase::ledTitles[] PROGMEM = +{ + pstrUsageNumLock , + pstrUsageCapsLock , + pstrUsageScrollLock , + pstrUsageCompose , + pstrUsageKana , + pstrUsagePower , + pstrUsageShift , + pstrUsageDoNotDisturb , + pstrUsageMute , + pstrUsageToneEnable , + pstrUsageHighCutFilter , + pstrUsageLowCutFilter , + pstrUsageEqualizerEnable , + pstrUsageSoundFieldOn , + pstrUsageSurroundOn , + pstrUsageRepeat , + pstrUsageStereo , + pstrUsageSamplingRateDetect , + pstrUsageSpinning , + pstrUsageCAV , + pstrUsageCLV , + pstrUsageRecordingFormatDetect , + pstrUsageOffHook , + pstrUsageRing , + pstrUsageMessageWaiting , + pstrUsageDataMode , + pstrUsageBatteryOperation , + pstrUsageBatteryOK , + pstrUsageBatteryLow , + pstrUsageSpeaker , + pstrUsageHeadSet , + pstrUsageHold , + pstrUsageMicrophone , + pstrUsageCoverage , + pstrUsageNightMode , + pstrUsageSendCalls , + pstrUsageCallPickup , + pstrUsageConference , + pstrUsageStandBy , + pstrUsageCameraOn , + pstrUsageCameraOff , + pstrUsageOnLine , + pstrUsageOffLine , + pstrUsageBusy , + pstrUsageReady , + pstrUsagePaperOut , + pstrUsagePaperJam , + pstrUsageRemote , + pstrUsageForward , + pstrUsageReverse , + pstrUsageStop , + pstrUsageRewind , + pstrUsageFastForward , + pstrUsagePlay , + pstrUsagePause , + pstrUsageRecord , + pstrUsageError , + pstrUsageSelectedIndicator , + pstrUsageInUseIndicator , + pstrUsageMultiModeIndicator , + pstrUsageIndicatorOn , + pstrUsageIndicatorFlash , + pstrUsageIndicatorSlowBlink , + pstrUsageIndicatorFastBlink , + pstrUsageIndicatorOff , + pstrUsageFlashOnTime , + pstrUsageSlowBlinkOnTime , + pstrUsageSlowBlinkOffTime , + pstrUsageFastBlinkOnTime , + pstrUsageFastBlinkOffTime , + pstrUsageIndicatorColor , + pstrUsageIndicatorRed , + pstrUsageIndicatorGreen , + pstrUsageIndicatorAmber , + pstrUsageGenericIndicator , + pstrUsageSystemSuspend , + pstrUsageExternalPowerConnected +}; +const char *ReportDescParserBase::telTitles0 [] PROGMEM = +{ + pstrUsagePhone , + pstrUsageAnsweringMachine , + pstrUsageMessageControls , + pstrUsageHandset , + pstrUsageHeadset , + pstrUsageTelephonyKeyPad , + pstrUsageProgrammableButton +}; +const char *ReportDescParserBase::telTitles1 [] PROGMEM = +{ + pstrUsageHookSwitch , + pstrUsageFlash , + pstrUsageFeature , + pstrUsageHold , + pstrUsageRedial , + pstrUsageTransfer , + pstrUsageDrop , + pstrUsagePark , + pstrUsageForwardCalls , + pstrUsageAlternateFunction , + pstrUsageLine , + pstrUsageSpeakerPhone , + pstrUsageConference , + pstrUsageRingEnable , + pstrUsageRingSelect , + pstrUsagePhoneMute , + pstrUsageCallerID , + pstrUsageSend +}; +const char *ReportDescParserBase::telTitles2 [] PROGMEM = +{ + pstrUsageSpeedDial , + pstrUsageStoreNumber , + pstrUsageRecallNumber , + pstrUsagePhoneDirectory +}; +const char *ReportDescParserBase::telTitles3 [] PROGMEM = +{ + pstrUsageVoiceMail , + pstrUsageScreenCalls , + pstrUsageDoNotDisturb , + pstrUsageMessage , + pstrUsageAnswerOnOff +}; +const char *ReportDescParserBase::telTitles4 [] PROGMEM = +{ + pstrUsageInsideDialTone , + pstrUsageOutsideDialTone , + pstrUsageInsideRingTone , + pstrUsageOutsideRingTone , + pstrUsagePriorityRingTone , + pstrUsageInsideRingback , + pstrUsagePriorityRingback , + pstrUsageLineBusyTone , + pstrUsageReorderTone , + pstrUsageCallWaitingTone , + pstrUsageConfirmationTone1 , + pstrUsageConfirmationTone2 , + pstrUsageTonesOff , + pstrUsageOutsideRingback , + pstrUsageRinger +}; +const char *ReportDescParserBase::telTitles5 [] PROGMEM = +{ + pstrUsagePhoneKey0 , + pstrUsagePhoneKey1 , + pstrUsagePhoneKey2 , + pstrUsagePhoneKey3 , + pstrUsagePhoneKey4 , + pstrUsagePhoneKey5 , + pstrUsagePhoneKey6 , + pstrUsagePhoneKey7 , + pstrUsagePhoneKey8 , + pstrUsagePhoneKey9 , + pstrUsagePhoneKeyStar , + pstrUsagePhoneKeyPound , + pstrUsagePhoneKeyA , + pstrUsagePhoneKeyB , + pstrUsagePhoneKeyC , + pstrUsagePhoneKeyD +}; +const char *ReportDescParserBase::consTitles0[] PROGMEM = +{ + pstrUsageConsumerControl, + pstrUsageNumericKeyPad, + pstrUsageProgrammableButton, + pstrUsageMicrophone, + pstrUsageHeadphone, + pstrUsageGraphicEqualizer +}; +const char *ReportDescParserBase::consTitles1[] PROGMEM = +{ + pstrUsagePlus10 , + pstrUsagePlus100, + pstrUsageAMPM +}; +const char *ReportDescParserBase::consTitles2[] PROGMEM = +{ + pstrUsagePower , + pstrUsageReset , + pstrUsageSleep , + pstrUsageSleepAfter , + pstrUsageSleepMode , + pstrUsageIllumination , + pstrUsageFunctionButtons + +}; +const char *ReportDescParserBase::consTitles3[] PROGMEM = +{ + pstrUsageMenu , + pstrUsageMenuPick , + pstrUsageMenuUp , + pstrUsageMenuDown , + pstrUsageMenuLeft , + pstrUsageMenuRight , + pstrUsageMenuEscape , + pstrUsageMenuValueIncrease, + pstrUsageMenuValueDecrease +}; +const char *ReportDescParserBase::consTitles4[] PROGMEM = +{ + pstrUsageDataOnScreen , + pstrUsageClosedCaption , + pstrUsageClosedCaptionSelect, + pstrUsageVCRTV , + pstrUsageBroadcastMode , + pstrUsageSnapshot , + pstrUsageStill +}; +const char *ReportDescParserBase::consTitles5[] PROGMEM = +{ + pstrUsageSelection , + pstrUsageAssignSelection , + pstrUsageModeStep , + pstrUsageRecallLast , + pstrUsageEnterChannel , + pstrUsageOrderMovie , + pstrUsageChannel , + pstrUsageMediaSelection , + pstrUsageMediaSelectComputer , + pstrUsageMediaSelectTV , + pstrUsageMediaSelectWWW , + pstrUsageMediaSelectDVD , + pstrUsageMediaSelectTelephone , + pstrUsageMediaSelectProgramGuide , + pstrUsageMediaSelectVideoPhone , + pstrUsageMediaSelectGames , + pstrUsageMediaSelectMessages , + pstrUsageMediaSelectCD , + pstrUsageMediaSelectVCR , + pstrUsageMediaSelectTuner , + pstrUsageQuit , + pstrUsageHelp , + pstrUsageMediaSelectTape , + pstrUsageMediaSelectCable , + pstrUsageMediaSelectSatellite , + pstrUsageMediaSelectSecurity , + pstrUsageMediaSelectHome , + pstrUsageMediaSelectCall , + pstrUsageChannelIncrement , + pstrUsageChannelDecrement , + pstrUsageMediaSelectSAP , + pstrUsagePageReserved , + pstrUsageVCRPlus , + pstrUsageOnce , + pstrUsageDaily , + pstrUsageWeekly , + pstrUsageMonthly +}; +const char *ReportDescParserBase::consTitles6[] PROGMEM = +{ + pstrUsagePlay , + pstrUsagePause , + pstrUsageRecord , + pstrUsageFastForward , + pstrUsageRewind , + pstrUsageScanNextTrack , + pstrUsageScanPreviousTrack , + pstrUsageStop , + pstrUsageEject , + pstrUsageRandomPlay , + pstrUsageSelectDisk , + pstrUsageEnterDisk , + pstrUsageRepeat , + pstrUsageTracking , + pstrUsageTrackNormal , + pstrUsageSlowTracking , + pstrUsageFrameForward , + pstrUsageFrameBackwards , + pstrUsageMark , + pstrUsageClearMark , + pstrUsageRepeatFromMark , + pstrUsageReturnToMark , + pstrUsageSearchMarkForward , + pstrUsageSearchMarkBackwards , + pstrUsageCounterReset , + pstrUsageShowCounter , + pstrUsageTrackingIncrement , + pstrUsageTrackingDecrement , + pstrUsageStopEject , + pstrUsagePlayPause , + pstrUsagePlaySkip +}; +const char *ReportDescParserBase::consTitles7[] PROGMEM = +{ + pstrUsageVolume , + pstrUsageBalance , + pstrUsageMute , + pstrUsageBass , + pstrUsageTreble , + pstrUsageBassBoost , + pstrUsageSurroundMode , + pstrUsageLoudness , + pstrUsageMPX , + pstrUsageVolumeIncrement , + pstrUsageVolumeDecrement +}; +const char *ReportDescParserBase::consTitles8[] PROGMEM = +{ + pstrUsageSpeedSelect , + pstrUsagePlaybackSpeed , + pstrUsageStandardPlay , + pstrUsageLongPlay , + pstrUsageExtendedPlay , + pstrUsageSlow +}; +const char *ReportDescParserBase::consTitles9[] PROGMEM = +{ + pstrUsageFanEnable , + pstrUsageFanSpeed , + pstrUsageLightEnable , + pstrUsageLightIlluminationLevel , + pstrUsageClimateControlEnable , + pstrUsageRoomTemperature , + pstrUsageSecurityEnable , + pstrUsageFireAlarm , + pstrUsagePoliceAlarm , + pstrUsageProximity , + pstrUsageMotion , + pstrUsageDuresAlarm , + pstrUsageHoldupAlarm , + pstrUsageMedicalAlarm +}; +const char *ReportDescParserBase::consTitlesA[] PROGMEM = +{ + pstrUsageBalanceRight , + pstrUsageBalanceLeft , + pstrUsageBassIncrement , + pstrUsageBassDecrement , + pstrUsageTrebleIncrement , + pstrUsageTrebleDecrement +}; +const char *ReportDescParserBase::consTitlesB[] PROGMEM = +{ + pstrUsageSpeakerSystem , + pstrUsageChannelLeft , + pstrUsageChannelRight , + pstrUsageChannelCenter , + pstrUsageChannelFront , + pstrUsageChannelCenterFront , + pstrUsageChannelSide , + pstrUsageChannelSurround , + pstrUsageChannelLowFreqEnhancement , + pstrUsageChannelTop , + pstrUsageChannelUnknown +}; +const char *ReportDescParserBase::consTitlesC[] PROGMEM = +{ + pstrUsageSubChannel , + pstrUsageSubChannelIncrement , + pstrUsageSubChannelDecrement , + pstrUsageAlternateAudioIncrement , + pstrUsageAlternateAudioDecrement +}; +const char *ReportDescParserBase::consTitlesD[] PROGMEM = +{ + pstrUsageApplicationLaunchButtons , + pstrUsageALLaunchButtonConfigTool , + pstrUsageALProgrammableButton , + pstrUsageALConsumerControlConfig , + pstrUsageALWordProcessor , + pstrUsageALTextEditor , + pstrUsageALSpreadsheet , + pstrUsageALGraphicsEditor , + pstrUsageALPresentationApp , + pstrUsageALDatabaseApp , + pstrUsageALEmailReader , + pstrUsageALNewsreader , + pstrUsageALVoicemail , + pstrUsageALContactsAddressBook , + pstrUsageALCalendarSchedule , + pstrUsageALTaskProjectManager , + pstrUsageALLogJournalTimecard , + pstrUsageALCheckbookFinance , + pstrUsageALCalculator , + pstrUsageALAVCapturePlayback , + pstrUsageALLocalMachineBrowser , + pstrUsageALLANWANBrow , + pstrUsageALInternetBrowser , + pstrUsageALRemoteNetISPConnect , + pstrUsageALNetworkConference , + pstrUsageALNetworkChat , + pstrUsageALTelephonyDialer , + pstrUsageALLogon , + pstrUsageALLogoff , + pstrUsageALLogonLogoff , + pstrUsageALTermLockScrSav , + pstrUsageALControlPannel , + pstrUsageALCommandLineProcessorRun , + pstrUsageALProcessTaskManager , + pstrUsageALSelectTaskApplication , + pstrUsageALNextTaskApplication , + pstrUsageALPreviousTaskApplication , + pstrUsageALPreemptiveHaltTaskApp , + pstrUsageALIntegratedHelpCenter , + pstrUsageALDocuments , + pstrUsageALThesaurus , + pstrUsageALDictionary , + pstrUsageALDesktop , + pstrUsageALSpellCheck , + pstrUsageALGrammarCheck , + pstrUsageALWirelessStatus , + pstrUsageALKeyboardLayout , + pstrUsageALVirusProtection , + pstrUsageALEncryption , + pstrUsageALScreenSaver , + pstrUsageALAlarms , + pstrUsageALClock , + pstrUsageALFileBrowser , + pstrUsageALPowerStatus , + pstrUsageALImageBrowser , + pstrUsageALAudioBrowser , + pstrUsageALMovieBrowser , + pstrUsageALDigitalRightsManager , + pstrUsageALDigitalWallet , + pstrUsagePageReserved , + pstrUsageALInstantMessaging , + pstrUsageALOEMFeaturesBrowser , + pstrUsageALOEMHelp , + pstrUsageALOnlineCommunity , + pstrUsageALEntertainmentContentBrow , + pstrUsageALOnlineShoppingBrowser , + pstrUsageALSmartCardInfoHelp , + pstrUsageALMarketMonitorFinBrowser , + pstrUsageALCustomCorpNewsBrowser , + pstrUsageALOnlineActivityBrowser , + pstrUsageALResearchSearchBrowser , + pstrUsageALAudioPlayer +}; +const char *ReportDescParserBase::consTitlesE[] PROGMEM = +{ + pstrUsageGenericGUIAppControls , + pstrUsageACNew , + pstrUsageACOpen , + pstrUsageACClose , + pstrUsageACExit , + pstrUsageACMaximize , + pstrUsageACMinimize , + pstrUsageACSave , + pstrUsageACPrint , + pstrUsageACProperties , + pstrUsageACUndo , + pstrUsageACCopy , + pstrUsageACCut , + pstrUsageACPaste , + pstrUsageACSelectAll , + pstrUsageACFind , + pstrUsageACFindAndReplace , + pstrUsageACSearch , + pstrUsageACGoto , + pstrUsageACHome , + pstrUsageACBack , + pstrUsageACForward , + pstrUsageACStop , + pstrUsageACRefresh , + pstrUsageACPreviousLink , + pstrUsageACNextLink , + pstrUsageACBookmarks , + pstrUsageACHistory , + pstrUsageACSubscriptions , + pstrUsageACZoomIn , + pstrUsageACZoomOut , + pstrUsageACZoom , + pstrUsageACFullScreenView , + pstrUsageACNormalView , + pstrUsageACViewToggle , + pstrUsageACScrollUp , + pstrUsageACScrollDown , + pstrUsageACScroll , + pstrUsageACPanLeft , + pstrUsageACPanRight , + pstrUsageACPan , + pstrUsageACNewWindow , + pstrUsageACTileHoriz , + pstrUsageACTileVert , + pstrUsageACFormat , + pstrUsageACEdit , + pstrUsageACBold , + pstrUsageACItalics , + pstrUsageACUnderline , + pstrUsageACStrikethrough , + pstrUsageACSubscript , + pstrUsageACSuperscript , + pstrUsageACAllCaps , + pstrUsageACRotate , + pstrUsageACResize , + pstrUsageACFlipHorizontal , + pstrUsageACFlipVertical , + pstrUsageACMirrorHorizontal , + pstrUsageACMirrorVertical , + pstrUsageACFontSelect , + pstrUsageACFontColor , + pstrUsageACFontSize , + pstrUsageACJustifyLeft , + pstrUsageACJustifyCenterH , + pstrUsageACJustifyRight , + pstrUsageACJustifyBlockH , + pstrUsageACJustifyTop , + pstrUsageACJustifyCenterV , + pstrUsageACJustifyBottom , + pstrUsageACJustifyBlockV , + pstrUsageACIndentDecrease , + pstrUsageACIndentIncrease , + pstrUsageACNumberedList , + pstrUsageACRestartNumbering , + pstrUsageACBulletedList , + pstrUsageACPromote , + pstrUsageACDemote , + pstrUsageACYes , + pstrUsageACNo , + pstrUsageACCancel , + pstrUsageACCatalog , + pstrUsageACBuyChkout , + pstrUsageACAddToCart , + pstrUsageACExpand , + pstrUsageACExpandAll , + pstrUsageACCollapse , + pstrUsageACCollapseAll , + pstrUsageACPrintPreview , + pstrUsageACPasteSpecial , + pstrUsageACInsertMode , + pstrUsageACDelete , + pstrUsageACLock , + pstrUsageACUnlock , + pstrUsageACProtect , + pstrUsageACUnprotect , + pstrUsageACAttachComment , + pstrUsageACDeleteComment , + pstrUsageACViewComment , + pstrUsageACSelectWord , + pstrUsageACSelectSentence , + pstrUsageACSelectParagraph , + pstrUsageACSelectColumn , + pstrUsageACSelectRow , + pstrUsageACSelectTable , + pstrUsageACSelectObject , + pstrUsageACRedoRepeat , + pstrUsageACSort , + pstrUsageACSortAscending , + pstrUsageACSortDescending , + pstrUsageACFilter , + pstrUsageACSetClock , + pstrUsageACViewClock , + pstrUsageACSelectTimeZone , + pstrUsageACEditTimeZone , + pstrUsageACSetAlarm , + pstrUsageACClearAlarm , + pstrUsageACSnoozeAlarm , + pstrUsageACResetAlarm , + pstrUsageACSyncronize , + pstrUsageACSendReceive , + pstrUsageACSendTo , + pstrUsageACReply , + pstrUsageACReplyAll , + pstrUsageACForwardMessage , + pstrUsageACSend , + pstrUsageACAttachFile , + pstrUsageACUpload , + pstrUsageACDownload , + pstrUsageACSetBorders , + pstrUsageACInsertRow , + pstrUsageACInsertColumn , + pstrUsageACInsertFile , + pstrUsageACInsertPicture , + pstrUsageACInsertObject , + pstrUsageACInsertSymbol , + pstrUsageACSaveAndClose , + pstrUsageACRename , + pstrUsageACMerge , + pstrUsageACSplit , + pstrUsageACDistributeHorizontaly , + pstrUsageACDistributeVerticaly +}; +const char *ReportDescParserBase::digitTitles0[] PROGMEM = +{ + pstrUsageDigitizer , + pstrUsagePen , + pstrUsageLightPen , + pstrUsageTouchScreen , + pstrUsageTouchPad , + pstrUsageWhiteBoard , + pstrUsageCoordinateMeasuringMachine , + pstrUsage3DDigitizer , + pstrUsageStereoPlotter , + pstrUsageArticulatedArm , + pstrUsageArmature , + pstrUsageMultiplePointDigitizer , + pstrUsageFreeSpaceWand +}; +const char *ReportDescParserBase::digitTitles1[] PROGMEM = +{ + pstrUsageStylus , + pstrUsagePuck , + pstrUsageFinger + +}; +const char *ReportDescParserBase::digitTitles2[] PROGMEM = +{ + pstrUsageTipPressure , + pstrUsageBarrelPressure , + pstrUsageInRange , + pstrUsageTouch , + pstrUsageUntouch , + pstrUsageTap , + pstrUsageQuality , + pstrUsageDataValid , + pstrUsageTransducerIndex , + pstrUsageTabletFunctionKeys , + pstrUsageProgramChangeKeys , + pstrUsageBatteryStrength , + pstrUsageInvert , + pstrUsageXTilt , + pstrUsageYTilt , + pstrUsageAzimuth , + pstrUsageAltitude , + pstrUsageTwist , + pstrUsageTipSwitch , + pstrUsageSecondaryTipSwitch , + pstrUsageBarrelSwitch , + pstrUsageEraser , + pstrUsageTabletPick +}; +const char *ReportDescParserBase::aplphanumTitles0[] PROGMEM = +{ + pstrUsageAlphanumericDisplay, + pstrUsageBitmappedDisplay +}; +const char *ReportDescParserBase::aplphanumTitles1[] PROGMEM = +{ + pstrUsageDisplayAttributesReport , + pstrUsageASCIICharacterSet , + pstrUsageDataReadBack , + pstrUsageFontReadBack , + pstrUsageDisplayControlReport , + pstrUsageClearDisplay , + pstrUsageDisplayEnable , + pstrUsageScreenSaverDelay , + pstrUsageScreenSaverEnable , + pstrUsageVerticalScroll , + pstrUsageHorizontalScroll , + pstrUsageCharacterReport , + pstrUsageDisplayData , + pstrUsageDisplayStatus , + pstrUsageStatusNotReady , + pstrUsageStatusReady , + pstrUsageErrorNotALoadableCharacter , + pstrUsageErrorFotDataCanNotBeRead , + pstrUsageCursorPositionReport , + pstrUsageRow , + pstrUsageColumn , + pstrUsageRows , + pstrUsageColumns , + pstrUsageCursorPixelPosition , + pstrUsageCursorMode , + pstrUsageCursorEnable , + pstrUsageCursorBlink , + pstrUsageFontReport , + pstrUsageFontData , + pstrUsageCharacterWidth , + pstrUsageCharacterHeight , + pstrUsageCharacterSpacingHorizontal , + pstrUsageCharacterSpacingVertical , + pstrUsageUnicodeCharset , + pstrUsageFont7Segment , + pstrUsage7SegmentDirectMap , + pstrUsageFont14Segment , + pstrUsage14SegmentDirectMap , + pstrUsageDisplayBrightness , + pstrUsageDisplayContrast , + pstrUsageCharacterAttribute , + pstrUsageAttributeReadback , + pstrUsageAttributeData , + pstrUsageCharAttributeEnhance , + pstrUsageCharAttributeUnderline , + pstrUsageCharAttributeBlink +}; +const char *ReportDescParserBase::aplphanumTitles2[] PROGMEM = +{ + pstrUsageBitmapSizeX , + pstrUsageBitmapSizeY , + pstrUsagePageReserved , + pstrUsageBitDepthFormat , + pstrUsageDisplayOrientation , + pstrUsagePaletteReport , + pstrUsagePaletteDataSize , + pstrUsagePaletteDataOffset , + pstrUsagePaletteData , + pstrUsageBlitReport , + pstrUsageBlitRectangleX1 , + pstrUsageBlitRectangleY1 , + pstrUsageBlitRectangleX2 , + pstrUsageBlitRectangleY2 , + pstrUsageBlitData , + pstrUsageSoftButton , + pstrUsageSoftButtonID , + pstrUsageSoftButtonSide , + pstrUsageSoftButtonOffset1 , + pstrUsageSoftButtonOffset2 , + pstrUsageSoftButtonReport +}; +const char *ReportDescParserBase::medInstrTitles0[] PROGMEM = +{ + pstrUsageVCRAcquisition , + pstrUsageFreezeThaw , + pstrUsageClipStore , + pstrUsageUpdate , + pstrUsageNext , + pstrUsageSave , + pstrUsagePrint , + pstrUsageMicrophoneEnable +}; +const char *ReportDescParserBase::medInstrTitles1[] PROGMEM = +{ + pstrUsageCine , + pstrUsageTransmitPower , + pstrUsageVolume , + pstrUsageFocus , + pstrUsageDepth +}; +const char *ReportDescParserBase::medInstrTitles2[] PROGMEM = +{ + pstrUsageSoftStepPrimary , + pstrUsageSoftStepSecondary +}; +const char *ReportDescParserBase::medInstrTitles3[] PROGMEM = +{ + pstrUsageZoomSelect , + pstrUsageZoomAdjust , + pstrUsageSpectralDopplerModeSelect , + pstrUsageSpectralDopplerModeAdjust , + pstrUsageColorDopplerModeSelect , + pstrUsageColorDopplerModeAdjust , + pstrUsageMotionModeSelect , + pstrUsageMotionModeAdjust , + pstrUsage2DModeSelect , + pstrUsage2DModeAdjust +}; +const char *ReportDescParserBase::medInstrTitles4[] PROGMEM = +{ + pstrUsageSoftControlSelect , + pstrUsageSoftControlAdjust +}; + +void ReportDescParserBase::Parse(const uint16_t len, const uint8_t *pbuf, const uint16_t &offset) +{ + uint16_t cntdn = (uint16_t)len; + uint8_t *p = (uint8_t*)pbuf; + + + totalSize = 0; + + while(cntdn) + { + //Serial.println(""); + //PrintHex(offset + len - cntdn); + //Serial.print(":"); + + ParseItem(&p, &cntdn); + + //if (ParseItem(&p, &cntdn)) + // return; + } + USBTRACE2("Total:", totalSize); +} + +void ReportDescParserBase::PrintValue(uint8_t *p, uint8_t len) +{ + Notify(PSTR("(")); + for (; len; p++, len--) + PrintHex(*p); + Notify(PSTR(")")); +} + +void ReportDescParserBase::PrintByteValue(uint8_t data) +{ + Notify(PSTR("(")); + PrintHex(data); + Notify(PSTR(")")); +} + +void ReportDescParserBase::PrintItemTitle(uint8_t prefix) +{ + switch (prefix & (TYPE_MASK | TAG_MASK)) + { + case (TYPE_GLOBAL | TAG_GLOBAL_PUSH): + Notify(PSTR("\r\nPush")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_POP): + Notify(PSTR("\r\nPop")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE): + Notify(PSTR("\r\nUsage Page")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN): + Notify(PSTR("\r\nLogical Min")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX): + Notify(PSTR("\r\nLogical Max")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN): + Notify(PSTR("\r\nPhysical Min")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX): + Notify(PSTR("\r\nPhysical Max")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP): + Notify(PSTR("\r\nUnit Exp")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_UNIT): + Notify(PSTR("\r\nUnit")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE): + Notify(PSTR("\r\nReport Size")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT): + Notify(PSTR("\r\nReport Count")); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID): + Notify(PSTR("\r\nReport Id")); + break; + case (TYPE_LOCAL | TAG_LOCAL_USAGE): + Notify(PSTR("\r\nUsage")); + break; + case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN): + Notify(PSTR("\r\nUsage Min")); + break; + case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX): + Notify(PSTR("\r\nUsage Max")); + break; + case (TYPE_MAIN | TAG_MAIN_COLLECTION): + Notify(PSTR("\r\nCollection")); + break; + case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION): + Notify(PSTR("\r\nEnd Collection")); + break; + case (TYPE_MAIN | TAG_MAIN_INPUT): + Notify(PSTR("\r\nInput")); + break; + case (TYPE_MAIN | TAG_MAIN_OUTPUT): + Notify(PSTR("\r\nOutput")); + break; + case (TYPE_MAIN | TAG_MAIN_FEATURE): + Notify(PSTR("\r\nFeature")); + break; + } // switch (**pp & (TYPE_MASK | TAG_MASK)) +} +uint8_t ReportDescParserBase::ParseItem(uint8_t **pp, uint16_t *pcntdn) +{ + uint8_t ret = enErrorSuccess; + + switch (itemParseState) + { + case 0: + if (**pp == HID_LONG_ITEM_PREFIX) + USBTRACE("\r\nLONG\r\n"); + else + { + uint8_t size = ((**pp) & DATA_SIZE_MASK); + + itemPrefix = (**pp); + itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size); + + PrintItemTitle(itemPrefix); + } + (*pp) ++; + (*pcntdn) --; + itemSize --; + itemParseState = 1; + + if (!itemSize) + break; + + if (!pcntdn) + return enErrorIncomplete; + case 1: + //USBTRACE2("\r\niSz:",itemSize); + + theBuffer.valueSize = itemSize; + valParser.Initialize(&theBuffer); + itemParseState = 2; + case 2: + if (!valParser.Parse(pp, pcntdn)) + return enErrorIncomplete; + itemParseState = 3; + case 3: + { + uint8_t data = *((uint8_t*)varBuffer); + + switch (itemPrefix & (TYPE_MASK | TAG_MASK)) + { + case (TYPE_LOCAL | TAG_LOCAL_USAGE): + if (pfUsage) + if (theBuffer.valueSize > 1) + pfUsage(*((uint16_t*)varBuffer)); + else + pfUsage(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE): + rptSize = data; + PrintByteValue(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT): + rptCount = data; + PrintByteValue(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN): + case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX): + case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN): + case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX): + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID): + case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN): + case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX): + case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP): + case (TYPE_GLOBAL | TAG_GLOBAL_UNIT): + PrintValue(varBuffer, theBuffer.valueSize); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_PUSH): + case (TYPE_GLOBAL | TAG_GLOBAL_POP): + break; + case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE): + SetUsagePage(data); + PrintUsagePage(data); + PrintByteValue(data); + break; + case (TYPE_MAIN | TAG_MAIN_COLLECTION): + case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION): + switch (data) + { + case 0x00: + Notify(PSTR(" Physical")); + break; + case 0x01: + Notify(PSTR(" Application")); + break; + case 0x02: + Notify(PSTR(" Logical")); + break; + case 0x03: + Notify(PSTR(" Report")); + break; + case 0x04: + Notify(PSTR(" Named Array")); + break; + case 0x05: + Notify(PSTR(" Usage Switch")); + break; + case 0x06: + Notify(PSTR(" Usage Modifier")); + break; + default: + Notify(PSTR(" Vendor Defined(")); + PrintHex(data); + Notify(PSTR(")")); + } + break; + case (TYPE_MAIN | TAG_MAIN_INPUT): + case (TYPE_MAIN | TAG_MAIN_OUTPUT): + case (TYPE_MAIN | TAG_MAIN_FEATURE): + totalSize += (uint16_t)rptSize * (uint16_t)rptCount; + rptSize = 0; + rptCount = 0; + Notify(PSTR("(")); + PrintBin(data); + Notify(PSTR(")")); + break; + } // switch (**pp & (TYPE_MASK | TAG_MASK)) + } + } // switch (itemParseState) + itemParseState = 0; + return enErrorSuccess; +} + +ReportDescParserBase::UsagePageFunc ReportDescParserBase::usagePageFunctions[] /*PROGMEM*/ = +{ + &ReportDescParserBase::PrintGenericDesktopPageUsage, + &ReportDescParserBase::PrintSimulationControlsPageUsage, + &ReportDescParserBase::PrintVRControlsPageUsage, + &ReportDescParserBase::PrintSportsControlsPageUsage, + &ReportDescParserBase::PrintGameControlsPageUsage, + &ReportDescParserBase::PrintGenericDeviceControlsPageUsage, + NULL, // Keyboard/Keypad + &ReportDescParserBase::PrintLEDPageUsage, + &ReportDescParserBase::PrintButtonPageUsage, + &ReportDescParserBase::PrintOrdinalPageUsage, + &ReportDescParserBase::PrintTelephonyPageUsage, + &ReportDescParserBase::PrintConsumerPageUsage, + &ReportDescParserBase::PrintDigitizerPageUsage, + NULL, // Reserved + NULL, // PID + NULL // Unicode +}; + +void ReportDescParserBase::SetUsagePage(uint16_t page) +{ + pfUsage = NULL; + + if (page > 0x00 && page < 0x11) + pfUsage = /*(UsagePageFunc)pgm_read_word*/(usagePageFunctions[page - 1]); + //else if (page > 0x7f && page < 0x84) + // Notify(pstrUsagePageMonitor); + //else if (page > 0x83 && page < 0x8c) + // Notify(pstrUsagePagePower); + //else if (page > 0x8b && page < 0x92) + // Notify((char*)pgm_read_word(&usagePageTitles1[page - 0x8c])); + //else if (page > 0xfeff && page <= 0xffff) + // Notify(pstrUsagePageVendorDefined); + else + switch (page) + { + case 0x14: + pfUsage = &ReportDescParserBase::PrintAlphanumDisplayPageUsage; + break; + case 0x40: + pfUsage = &ReportDescParserBase::PrintMedicalInstrumentPageUsage; + break; + } +} + +void ReportDescParserBase::PrintUsagePage(uint16_t page) +{ + Notify(pstrSpace); + + if (page > 0x00 && page < 0x11) + Notify((char*)pgm_read_word(&usagePageTitles0[page - 1])); + else if (page > 0x7f && page < 0x84) + Notify(pstrUsagePageMonitor); + else if (page > 0x83 && page < 0x8c) + Notify(pstrUsagePagePower); + else if (page > 0x8b && page < 0x92) + Notify((char*)pgm_read_word(&usagePageTitles1[page - 0x8c])); + else if (page > 0xfeff && page <= 0xffff) + Notify(pstrUsagePageVendorDefined); + else + switch (page) + { + case 0x14: + Notify(pstrUsagePageAlphaNumericDisplay); + break; + case 0x40: + Notify(pstrUsagePageMedicalInstruments); + break; + default: + Notify(pstrUsagePageUndefined); + } +} + +void ReportDescParserBase::PrintButtonPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + Notify(PSTR("Btn")); + Serial.print(usage, DEC); +} + +void ReportDescParserBase::PrintOrdinalPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + Notify(PSTR("Inst")); + Serial.print(usage, DEC); +} + +void ReportDescParserBase::PrintGenericDesktopPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x0a) + Notify((char*)pgm_read_word(&genDesktopTitles0[usage - 1])); + else if (usage > 0x2f && usage < 0x49) + Notify((char*)pgm_read_word(&genDesktopTitles1[usage - 0x30])); + else if (usage > 0x7f && usage < 0x94) + Notify((char*)pgm_read_word(&genDesktopTitles2[usage - 0x80])); + else if (usage > 0x9f && usage < 0xa9) + Notify((char*)pgm_read_word(&genDesktopTitles3[usage - 0xa0])); + else if (usage > 0xaf && usage < 0xb8) + Notify((char*)pgm_read_word(&genDesktopTitles4[usage - 0xb0])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintSimulationControlsPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x0d) + Notify((char*)pgm_read_word(&simuTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x26) + Notify((char*)pgm_read_word(&simuTitles1[usage - 0x20])); + else if (usage > 0xaf && usage < 0xd1) + Notify((char*)pgm_read_word(&simuTitles2[usage - 0xb0])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintVRControlsPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x0b) + Notify((char*)pgm_read_word(&vrTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x22) + Notify((char*)pgm_read_word(&vrTitles1[usage - 0x20])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintSportsControlsPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x05) + Notify((char*)pgm_read_word(&sportsCtrlTitles0[usage - 1])); + else if (usage > 0x2f && usage < 0x3a) + Notify((char*)pgm_read_word(&sportsCtrlTitles1[usage - 0x30])); + else if (usage > 0x4f && usage < 0x64) + Notify((char*)pgm_read_word(&sportsCtrlTitles2[usage - 0x50])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintGameControlsPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x04) + Notify((char*)pgm_read_word(&gameTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x3a) + Notify((char*)pgm_read_word(&gameTitles1[usage - 0x20])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintGenericDeviceControlsPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x1f && usage < 0x27) + Notify((char*)pgm_read_word(&genDevCtrlTitles[usage - 0x20])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintLEDPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x4e) + Notify((char*)pgm_read_word(&ledTitles[usage - 1])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintTelephonyPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x08) + Notify((char*)pgm_read_word(&telTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x32) + Notify((char*)pgm_read_word(&telTitles1[usage - 0x1f])); + else if (usage > 0x4f && usage < 0x54) + Notify((char*)pgm_read_word(&telTitles2[usage - 0x4f])); + else if (usage > 0x6f && usage < 0x75) + Notify((char*)pgm_read_word(&telTitles3[usage - 0x6f])); + else if (usage > 0x8f && usage < 0x9f) + Notify((char*)pgm_read_word(&telTitles4[usage - 0x8f])); + else if (usage > 0xaf && usage < 0xc0) + Notify((char*)pgm_read_word(&telTitles5[usage - 0xaf])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintConsumerPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x07) + Notify((char*)pgm_read_word(&consTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x23) + Notify((char*)pgm_read_word(&consTitles1[usage - 0x1f])); + else if (usage > 0x2f && usage < 0x37) + Notify((char*)pgm_read_word(&consTitles2[usage - 0x2f])); + else if (usage > 0x3f && usage < 0x49) + Notify((char*)pgm_read_word(&consTitles3[usage - 0x3f])); + else if (usage > 0x5f && usage < 0x67) + Notify((char*)pgm_read_word(&consTitles4[usage - 0x5f])); + else if (usage > 0x7f && usage < 0xa5) + Notify((char*)pgm_read_word(&consTitles5[usage - 0x7f])); + else if (usage > 0xaf && usage < 0xcf) + Notify((char*)pgm_read_word(&consTitles6[usage - 0xaf])); + else if (usage > 0xdf && usage < 0xeb) + Notify((char*)pgm_read_word(&consTitles7[usage - 0xdf])); + else if (usage > 0xef && usage < 0xf6) + Notify((char*)pgm_read_word(&consTitles8[usage - 0xef])); + else if (usage > 0xff && usage < 0x10e) + Notify((char*)pgm_read_word(&consTitles9[usage - 0xff])); + else if (usage > 0x14f && usage < 0x156) + Notify((char*)pgm_read_word(&consTitlesA[usage - 0x14f])); + else if (usage > 0x15f && usage < 0x16b) + Notify((char*)pgm_read_word(&consTitlesB[usage - 0x15f])); + else if (usage > 0x16f && usage < 0x175) + Notify((char*)pgm_read_word(&consTitlesC[usage - 0x16f])); + else if (usage > 0x17f && usage < 0x1c8) + Notify((char*)pgm_read_word(&consTitlesD[usage - 0x17f])); + else if (usage > 0x1ff && usage < 0x29d) + Notify((char*)pgm_read_word(&consTitlesE[usage - 0x1ff])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintDigitizerPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x0e) + Notify((char*)pgm_read_word(&digitTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x23) + Notify((char*)pgm_read_word(&digitTitles1[usage - 0x1f])); + else if (usage > 0x2f && usage < 0x47) + Notify((char*)pgm_read_word(&digitTitles2[usage - 0x2f])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintAlphanumDisplayPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage > 0x00 && usage < 0x03) + Notify((char*)pgm_read_word(&aplphanumTitles0[usage - 1])); + else if (usage > 0x1f && usage < 0x4e) + Notify((char*)pgm_read_word(&aplphanumTitles1[usage - 0x1f])); + else if (usage > 0x7f && usage < 0x96) + Notify((char*)pgm_read_word(&digitTitles2[usage - 0x80])); + else + Notify(pstrUsagePageUndefined); +} + +void ReportDescParserBase::PrintMedicalInstrumentPageUsage(uint16_t usage) +{ + Notify(pstrSpace); + + if (usage == 1) + Notify(pstrUsageMedicalUltrasound); + else if (usage > 0x1f && usage < 0x28) + Notify((char*)pgm_read_word(&medInstrTitles0[usage - 0x1f])); + else if (usage > 0x3f && usage < 0x45) + Notify((char*)pgm_read_word(&medInstrTitles1[usage - 0x40])); + else if (usage > 0x5f && usage < 0x62) + Notify((char*)pgm_read_word(&medInstrTitles2[usage - 0x60])); + else if (usage == 0x70) + Notify(pstrUsageDepthGainCompensation); + else if (usage > 0x7f && usage < 0x8a) + Notify((char*)pgm_read_word(&medInstrTitles3[usage - 0x80])); + else if (usage > 0x9f && usage < 0xa2) + Notify((char*)pgm_read_word(&medInstrTitles4[usage - 0xa0])); + else + Notify(pstrUsagePageUndefined); +} + + + + + +uint8_t ReportDescParser2::ParseItem(uint8_t **pp, uint16_t *pcntdn) +{ + uint8_t ret = enErrorSuccess; + + switch (itemParseState) + { + case 0: + if (**pp == HID_LONG_ITEM_PREFIX) + USBTRACE("\r\nLONG\r\n"); + else + { + uint8_t size = ((**pp) & DATA_SIZE_MASK); + + itemPrefix = (**pp); + itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size); + + //PrintItemTitle(itemPrefix); + } + (*pp) ++; + (*pcntdn) --; + itemSize --; + itemParseState = 1; + + if (!itemSize) + break; + + if (!pcntdn) + return enErrorIncomplete; + case 1: + //USBTRACE2("\r\niSz:",itemSize); + + theBuffer.valueSize = itemSize; + valParser.Initialize(&theBuffer); + itemParseState = 2; + case 2: + if (!valParser.Parse(pp, pcntdn)) + return enErrorIncomplete; + itemParseState = 3; + case 3: + { + uint8_t data = *((uint8_t*)varBuffer); + + switch (itemPrefix & (TYPE_MASK | TAG_MASK)) + { + case (TYPE_LOCAL | TAG_LOCAL_USAGE): + if (pfUsage) + if (theBuffer.valueSize > 1) + pfUsage(*((uint16_t*)varBuffer)); + else + pfUsage(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE): + rptSize = data; + //PrintByteValue(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT): + rptCount = data; + //PrintByteValue(data); + break; + case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID): + rptId = data; + break; + case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN): + useMin = data; + break; + case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX): + useMax = data; + break; + case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE): + SetUsagePage(data); + //PrintUsagePage(data); + //PrintByteValue(data); + break; + case (TYPE_MAIN | TAG_MAIN_OUTPUT): + case (TYPE_MAIN | TAG_MAIN_FEATURE): + rptSize = 0; + rptCount = 0; + useMin = 0; + useMax = 0; + break; + case (TYPE_MAIN | TAG_MAIN_INPUT): + OnInputItem(data); + + totalSize += (uint16_t)rptSize * (uint16_t)rptCount; + + rptSize = 0; + rptCount = 0; + useMin = 0; + useMax = 0; + break; + } // switch (**pp & (TYPE_MASK | TAG_MASK)) + } + } // switch (itemParseState) + itemParseState = 0; + return enErrorSuccess; +} + +void ReportDescParser2::OnInputItem(uint8_t itm) +{ + uint8_t byte_offset = (totalSize >> 3); // calculate offset to the next unhandled byte i = (int)(totalCount / 8); + uint32_t tmp = (byte_offset << 3); + uint8_t bit_offset = totalSize - tmp; // number of bits in the current byte already handled + uint8_t *p = pBuf + byte_offset; // current byte pointer + + //Serial.print(" tS:"); + //PrintHex(totalSize); + + //Serial.print(" byO:"); + //PrintHex(byte_offset); + + //Serial.print(" biO:"); + //PrintHex(bit_offset); + + //Serial.print(" rSz:"); + //PrintHex(rptSize); + + //Serial.print(" rCn:"); + //PrintHex(rptCount); + + if (bit_offset) + *p >>= bit_offset; + + uint8_t usage = useMin; + + bool print_usemin_usemax = ( (useMin < useMax) && ((itm & 3) == 2) && pfUsage) ? true : false; + + uint8_t bits_of_byte = 8; + + for (uint8_t i=0; i 8) ? 8 : (bits_left > bits_of_byte) ? bits_of_byte : bits_left; + + result.dwResult <<= bits_to_copy; // Result buffer is shifted by the number of bits to be copied into it + + if (bits_to_copy == 8) + { + result.bResult[0] = *p; + bits_of_byte = 8; + p ++; + continue; + } + + uint8_t val = *p; + + val >>= (8 - bits_of_byte); // Shift by the number of bits already processed + + //Serial.print(" sh:"); + //PrintHex(8 - bits_of_byte); + + mask = 0; + + for (uint8_t j=bits_to_copy; j; j--) + { + mask <<= 1; + mask |= 1; + } + + //Serial.print(" msk:"); + //PrintHex(mask); + + result.bResult[0] = (result.bResult[0] | (val & mask)); + + //Serial.print(" res:"); + //PrintHex(result.bResult[0]); + + //Serial.print(" b2c:"); + //PrintHex(bits_to_copy); + + bits_of_byte -= bits_to_copy; + + //Serial.print(" bob:"); + //PrintHex(bits_of_byte); + } + + PrintByteValue(result.bResult[0]); + } + Serial.println(""); +} + +void UniversalReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) +{ + ReportDescParser2 prs(len, buf); + + uint8_t ret = hid->GetReportDescr(0, &prs); + + if (ret) + ErrorMessage(PSTR("GetReportDescr-2"), ret); +} \ No newline at end of file diff --git a/hidescriptorparser.h b/hidescriptorparser.h new file mode 100644 index 00000000..8dbc4519 --- /dev/null +++ b/hidescriptorparser.h @@ -0,0 +1,193 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#if !defined(__HIDDESCRIPTORPARSER_H__) +#define __HIDDESCRIPTORPARSER_H__ + +#include +#include +#include "avrpins.h" +#include "max3421e.h" +#include "usbhost.h" +#include "usb_ch9.h" +#include "Usb.h" +#include + +#include "printhex.h" +#include "hexdump.h" +#include "message.h" + +#include "confdescparser.h" +//#include "hidusagestr.h" +#include "hid.h" +//#include "..\ptp\simplefifo.h" + +class ReportDescParserBase : public USBReadParser +{ +public: + typedef void (*UsagePageFunc)(uint16_t usage); + + static void PrintGenericDesktopPageUsage(uint16_t usage); + static void PrintSimulationControlsPageUsage(uint16_t usage); + static void PrintVRControlsPageUsage(uint16_t usage); + static void PrintSportsControlsPageUsage(uint16_t usage); + static void PrintGameControlsPageUsage(uint16_t usage); + static void PrintGenericDeviceControlsPageUsage(uint16_t usage); + static void PrintLEDPageUsage(uint16_t usage); + static void PrintButtonPageUsage(uint16_t usage); + static void PrintOrdinalPageUsage(uint16_t usage); + static void PrintTelephonyPageUsage(uint16_t usage); + static void PrintConsumerPageUsage(uint16_t usage); + static void PrintDigitizerPageUsage(uint16_t usage); + static void PrintAlphanumDisplayPageUsage(uint16_t usage); + static void PrintMedicalInstrumentPageUsage(uint16_t usage); + + static void PrintValue(uint8_t *p, uint8_t len); + static void PrintByteValue(uint8_t data); + + static void PrintItemTitle(uint8_t prefix); + + static const char *usagePageTitles0[]; + static const char *usagePageTitles1[]; + static const char *genDesktopTitles0[]; + static const char *genDesktopTitles1[]; + static const char *genDesktopTitles2[]; + static const char *genDesktopTitles3[]; + static const char *genDesktopTitles4[]; + static const char *simuTitles0[]; + static const char *simuTitles1[]; + static const char *simuTitles2[]; + static const char *vrTitles0[]; + static const char *vrTitles1[]; + static const char *sportsCtrlTitles0[]; + static const char *sportsCtrlTitles1[]; + static const char *sportsCtrlTitles2[]; + static const char *gameTitles0[]; + static const char *gameTitles1[]; + static const char *genDevCtrlTitles[]; + static const char *ledTitles[]; + static const char *telTitles0[]; + static const char *telTitles1[]; + static const char *telTitles2[]; + static const char *telTitles3[]; + static const char *telTitles4[]; + static const char *telTitles5[]; + static const char *consTitles0[]; + static const char *consTitles1[]; + static const char *consTitles2[]; + static const char *consTitles3[]; + static const char *consTitles4[]; + static const char *consTitles5[]; + static const char *consTitles6[]; + static const char *consTitles7[]; + static const char *consTitles8[]; + static const char *consTitles9[]; + static const char *consTitlesA[]; + static const char *consTitlesB[]; + static const char *consTitlesC[]; + static const char *consTitlesD[]; + static const char *consTitlesE[]; + static const char *digitTitles0[]; + static const char *digitTitles1[]; + static const char *digitTitles2[]; + static const char *aplphanumTitles0[]; + static const char *aplphanumTitles1[]; + static const char *aplphanumTitles2[]; + static const char *medInstrTitles0[]; + static const char *medInstrTitles1[]; + static const char *medInstrTitles2[]; + static const char *medInstrTitles3[]; + static const char *medInstrTitles4[]; + +protected: + static UsagePageFunc usagePageFunctions[]; + + MultiValueBuffer theBuffer; + MultiByteValueParser valParser; + ByteSkipper theSkipper; + uint8_t varBuffer[sizeof(USB_CONFIGURATION_DESCRIPTOR)]; + + uint8_t itemParseState; // Item parser state variable + uint8_t itemSize; // Item size + uint8_t itemPrefix; // Item prefix (first byte) + uint8_t rptSize; // Report Size + uint8_t rptCount; // Report Count + + uint16_t totalSize; // Report size in bits + + virtual uint8_t ParseItem(uint8_t **pp, uint16_t *pcntdn); + + UsagePageFunc pfUsage; + + static void PrintUsagePage(uint16_t page); + void SetUsagePage(uint16_t page); + +public: + ReportDescParserBase() : + itemParseState(0), + itemSize(0), + itemPrefix(0), + rptSize(0), + rptCount(0), + pfUsage(NULL) + { + theBuffer.pValue = varBuffer; + valParser.Initialize(&theBuffer); + theSkipper.Initialize(&theBuffer); + }; + + virtual void Parse(const uint16_t len, const uint8_t *pbuf, const uint16_t &offset); + + enum + { + enErrorSuccess = 0 + , enErrorIncomplete // value or record is partialy read in buffer + , enErrorBufferTooSmall + }; +}; + +class ReportDescParser : public ReportDescParserBase +{ +}; + +class ReportDescParser2 : public ReportDescParserBase +{ + uint8_t rptId; // Report ID + uint8_t useMin; // Usage Minimum + uint8_t useMax; // Usage Maximum + uint8_t fieldCount; // Number of field being currently processed + + void OnInputItem(uint8_t itm); // Method which is called every time Input item is found + + uint8_t *pBuf; // Report buffer pointer + uint8_t bLen; // Report length + +protected: + virtual uint8_t ParseItem(uint8_t **pp, uint16_t *pcntdn); + +public: + ReportDescParser2(uint16_t len, uint8_t *pbuf) : + ReportDescParserBase(), bLen(len), pBuf(pbuf), rptId(0), useMin(0), useMax(0), fieldCount(0) + {}; +}; + +class UniversalReportParser : public HIDReportParser +{ +public: + virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); +}; + +#endif // __HIDDESCRIPTORPARSER_H__ \ No newline at end of file diff --git a/hidusagestr.h b/hidusagestr.h new file mode 100644 index 00000000..b150f26a --- /dev/null +++ b/hidusagestr.h @@ -0,0 +1,977 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#if !defined( __HIDUSAGESTR_H__) +#define __HIDUSAGESTR_H__ + +#include + +const char pstrSpace [] PROGMEM = " "; +const char pstrCRLF [] PROGMEM = "\r\n"; +const char pstrSingleTab [] PROGMEM = "\t"; +const char pstrDoubleTab [] PROGMEM = "\t\t"; +const char pstrTripleTab [] PROGMEM = "\t\t\t"; + +// Usage Page String Titles +const char pstrUsagePageUndefined [] PROGMEM = "Undef"; +const char pstrUsagePageGenericDesktopControls [] PROGMEM = "Gen Desktop Ctrls"; +const char pstrUsagePageSimulationControls [] PROGMEM = "Simu Ctrls"; +const char pstrUsagePageVRControls [] PROGMEM = "VR Ctrls"; +const char pstrUsagePageSportControls [] PROGMEM = "Sport Ctrls"; +const char pstrUsagePageGameControls [] PROGMEM = "Game Ctrls"; +const char pstrUsagePageGenericDeviceControls [] PROGMEM = "Gen Dev Ctrls"; +const char pstrUsagePageKeyboardKeypad [] PROGMEM = "Kbrd/Keypad"; +const char pstrUsagePageLEDs [] PROGMEM = "LEDs"; +const char pstrUsagePageButton [] PROGMEM = "Button"; +const char pstrUsagePageOrdinal [] PROGMEM = "Ordinal"; +const char pstrUsagePageTelephone [] PROGMEM = "Tel"; +const char pstrUsagePageConsumer [] PROGMEM = "Consumer"; +const char pstrUsagePageDigitizer [] PROGMEM = "Digitizer"; +const char pstrUsagePagePID [] PROGMEM = "PID"; +const char pstrUsagePageUnicode [] PROGMEM = "Unicode"; +const char pstrUsagePageAlphaNumericDisplay [] PROGMEM = "Alpha Num Disp"; +const char pstrUsagePageMedicalInstruments [] PROGMEM = "Medical Instr"; +const char pstrUsagePageMonitor [] PROGMEM = "Monitor"; +const char pstrUsagePagePower [] PROGMEM = "Power"; +const char pstrUsagePageBarCodeScanner [] PROGMEM = "Bar Code Scan"; +const char pstrUsagePageScale [] PROGMEM = "Scale"; +const char pstrUsagePageMSRDevices [] PROGMEM = "Magn Stripe Read Dev"; +const char pstrUsagePagePointOfSale [] PROGMEM = "POS"; +const char pstrUsagePageCameraControl [] PROGMEM = "Cam Ctrl"; +const char pstrUsagePageArcade [] PROGMEM = "Arcade"; +const char pstrUsagePageReserved [] PROGMEM = "Reserved"; +const char pstrUsagePageVendorDefined [] PROGMEM = "Vendor Def"; + +// Generic Desktop Controls Page +const char pstrUsagePointer [] PROGMEM = "Pointer"; +const char pstrUsageMouse [] PROGMEM = "Mouse"; +const char pstrUsageJoystick [] PROGMEM = "Joystick"; +const char pstrUsageGamePad [] PROGMEM = "Game Pad"; +const char pstrUsageKeyboard [] PROGMEM = "Kbrd"; +const char pstrUsageKeypad [] PROGMEM = "Keypad"; +const char pstrUsageMultiAxisController [] PROGMEM = "Multi-axis Ctrl"; +const char pstrUsageTabletPCSystemControls [] PROGMEM = "Tablet PC Sys Ctrls"; +const char pstrUsageX [] PROGMEM = "X"; +const char pstrUsageY [] PROGMEM = "Y"; +const char pstrUsageZ [] PROGMEM = "Z"; +const char pstrUsageRx [] PROGMEM = "Rx"; +const char pstrUsageRy [] PROGMEM = "Ry"; +const char pstrUsageRz [] PROGMEM = "Rz"; +const char pstrUsageSlider [] PROGMEM = "Slider"; +const char pstrUsageDial [] PROGMEM = "Dial"; +const char pstrUsageWheel [] PROGMEM = "Wheel"; +const char pstrUsageHatSwitch [] PROGMEM = "Hat Switch"; +const char pstrUsageCountedBuffer [] PROGMEM = "Counted Buf"; +const char pstrUsageByteCount [] PROGMEM = "Byte Count"; +const char pstrUsageMotionWakeup [] PROGMEM = "Motion Wakeup"; +const char pstrUsageStart [] PROGMEM = "Start"; +const char pstrUsageSelect [] PROGMEM = "Sel"; +const char pstrUsageVx [] PROGMEM = "Vx"; +const char pstrUsageVy [] PROGMEM = "Vy"; +const char pstrUsageVz [] PROGMEM = "Vz"; +const char pstrUsageVbrx [] PROGMEM = "Vbrx"; +const char pstrUsageVbry [] PROGMEM = "Vbry"; +const char pstrUsageVbrz [] PROGMEM = "Vbrz"; +const char pstrUsageVno [] PROGMEM = "Vno"; +const char pstrUsageFeatureNotification [] PROGMEM = "Feature Notif"; +const char pstrUsageResolutionMultiplier [] PROGMEM = "Res Mult"; +const char pstrUsageSystemControl [] PROGMEM = "Sys Ctrl"; +const char pstrUsageSystemPowerDown [] PROGMEM = "Sys Pwr Down"; +const char pstrUsageSystemSleep [] PROGMEM = "Sys Sleep"; +const char pstrUsageSystemWakeup [] PROGMEM = "Sys Wakeup"; +const char pstrUsageSystemContextMenu [] PROGMEM = "Sys Context Menu"; +const char pstrUsageSystemMainMenu [] PROGMEM = "Sys Main Menu"; +const char pstrUsageSystemAppMenu [] PROGMEM = "Sys App Menu"; +const char pstrUsageSystemMenuHelp [] PROGMEM = "Sys Menu Help"; +const char pstrUsageSystemMenuExit [] PROGMEM = "Sys Menu Exit"; +const char pstrUsageSystemMenuSelect [] PROGMEM = "Sys Menu Select"; +const char pstrUsageSystemMenuRight [] PROGMEM = "Sys Menu Right"; +const char pstrUsageSystemMenuLeft [] PROGMEM = "Sys Menu Left"; +const char pstrUsageSystemMenuUp [] PROGMEM = "Sys Menu Up"; +const char pstrUsageSystemMenuDown [] PROGMEM = "Sys Menu Down"; +const char pstrUsageSystemColdRestart [] PROGMEM = "Sys Cold Restart"; +const char pstrUsageSystemWarmRestart [] PROGMEM = "Sys Warm Restart"; +const char pstrUsageDPadUp [] PROGMEM = "D-pad Up"; +const char pstrUsageDPadDown [] PROGMEM = "D-pad Down"; +const char pstrUsageDPadRight [] PROGMEM = "D-pad Right"; +const char pstrUsageDPadLeft [] PROGMEM = "D-pad Left"; +const char pstrUsageSystemDock [] PROGMEM = "Sys Dock"; +const char pstrUsageSystemUndock [] PROGMEM = "Sys Undock"; +const char pstrUsageSystemSetup [] PROGMEM = "Sys Setup"; +const char pstrUsageSystemBreak [] PROGMEM = "Sys Break"; +const char pstrUsageSystemDebuggerBreak [] PROGMEM = "Sys Dbg Brk"; +const char pstrUsageApplicationBreak [] PROGMEM = "App Break"; +const char pstrUsageApplicationDebuggerBreak [] PROGMEM = "App Dbg Brk"; +const char pstrUsageSystemSpeakerMute [] PROGMEM = "Sys Spk Mute"; +const char pstrUsageSystemHibernate [] PROGMEM = "Sys Hiber"; +const char pstrUsageSystemDisplayInvert [] PROGMEM = "Sys Disp Inv"; +const char pstrUsageSystemDisplayInternal [] PROGMEM = "Sys Disp Int"; +const char pstrUsageSystemDisplayExternal [] PROGMEM = "Sys Disp Ext"; +const char pstrUsageSystemDisplayBoth [] PROGMEM = "Sys Disp Both"; +const char pstrUsageSystemDisplayDual [] PROGMEM = "Sys Disp Dual"; +const char pstrUsageSystemDisplayToggleIntExt [] PROGMEM = "Sys Disp Tgl Int/Ext"; +const char pstrUsageSystemDisplaySwapPriSec [] PROGMEM = "Sys Disp Swap Pri/Sec"; +const char pstrUsageSystemDisplayLCDAutoscale [] PROGMEM = "Sys Disp LCD Autoscale"; + +// Simulation Controls Page +const char pstrUsageFlightSimulationDevice [] PROGMEM = "Flight Simu Dev"; +const char pstrUsageAutomobileSimulationDevice [] PROGMEM = "Auto Simu Dev"; +const char pstrUsageTankSimulationDevice [] PROGMEM = "Tank Simu Dev"; +const char pstrUsageSpaceshipSimulationDevice [] PROGMEM = "Space Simu Dev"; +const char pstrUsageSubmarineSimulationDevice [] PROGMEM = "Subm Simu Dev"; +const char pstrUsageSailingSimulationDevice [] PROGMEM = "Sail Simu Dev"; +const char pstrUsageMotocicleSimulationDevice [] PROGMEM = "Moto Simu Dev"; +const char pstrUsageSportsSimulationDevice [] PROGMEM = "Sport Simu Dev"; +const char pstrUsageAirplaneSimulationDevice [] PROGMEM = "Airp Simu Dev"; +const char pstrUsageHelicopterSimulationDevice [] PROGMEM = "Heli Simu Dev"; +const char pstrUsageMagicCarpetSimulationDevice [] PROGMEM = "Magic Carpet Simu Dev"; +const char pstrUsageBicycleSimulationDevice [] PROGMEM = "Bike Simu Dev"; +const char pstrUsageFlightControlStick [] PROGMEM = "Flight Ctrl Stick"; +const char pstrUsageFlightStick [] PROGMEM = "Flight Stick"; +const char pstrUsageCyclicControl [] PROGMEM = "Cyclic Ctrl"; +const char pstrUsageCyclicTrim [] PROGMEM = "Cyclic Trim"; +const char pstrUsageFlightYoke [] PROGMEM = "Flight Yoke"; +const char pstrUsageTrackControl [] PROGMEM = "Track Ctrl"; +const char pstrUsageAileron [] PROGMEM = "Aileron"; +const char pstrUsageAileronTrim [] PROGMEM = "Aileron Trim"; +const char pstrUsageAntiTorqueControl [] PROGMEM = "Anti-Torque Ctrl"; +const char pstrUsageAutopilotEnable [] PROGMEM = "Autopilot Enable"; +const char pstrUsageChaffRelease [] PROGMEM = "Chaff Release"; +const char pstrUsageCollectiveControl [] PROGMEM = "Collective Ctrl"; +const char pstrUsageDiveBrake [] PROGMEM = "Dive Brake"; +const char pstrUsageElectronicCountermeasures [] PROGMEM = "El Countermeasures"; +const char pstrUsageElevator [] PROGMEM = "Elevator"; +const char pstrUsageElevatorTrim [] PROGMEM = "Elevator Trim"; +const char pstrUsageRudder [] PROGMEM = "Rudder"; +const char pstrUsageThrottle [] PROGMEM = "Throttle"; +const char pstrUsageFlightCommunications [] PROGMEM = "Flight Comm"; +const char pstrUsageFlareRelease [] PROGMEM = "Flare Release"; +const char pstrUsageLandingGear [] PROGMEM = "Landing Gear"; +const char pstrUsageToeBrake [] PROGMEM = "Toe Brake"; +const char pstrUsageTrigger [] PROGMEM = "Trigger"; +const char pstrUsageWeaponsArm [] PROGMEM = "Weapons Arm"; +const char pstrUsageWeaponsSelect [] PROGMEM = "Weapons Sel"; +const char pstrUsageWingFlaps [] PROGMEM = "Wing Flaps"; +const char pstrUsageAccelerator [] PROGMEM = "Accel"; +const char pstrUsageBrake [] PROGMEM = "Brake"; +const char pstrUsageClutch [] PROGMEM = "Clutch"; +const char pstrUsageShifter [] PROGMEM = "Shifter"; +const char pstrUsageSteering [] PROGMEM = "Steering"; +const char pstrUsageTurretDirection [] PROGMEM = "Turret Dir"; +const char pstrUsageBarrelElevation [] PROGMEM = "Barrel Ele"; +const char pstrUsageDivePlane [] PROGMEM = "Dive Plane"; +const char pstrUsageBallast [] PROGMEM = "Ballast"; +const char pstrUsageBicycleCrank [] PROGMEM = "Bicycle Crank"; +const char pstrUsageHandleBars [] PROGMEM = "Handle Bars"; +const char pstrUsageFrontBrake [] PROGMEM = "Front Brake"; +const char pstrUsageRearBrake [] PROGMEM = "Rear Brake"; + +// VR Controls Page +const char pstrUsageBelt [] PROGMEM = "Belt"; +const char pstrUsageBodySuit [] PROGMEM = "Body Suit"; +const char pstrUsageFlexor [] PROGMEM = "Flexor"; +const char pstrUsageGlove [] PROGMEM = "Glove"; +const char pstrUsageHeadTracker [] PROGMEM = "Head Track"; +const char pstrUsageHeadMountedDisplay [] PROGMEM = "Head Disp"; +const char pstrUsageHandTracker [] PROGMEM = "Hand Track"; +const char pstrUsageOculometer [] PROGMEM = "Oculometer"; +const char pstrUsageVest [] PROGMEM = "Vest"; +const char pstrUsageAnimatronicDevice [] PROGMEM = "Animat Dev"; +const char pstrUsageStereoEnable [] PROGMEM = "Stereo Enbl"; +const char pstrUsageDisplayEnable [] PROGMEM = "Display Enbl"; + +// Sport Controls Page +const char pstrUsageBaseballBat [] PROGMEM = "Baseball Bat"; +const char pstrUsageGolfClub [] PROGMEM = "Golf Club"; +const char pstrUsageRowingMachine [] PROGMEM = "Rowing Mach"; +const char pstrUsageTreadmill [] PROGMEM = "Treadmill"; +const char pstrUsageOar [] PROGMEM = "Oar"; +const char pstrUsageSlope [] PROGMEM = "Slope"; +const char pstrUsageRate [] PROGMEM = "Rate"; +const char pstrUsageStickSpeed [] PROGMEM = "Stick Speed"; +const char pstrUsageStickFaceAngle [] PROGMEM = "Stick Face Ang"; +const char pstrUsageStickHeelToe [] PROGMEM = "Stick Heel/Toe"; +const char pstrUsageStickFollowThough [] PROGMEM = "Stick Flw Thru"; +const char pstrUsageStickTempo [] PROGMEM = "Stick Tempo"; +const char pstrUsageStickType [] PROGMEM = "Stick Type"; +const char pstrUsageStickHeight [] PROGMEM = "Stick Hght"; +const char pstrUsagePutter [] PROGMEM = "Putter"; +const char pstrUsage1Iron [] PROGMEM = "1 Iron"; +const char pstrUsage2Iron [] PROGMEM = "2 Iron"; +const char pstrUsage3Iron [] PROGMEM = "3 Iron"; +const char pstrUsage4Iron [] PROGMEM = "4 Iron"; +const char pstrUsage5Iron [] PROGMEM = "5 Iron"; +const char pstrUsage6Iron [] PROGMEM = "6 Iron"; +const char pstrUsage7Iron [] PROGMEM = "7 Iron"; +const char pstrUsage8Iron [] PROGMEM = "8 Iron"; +const char pstrUsage9Iron [] PROGMEM = "9 Iron"; +const char pstrUsage10Iron [] PROGMEM = "10 Iron"; +const char pstrUsage11Iron [] PROGMEM = "11 Iron"; +const char pstrUsageSandWedge [] PROGMEM = "Sand Wedge"; +const char pstrUsageLoftWedge [] PROGMEM = "Loft Wedge"; +const char pstrUsagePowerWedge [] PROGMEM = "Pwr Wedge"; +const char pstrUsage1Wood [] PROGMEM = "1 Wood"; +const char pstrUsage3Wood [] PROGMEM = "3 Wood"; +const char pstrUsage5Wood [] PROGMEM = "5 Wood"; +const char pstrUsage7Wood [] PROGMEM = "7 Wood"; +const char pstrUsage9Wood [] PROGMEM = "9 Wood"; + +// Game Controls Page +const char pstrUsage3DGameController [] PROGMEM = "3D Game Ctrl"; +const char pstrUsagePinballDevice [] PROGMEM = "Pinball Dev"; +const char pstrUsageGunDevice [] PROGMEM = "Gun Dev"; +const char pstrUsagePointOfView [] PROGMEM = "POV"; +const char pstrUsageTurnRightLeft [] PROGMEM = "Turn Right Left"; +const char pstrUsagePitchForwardBackward [] PROGMEM = "Pitch Fwd/Back"; +const char pstrUsageRollRightLeft [] PROGMEM = "Roll Right/Left"; +const char pstrUsageMoveRightLeft [] PROGMEM = "Move Right/Left"; +const char pstrUsageMoveForwardBackward [] PROGMEM = "Move Fwd/Back"; +const char pstrUsageMoveUpDown [] PROGMEM = "Move Up/Down"; +const char pstrUsageLeanRightLeft [] PROGMEM = "Lean Right/Left"; +const char pstrUsageLeanForwardBackward [] PROGMEM = "Lean Fwd/Back"; +const char pstrUsageHeightOfPOV [] PROGMEM = "Height of POV"; +const char pstrUsageFlipper [] PROGMEM = "Flipper"; +const char pstrUsageSecondaryFlipper [] PROGMEM = "Second Flipper"; +const char pstrUsageBump [] PROGMEM = "Bump"; +const char pstrUsageNewGame [] PROGMEM = "New Game"; +const char pstrUsageShootBall [] PROGMEM = "Shoot Ball"; +const char pstrUsagePlayer [] PROGMEM = "Player"; +const char pstrUsageGunBolt [] PROGMEM = "Gun Bolt"; +const char pstrUsageGunClip [] PROGMEM = "Gun Clip"; +const char pstrUsageGunSelector [] PROGMEM = "Gun Sel"; +const char pstrUsageGunSingleShot [] PROGMEM = "Gun Sngl Shot"; +const char pstrUsageGunBurst [] PROGMEM = "Gun Burst"; +const char pstrUsageGunAutomatic [] PROGMEM = "Gun Auto"; +const char pstrUsageGunSafety [] PROGMEM = "Gun Safety"; +const char pstrUsageGamepadFireJump [] PROGMEM = "Gamepad Fire/Jump"; +const char pstrUsageGamepadTrigger [] PROGMEM = "Gamepad Trig"; + +// Generic Device Controls Page +const char pstrUsageBatteryStrength [] PROGMEM = "Bat Strength"; +const char pstrUsageWirelessChannel [] PROGMEM = "Wireless Ch"; +const char pstrUsageWirelessID [] PROGMEM = "Wireless ID"; +const char pstrUsageDiscoverWirelessControl [] PROGMEM = "Discover Wireless Ctrl"; +const char pstrUsageSecurityCodeCharEntered [] PROGMEM = "Sec Code Char Entrd"; +const char pstrUsageSecurityCodeCharErased [] PROGMEM = "Sec Code Char Erased"; +const char pstrUsageSecurityCodeCleared [] PROGMEM = "Sec Code Cleared"; + +// LED Page +const char pstrUsageNumLock [] PROGMEM = "Num Lock"; +const char pstrUsageCapsLock [] PROGMEM = "Caps Lock"; +const char pstrUsageScrollLock [] PROGMEM = "Scroll Lock"; +const char pstrUsageCompose [] PROGMEM = "Compose"; +const char pstrUsageKana [] PROGMEM = "Kana"; +const char pstrUsagePower [] PROGMEM = "Pwr"; +const char pstrUsageShift [] PROGMEM = "Shift"; +const char pstrUsageDoNotDisturb [] PROGMEM = "DND"; +const char pstrUsageMute [] PROGMEM = "Mute"; +const char pstrUsageToneEnable [] PROGMEM = "Tone Enbl"; +const char pstrUsageHighCutFilter [] PROGMEM = "High Cut Fltr"; +const char pstrUsageLowCutFilter [] PROGMEM = "Low Cut Fltr"; +const char pstrUsageEqualizerEnable [] PROGMEM = "Eq Enbl"; +const char pstrUsageSoundFieldOn [] PROGMEM = "Sound Field On"; +const char pstrUsageSurroundOn [] PROGMEM = "Surround On"; +const char pstrUsageRepeat [] PROGMEM = "Repeat"; +const char pstrUsageStereo [] PROGMEM = "Stereo"; +const char pstrUsageSamplingRateDetect [] PROGMEM = "Smpl Rate Detect"; +const char pstrUsageSpinning [] PROGMEM = "Spinning"; +const char pstrUsageCAV [] PROGMEM = "CAV"; +const char pstrUsageCLV [] PROGMEM = "CLV"; +const char pstrUsageRecordingFormatDetect [] PROGMEM = "Rec Format Detect"; +const char pstrUsageOffHook [] PROGMEM = "Off Hook"; +const char pstrUsageRing [] PROGMEM = "Ring"; +const char pstrUsageMessageWaiting [] PROGMEM = "Msg Wait"; +const char pstrUsageDataMode [] PROGMEM = "Data Mode"; +const char pstrUsageBatteryOperation [] PROGMEM = "Bat Op"; +const char pstrUsageBatteryOK [] PROGMEM = "Bat OK"; +const char pstrUsageBatteryLow [] PROGMEM = "Bat Low"; +const char pstrUsageSpeaker [] PROGMEM = "Speaker"; +const char pstrUsageHeadSet [] PROGMEM = "Head Set"; +const char pstrUsageHold [] PROGMEM = "Hold"; +const char pstrUsageMicrophone [] PROGMEM = "Mic"; +const char pstrUsageCoverage [] PROGMEM = "Coverage"; +const char pstrUsageNightMode [] PROGMEM = "Night Mode"; +const char pstrUsageSendCalls [] PROGMEM = "Send Calls"; +const char pstrUsageCallPickup [] PROGMEM = "Call Pickup"; +const char pstrUsageConference [] PROGMEM = "Conf"; +const char pstrUsageStandBy [] PROGMEM = "Stand-by"; +const char pstrUsageCameraOn [] PROGMEM = "Cam On"; +const char pstrUsageCameraOff [] PROGMEM = "Cam Off"; +const char pstrUsageOnLine [] PROGMEM = "On-Line"; +const char pstrUsageOffLine [] PROGMEM = "Off-Line"; +const char pstrUsageBusy [] PROGMEM = "Busy"; +const char pstrUsageReady [] PROGMEM = "Ready"; +const char pstrUsagePaperOut [] PROGMEM = "Paper Out"; +const char pstrUsagePaperJam [] PROGMEM = "Paper Jam"; +const char pstrUsageRemote [] PROGMEM = "Remote"; +const char pstrUsageForward [] PROGMEM = "Fwd"; +const char pstrUsageReverse [] PROGMEM = "Rev"; +const char pstrUsageStop [] PROGMEM = "Stop"; +const char pstrUsageRewind [] PROGMEM = "Rewind"; +const char pstrUsageFastForward [] PROGMEM = "Fast Fwd"; +const char pstrUsagePlay [] PROGMEM = "Play"; +const char pstrUsagePause [] PROGMEM = "Pause"; +const char pstrUsageRecord [] PROGMEM = "Rec"; +const char pstrUsageError [] PROGMEM = "Error"; +const char pstrUsageSelectedIndicator [] PROGMEM = "Usage Sel Ind"; +const char pstrUsageInUseIndicator [] PROGMEM = "Usage In Use Ind"; +const char pstrUsageMultiModeIndicator [] PROGMEM = "Usage Multi Mode Ind"; +const char pstrUsageIndicatorOn [] PROGMEM = "Ind On"; +const char pstrUsageIndicatorFlash [] PROGMEM = "Ind Flash"; +const char pstrUsageIndicatorSlowBlink [] PROGMEM = "Ind Slow Blk"; +const char pstrUsageIndicatorFastBlink [] PROGMEM = "Ind Fast Blk"; +const char pstrUsageIndicatorOff [] PROGMEM = "Ind Off"; +const char pstrUsageFlashOnTime [] PROGMEM = "Flash On Time"; +const char pstrUsageSlowBlinkOnTime [] PROGMEM = "Slow Blk On Time"; +const char pstrUsageSlowBlinkOffTime [] PROGMEM = "Slow Blk Off Time"; +const char pstrUsageFastBlinkOnTime [] PROGMEM = "Fast Blk On Time"; +const char pstrUsageFastBlinkOffTime [] PROGMEM = "Fast Blk Off Time"; +const char pstrUsageIndicatorColor [] PROGMEM = "Usage Ind Color"; +const char pstrUsageIndicatorRed [] PROGMEM = "Ind Red"; +const char pstrUsageIndicatorGreen [] PROGMEM = "Ind Green"; +const char pstrUsageIndicatorAmber [] PROGMEM = "Ind Amber"; +const char pstrUsageGenericIndicator [] PROGMEM = "Gen Ind"; +const char pstrUsageSystemSuspend [] PROGMEM = "Sys Suspend"; +const char pstrUsageExternalPowerConnected [] PROGMEM = "Ext Pwr Conn"; + +// Telephony Usage Page +const char pstrUsagePhone [] PROGMEM = "Phone"; +const char pstrUsageAnsweringMachine [] PROGMEM = "Answ Mach"; +const char pstrUsageMessageControls [] PROGMEM = "Msg Ctrls"; +const char pstrUsageHandset [] PROGMEM = "Handset"; +const char pstrUsageHeadset [] PROGMEM = "Headset"; +const char pstrUsageTelephonyKeyPad [] PROGMEM = "Tel Key Pad"; +const char pstrUsageProgrammableButton [] PROGMEM = "Prog Button"; +const char pstrUsageHookSwitch [] PROGMEM = "Hook Sw"; +const char pstrUsageFlash [] PROGMEM = "Flash"; +const char pstrUsageFeature [] PROGMEM = "Feature"; +//const char pstrUsageHold [] PROGMEM = "Hold"; +const char pstrUsageRedial [] PROGMEM = "Redial"; +const char pstrUsageTransfer [] PROGMEM = "Transfer"; +const char pstrUsageDrop [] PROGMEM = "Drop"; +const char pstrUsagePark [] PROGMEM = "Park"; +const char pstrUsageForwardCalls [] PROGMEM = "Fwd Calls"; +const char pstrUsageAlternateFunction [] PROGMEM = "Alt Func"; +const char pstrUsageLine [] PROGMEM = "Line"; +const char pstrUsageSpeakerPhone [] PROGMEM = "Spk Phone"; +//const char pstrUsageConference [] PROGMEM = "Conference"; +const char pstrUsageRingEnable [] PROGMEM = "Ring Enbl"; +const char pstrUsageRingSelect [] PROGMEM = "Ring Sel"; +const char pstrUsagePhoneMute [] PROGMEM = "Phone Mute"; +const char pstrUsageCallerID [] PROGMEM = "Caller ID"; +const char pstrUsageSend [] PROGMEM = "Send"; +const char pstrUsageSpeedDial [] PROGMEM = "Speed Dial"; +const char pstrUsageStoreNumber [] PROGMEM = "Store Num"; +const char pstrUsageRecallNumber [] PROGMEM = "Recall Num"; +const char pstrUsagePhoneDirectory [] PROGMEM = "Phone Dir"; +const char pstrUsageVoiceMail [] PROGMEM = "Voice Mail"; +const char pstrUsageScreenCalls [] PROGMEM = "Screen Calls"; +//const char pstrUsageDoNotDisturb [] PROGMEM = "Do Not Disturb"; +const char pstrUsageMessage [] PROGMEM = "Msg"; +const char pstrUsageAnswerOnOff [] PROGMEM = "Answer On/Off"; +const char pstrUsageInsideDialTone [] PROGMEM = "Inside Dial Tone"; +const char pstrUsageOutsideDialTone [] PROGMEM = "Outside Dial Tone"; +const char pstrUsageInsideRingTone [] PROGMEM = "Inside Ring Tone"; +const char pstrUsageOutsideRingTone [] PROGMEM = "Outside Ring Tone"; +const char pstrUsagePriorityRingTone [] PROGMEM = "Prior Ring Tone"; +const char pstrUsageInsideRingback [] PROGMEM = "Inside Ringback"; +const char pstrUsagePriorityRingback [] PROGMEM = "Priority Ringback"; +const char pstrUsageLineBusyTone [] PROGMEM = "Ln Busy Tone"; +const char pstrUsageReorderTone [] PROGMEM = "Reorder Tone"; +const char pstrUsageCallWaitingTone [] PROGMEM = "Call Wait Tone"; +const char pstrUsageConfirmationTone1 [] PROGMEM = "Cnfrm Tone1"; +const char pstrUsageConfirmationTone2 [] PROGMEM = "Cnfrm Tone2"; +const char pstrUsageTonesOff [] PROGMEM = "Tones Off"; +const char pstrUsageOutsideRingback [] PROGMEM = "Outside Ringback"; +const char pstrUsageRinger [] PROGMEM = "Ringer"; +const char pstrUsagePhoneKey0 [] PROGMEM = "0"; +const char pstrUsagePhoneKey1 [] PROGMEM = "1"; +const char pstrUsagePhoneKey2 [] PROGMEM = "2"; +const char pstrUsagePhoneKey3 [] PROGMEM = "3"; +const char pstrUsagePhoneKey4 [] PROGMEM = "4"; +const char pstrUsagePhoneKey5 [] PROGMEM = "5"; +const char pstrUsagePhoneKey6 [] PROGMEM = "6"; +const char pstrUsagePhoneKey7 [] PROGMEM = "7"; +const char pstrUsagePhoneKey8 [] PROGMEM = "8"; +const char pstrUsagePhoneKey9 [] PROGMEM = "9"; +const char pstrUsagePhoneKeyStar [] PROGMEM = "*"; +const char pstrUsagePhoneKeyPound [] PROGMEM = "#"; +const char pstrUsagePhoneKeyA [] PROGMEM = "A"; +const char pstrUsagePhoneKeyB [] PROGMEM = "B"; +const char pstrUsagePhoneKeyC [] PROGMEM = "C"; +const char pstrUsagePhoneKeyD [] PROGMEM = "D"; + +// Consumer Usage Page +const char pstrUsageConsumerControl [] PROGMEM = "Consumer Ctrl"; +const char pstrUsageNumericKeyPad [] PROGMEM = "Num Key Pad"; +//const char pstrUsageProgrammableButton [] PROGMEM = "Prog Btn"; +//const char pstrUsageMicrophone [] PROGMEM = "Mic"; +const char pstrUsageHeadphone [] PROGMEM = "Headphone"; +const char pstrUsageGraphicEqualizer [] PROGMEM = "Graph Eq"; +const char pstrUsagePlus10 [] PROGMEM = "+10"; +const char pstrUsagePlus100 [] PROGMEM = "+100"; +const char pstrUsageAMPM [] PROGMEM = "AM/PM"; +//const char pstrUsagePower [] PROGMEM = "Pwr"; +const char pstrUsageReset [] PROGMEM = "Reset"; +const char pstrUsageSleep [] PROGMEM = "Sleep"; +const char pstrUsageSleepAfter [] PROGMEM = "Sleep After"; +const char pstrUsageSleepMode [] PROGMEM = "Sleep Mode"; +const char pstrUsageIllumination [] PROGMEM = "Illumin"; +const char pstrUsageFunctionButtons [] PROGMEM = "Func Btns"; +const char pstrUsageMenu [] PROGMEM = "Menu"; +const char pstrUsageMenuPick [] PROGMEM = "Menu Pick"; +const char pstrUsageMenuUp [] PROGMEM = "Menu Up"; +const char pstrUsageMenuDown [] PROGMEM = "Menu Down"; +const char pstrUsageMenuLeft [] PROGMEM = "Menu Left"; +const char pstrUsageMenuRight [] PROGMEM = "Menu Right"; +const char pstrUsageMenuEscape [] PROGMEM = "Menu Esc"; +const char pstrUsageMenuValueIncrease [] PROGMEM = "Menu Val Inc"; +const char pstrUsageMenuValueDecrease [] PROGMEM = "Menu Val Dec"; +const char pstrUsageDataOnScreen [] PROGMEM = "Data On Scr"; +const char pstrUsageClosedCaption [] PROGMEM = "Closed Cptn"; +const char pstrUsageClosedCaptionSelect [] PROGMEM = "Closed Cptn Sel"; +const char pstrUsageVCRTV [] PROGMEM = "VCR/TV"; +const char pstrUsageBroadcastMode [] PROGMEM = "Brdcast Mode"; +const char pstrUsageSnapshot [] PROGMEM = "Snapshot"; +const char pstrUsageStill [] PROGMEM = "Still"; +const char pstrUsageSelection [] PROGMEM = "Sel"; +const char pstrUsageAssignSelection [] PROGMEM = "Assign Sel"; +const char pstrUsageModeStep [] PROGMEM = "Mode Step"; +const char pstrUsageRecallLast [] PROGMEM = "Recall Last"; +const char pstrUsageEnterChannel [] PROGMEM = "Entr Channel"; +const char pstrUsageOrderMovie [] PROGMEM = "Ord Movie"; +const char pstrUsageChannel [] PROGMEM = "Channel"; +const char pstrUsageMediaSelection [] PROGMEM = "Med Sel"; +const char pstrUsageMediaSelectComputer [] PROGMEM = "Med Sel Comp"; +const char pstrUsageMediaSelectTV [] PROGMEM = "Med Sel TV"; +const char pstrUsageMediaSelectWWW [] PROGMEM = "Med Sel WWW"; +const char pstrUsageMediaSelectDVD [] PROGMEM = "Med Sel DVD"; +const char pstrUsageMediaSelectTelephone [] PROGMEM = "Med Sel Tel"; +const char pstrUsageMediaSelectProgramGuide [] PROGMEM = "Med Sel PG"; +const char pstrUsageMediaSelectVideoPhone [] PROGMEM = "Med Sel Vid"; +const char pstrUsageMediaSelectGames [] PROGMEM = "Med Sel Games"; +const char pstrUsageMediaSelectMessages [] PROGMEM = "Med Sel Msg"; +const char pstrUsageMediaSelectCD [] PROGMEM = "Med Sel CD"; +const char pstrUsageMediaSelectVCR [] PROGMEM = "Med Sel VCR"; +const char pstrUsageMediaSelectTuner [] PROGMEM = "Med Sel Tuner"; +const char pstrUsageQuit [] PROGMEM = "Quit"; +const char pstrUsageHelp [] PROGMEM = "Help"; +const char pstrUsageMediaSelectTape [] PROGMEM = "Med Sel Tape"; +const char pstrUsageMediaSelectCable [] PROGMEM = "Med Sel Cbl"; +const char pstrUsageMediaSelectSatellite [] PROGMEM = "Med Sel Sat"; +const char pstrUsageMediaSelectSecurity [] PROGMEM = "Med Sel Secur"; +const char pstrUsageMediaSelectHome [] PROGMEM = "Med Sel Home"; +const char pstrUsageMediaSelectCall [] PROGMEM = "Med Sel Call"; +const char pstrUsageChannelIncrement [] PROGMEM = "Ch Inc"; +const char pstrUsageChannelDecrement [] PROGMEM = "Ch Dec"; +const char pstrUsageMediaSelectSAP [] PROGMEM = "Med Sel SAP"; +const char pstrUsageVCRPlus [] PROGMEM = "VCR+"; +const char pstrUsageOnce [] PROGMEM = "Once"; +const char pstrUsageDaily [] PROGMEM = "Daily"; +const char pstrUsageWeekly [] PROGMEM = "Weekly"; +const char pstrUsageMonthly [] PROGMEM = "Monthly"; +//const char pstrUsagePlay [] PROGMEM = "Play"; +//const char pstrUsagePause [] PROGMEM = "Pause"; +//const char pstrUsageRecord [] PROGMEM = "Rec"; +//const char pstrUsageFastForward [] PROGMEM = "FF"; +//const char pstrUsageRewind [] PROGMEM = "Rewind"; +const char pstrUsageScanNextTrack [] PROGMEM = "Next Track"; +const char pstrUsageScanPreviousTrack [] PROGMEM = "Prev Track"; +//const char pstrUsageStop [] PROGMEM = "Stop"; +const char pstrUsageEject [] PROGMEM = "Eject"; +const char pstrUsageRandomPlay [] PROGMEM = "Random"; +const char pstrUsageSelectDisk [] PROGMEM = "Sel Disk"; +const char pstrUsageEnterDisk [] PROGMEM = "Ent Disk"; +//const char pstrUsageRepeat [] PROGMEM = "Repeat"; +const char pstrUsageTracking [] PROGMEM = "Tracking"; +const char pstrUsageTrackNormal [] PROGMEM = "Trk Norm"; +const char pstrUsageSlowTracking [] PROGMEM = "Slow Trk"; +const char pstrUsageFrameForward [] PROGMEM = "Frm Fwd"; +const char pstrUsageFrameBackwards [] PROGMEM = "Frm Back"; +const char pstrUsageMark [] PROGMEM = "Mark"; +const char pstrUsageClearMark [] PROGMEM = "Clr Mark"; +const char pstrUsageRepeatFromMark [] PROGMEM = "Rpt Mark"; +const char pstrUsageReturnToMark [] PROGMEM = "Ret to Mark"; +const char pstrUsageSearchMarkForward [] PROGMEM = "Search Mark Fwd"; +const char pstrUsageSearchMarkBackwards [] PROGMEM = "Search Mark Back"; +const char pstrUsageCounterReset [] PROGMEM = "Counter Reset"; +const char pstrUsageShowCounter [] PROGMEM = "Show Counter"; +const char pstrUsageTrackingIncrement [] PROGMEM = "Track Inc"; +const char pstrUsageTrackingDecrement [] PROGMEM = "Track Dec"; +const char pstrUsageStopEject [] PROGMEM = "Stop/Eject"; +const char pstrUsagePlayPause [] PROGMEM = "Play/Pause"; +const char pstrUsagePlaySkip [] PROGMEM = "Play/Skip"; +const char pstrUsageVolume [] PROGMEM = "Vol"; +const char pstrUsageBalance [] PROGMEM = "Balance"; +//const char pstrUsageMute [] PROGMEM = "Mute"; +const char pstrUsageBass [] PROGMEM = "Bass"; +const char pstrUsageTreble [] PROGMEM = "Treble"; +const char pstrUsageBassBoost [] PROGMEM = "Bass Boost"; +const char pstrUsageSurroundMode [] PROGMEM = "Surround"; +const char pstrUsageLoudness [] PROGMEM = "Loud"; +const char pstrUsageMPX [] PROGMEM = "MPX"; +const char pstrUsageVolumeIncrement [] PROGMEM = "Vol Inc"; +const char pstrUsageVolumeDecrement [] PROGMEM = "Vol Dec"; +const char pstrUsageSpeedSelect [] PROGMEM = "Speed"; +const char pstrUsagePlaybackSpeed [] PROGMEM = "Play Speed"; +const char pstrUsageStandardPlay [] PROGMEM = "Std Play"; +const char pstrUsageLongPlay [] PROGMEM = "Long Play"; +const char pstrUsageExtendedPlay [] PROGMEM = "Ext Play"; +const char pstrUsageSlow [] PROGMEM = "Slow"; +const char pstrUsageFanEnable [] PROGMEM = "Fan Enbl"; +const char pstrUsageFanSpeed [] PROGMEM = "Fan Speed"; +const char pstrUsageLightEnable [] PROGMEM = "Light Enbl"; +const char pstrUsageLightIlluminationLevel [] PROGMEM = "Light Illum Lev"; +const char pstrUsageClimateControlEnable [] PROGMEM = "Climate Enbl"; +const char pstrUsageRoomTemperature [] PROGMEM = "Room Temp"; +const char pstrUsageSecurityEnable [] PROGMEM = "Secur Enbl"; +const char pstrUsageFireAlarm [] PROGMEM = "Fire Alm"; +const char pstrUsagePoliceAlarm [] PROGMEM = "Police Alm"; +const char pstrUsageProximity [] PROGMEM = "Prox"; +const char pstrUsageMotion [] PROGMEM = "Motion"; +const char pstrUsageDuresAlarm [] PROGMEM = "Dures Alm"; +const char pstrUsageHoldupAlarm [] PROGMEM = "Holdup Alm"; +const char pstrUsageMedicalAlarm [] PROGMEM = "Med Alm"; +const char pstrUsageBalanceRight [] PROGMEM = "Balance Right"; +const char pstrUsageBalanceLeft [] PROGMEM = "Balance Left"; +const char pstrUsageBassIncrement [] PROGMEM = "Bass Inc"; +const char pstrUsageBassDecrement [] PROGMEM = "Bass Dec"; +const char pstrUsageTrebleIncrement [] PROGMEM = "Treble Inc"; +const char pstrUsageTrebleDecrement [] PROGMEM = "Treble Dec"; +const char pstrUsageSpeakerSystem [] PROGMEM = "Spk Sys"; +const char pstrUsageChannelLeft [] PROGMEM = "Ch Left"; +const char pstrUsageChannelRight [] PROGMEM = "Ch Right"; +const char pstrUsageChannelCenter [] PROGMEM = "Ch Center"; +const char pstrUsageChannelFront [] PROGMEM = "Ch Front"; +const char pstrUsageChannelCenterFront [] PROGMEM = "Ch Cntr Front"; +const char pstrUsageChannelSide [] PROGMEM = "Ch Side"; +const char pstrUsageChannelSurround [] PROGMEM = "Ch Surround"; +const char pstrUsageChannelLowFreqEnhancement [] PROGMEM = "Ch Low Freq Enh"; +const char pstrUsageChannelTop [] PROGMEM = "Ch Top"; +const char pstrUsageChannelUnknown [] PROGMEM = "Ch Unk"; +const char pstrUsageSubChannel [] PROGMEM = "Sub-ch"; +const char pstrUsageSubChannelIncrement [] PROGMEM = "Sub-ch Inc"; +const char pstrUsageSubChannelDecrement [] PROGMEM = "Sub-ch Dec"; +const char pstrUsageAlternateAudioIncrement [] PROGMEM = "Alt Aud Inc"; +const char pstrUsageAlternateAudioDecrement [] PROGMEM = "Alt Aud Dec"; +const char pstrUsageApplicationLaunchButtons [] PROGMEM = "App Launch Btns"; +const char pstrUsageALLaunchButtonConfigTool [] PROGMEM = "AL Launch Conf Tl"; +const char pstrUsageALProgrammableButton [] PROGMEM = "AL Pgm Btn"; +const char pstrUsageALConsumerControlConfig [] PROGMEM = "AL Cons Ctrl Cfg"; +const char pstrUsageALWordProcessor [] PROGMEM = "AL Word Proc"; +const char pstrUsageALTextEditor [] PROGMEM = "AL Txt Edtr"; +const char pstrUsageALSpreadsheet [] PROGMEM = "AL Sprdsheet"; +const char pstrUsageALGraphicsEditor [] PROGMEM = "AL Graph Edtr"; +const char pstrUsageALPresentationApp [] PROGMEM = "AL Present App"; +const char pstrUsageALDatabaseApp [] PROGMEM = "AL DB App"; +const char pstrUsageALEmailReader [] PROGMEM = "AL E-mail Rdr"; +const char pstrUsageALNewsreader [] PROGMEM = "AL Newsrdr"; +const char pstrUsageALVoicemail [] PROGMEM = "AL Voicemail"; +const char pstrUsageALContactsAddressBook [] PROGMEM = "AL Addr Book"; +const char pstrUsageALCalendarSchedule [] PROGMEM = "AL Clndr/Schdlr"; +const char pstrUsageALTaskProjectManager [] PROGMEM = "AL Task/Prj Mgr"; +const char pstrUsageALLogJournalTimecard [] PROGMEM = "AL Log/Jrnl/Tmcrd"; +const char pstrUsageALCheckbookFinance [] PROGMEM = "AL Chckbook/Fin"; +const char pstrUsageALCalculator [] PROGMEM = "AL Calc"; +const char pstrUsageALAVCapturePlayback [] PROGMEM = "AL A/V Capt/Play"; +const char pstrUsageALLocalMachineBrowser [] PROGMEM = "AL Loc Mach Brow"; +const char pstrUsageALLANWANBrow [] PROGMEM = "AL LAN/WAN Brow"; +const char pstrUsageALInternetBrowser [] PROGMEM = "AL I-net Brow"; +const char pstrUsageALRemoteNetISPConnect [] PROGMEM = "AL Rem Net Con"; +const char pstrUsageALNetworkConference [] PROGMEM = "AL Net Conf"; +const char pstrUsageALNetworkChat [] PROGMEM = "AL Net Chat"; +const char pstrUsageALTelephonyDialer [] PROGMEM = "AL Tel/Dial"; +const char pstrUsageALLogon [] PROGMEM = "AL Logon"; +const char pstrUsageALLogoff [] PROGMEM = "AL Logoff"; +const char pstrUsageALLogonLogoff [] PROGMEM = "AL Logon/Logoff"; +const char pstrUsageALTermLockScrSav [] PROGMEM = "AL Term Lock/Scr Sav"; +const char pstrUsageALControlPannel [] PROGMEM = "AL Ctrl Pan"; +const char pstrUsageALCommandLineProcessorRun [] PROGMEM = "AL Cmd/Run"; +const char pstrUsageALProcessTaskManager [] PROGMEM = "AL Task Mgr"; +const char pstrUsageALSelectTaskApplication [] PROGMEM = "AL Sel App"; +const char pstrUsageALNextTaskApplication [] PROGMEM = "AL Next App"; +const char pstrUsageALPreviousTaskApplication [] PROGMEM = "AL Prev App"; +const char pstrUsageALPreemptiveHaltTaskApp [] PROGMEM = "AL Prmpt Halt App"; +const char pstrUsageALIntegratedHelpCenter [] PROGMEM = "AL Hlp Cntr"; +const char pstrUsageALDocuments [] PROGMEM = "AL Docs"; +const char pstrUsageALThesaurus [] PROGMEM = "AL Thsrs"; +const char pstrUsageALDictionary [] PROGMEM = "AL Dict"; +const char pstrUsageALDesktop [] PROGMEM = "AL Desktop"; +const char pstrUsageALSpellCheck [] PROGMEM = "AL Spell Chk"; +const char pstrUsageALGrammarCheck [] PROGMEM = "AL Gram Chk"; +const char pstrUsageALWirelessStatus [] PROGMEM = "AL Wireless Sts"; +const char pstrUsageALKeyboardLayout [] PROGMEM = "AL Kbd Layout"; +const char pstrUsageALVirusProtection [] PROGMEM = "AL Vir Protect"; +const char pstrUsageALEncryption [] PROGMEM = "AL Encrypt"; +const char pstrUsageALScreenSaver [] PROGMEM = "AL Scr Sav"; +const char pstrUsageALAlarms [] PROGMEM = "AL Alarms"; +const char pstrUsageALClock [] PROGMEM = "AL Clock"; +const char pstrUsageALFileBrowser [] PROGMEM = "AL File Brow"; +const char pstrUsageALPowerStatus [] PROGMEM = "AL Pwr Sts"; +const char pstrUsageALImageBrowser [] PROGMEM = "AL Img Brow"; +const char pstrUsageALAudioBrowser [] PROGMEM = "AL Aud Brow"; +const char pstrUsageALMovieBrowser [] PROGMEM = "AL Mov Brow"; +const char pstrUsageALDigitalRightsManager [] PROGMEM = "AL Dig Rights Mgr"; +const char pstrUsageALDigitalWallet [] PROGMEM = "AL Dig Wallet"; +const char pstrUsageALInstantMessaging [] PROGMEM = "AL Inst Msg"; +const char pstrUsageALOEMFeaturesBrowser [] PROGMEM = "AL OEM Tips Brow"; +const char pstrUsageALOEMHelp [] PROGMEM = "AL OEM Hlp"; +const char pstrUsageALOnlineCommunity [] PROGMEM = "AL Online Com"; +const char pstrUsageALEntertainmentContentBrow [] PROGMEM = "AL Ent Cont Brow"; +const char pstrUsageALOnlineShoppingBrowser [] PROGMEM = "AL Online Shop Brow"; +const char pstrUsageALSmartCardInfoHelp [] PROGMEM = "AL SmartCard Inf"; +const char pstrUsageALMarketMonitorFinBrowser [] PROGMEM = "AL Market Brow"; +const char pstrUsageALCustomCorpNewsBrowser [] PROGMEM = "AL Cust Corp News Brow"; +const char pstrUsageALOnlineActivityBrowser [] PROGMEM = "AL Online Act Brow"; +const char pstrUsageALResearchSearchBrowser [] PROGMEM = "AL Search Brow"; +const char pstrUsageALAudioPlayer [] PROGMEM = "AL Aud Player"; +const char pstrUsageGenericGUIAppControls [] PROGMEM = "Gen GUI App Ctrl"; +const char pstrUsageACNew [] PROGMEM = "AC New"; +const char pstrUsageACOpen [] PROGMEM = "AC Open"; +const char pstrUsageACClose [] PROGMEM = "AC Close"; +const char pstrUsageACExit [] PROGMEM = "AC Exit"; +const char pstrUsageACMaximize [] PROGMEM = "AC Max"; +const char pstrUsageACMinimize [] PROGMEM = "AC Min"; +const char pstrUsageACSave [] PROGMEM = "AC Save"; +const char pstrUsageACPrint [] PROGMEM = "AC Print"; +const char pstrUsageACProperties [] PROGMEM = "AC Prop"; +const char pstrUsageACUndo [] PROGMEM = "AC Undo"; +const char pstrUsageACCopy [] PROGMEM = "AC Copy"; +const char pstrUsageACCut [] PROGMEM = "AC Cut"; +const char pstrUsageACPaste [] PROGMEM = "AC Paste"; +const char pstrUsageACSelectAll [] PROGMEM = "AC Sel All"; +const char pstrUsageACFind [] PROGMEM = "AC Find"; +const char pstrUsageACFindAndReplace [] PROGMEM = "AC Find/Replace"; +const char pstrUsageACSearch [] PROGMEM = "AC Search"; +const char pstrUsageACGoto [] PROGMEM = "AC Goto"; +const char pstrUsageACHome [] PROGMEM = "AC Home"; +const char pstrUsageACBack [] PROGMEM = "AC Back"; +const char pstrUsageACForward [] PROGMEM = "AC Fwd"; +const char pstrUsageACStop [] PROGMEM = "AC Stop"; +const char pstrUsageACRefresh [] PROGMEM = "AC Refresh"; +const char pstrUsageACPreviousLink [] PROGMEM = "AC Prev Link"; +const char pstrUsageACNextLink [] PROGMEM = "AC Next Link"; +const char pstrUsageACBookmarks [] PROGMEM = "AC Bkmarks"; +const char pstrUsageACHistory [] PROGMEM = "AC Hist"; +const char pstrUsageACSubscriptions [] PROGMEM = "AC Subscr"; +const char pstrUsageACZoomIn [] PROGMEM = "AC Zoom In"; +const char pstrUsageACZoomOut [] PROGMEM = "AC Zoom Out"; +const char pstrUsageACZoom [] PROGMEM = "AC Zoom"; +const char pstrUsageACFullScreenView [] PROGMEM = "AC Full Scr"; +const char pstrUsageACNormalView [] PROGMEM = "AC Norm View"; +const char pstrUsageACViewToggle [] PROGMEM = "AC View Tgl"; +const char pstrUsageACScrollUp [] PROGMEM = "AC Scroll Up"; +const char pstrUsageACScrollDown [] PROGMEM = "AC Scroll Down"; +const char pstrUsageACScroll [] PROGMEM = "AC Scroll"; +const char pstrUsageACPanLeft [] PROGMEM = "AC Pan Left"; +const char pstrUsageACPanRight [] PROGMEM = "AC Pan Right"; +const char pstrUsageACPan [] PROGMEM = "AC Pan"; +const char pstrUsageACNewWindow [] PROGMEM = "AC New Wnd"; +const char pstrUsageACTileHoriz [] PROGMEM = "AC Tile Horiz"; +const char pstrUsageACTileVert [] PROGMEM = "AC Tile Vert"; +const char pstrUsageACFormat [] PROGMEM = "AC Frmt"; +const char pstrUsageACEdit [] PROGMEM = "AC Edit"; +const char pstrUsageACBold [] PROGMEM = "AC Bold"; +const char pstrUsageACItalics [] PROGMEM = "AC Ital"; +const char pstrUsageACUnderline [] PROGMEM = "AC Under"; +const char pstrUsageACStrikethrough [] PROGMEM = "AC Strike"; +const char pstrUsageACSubscript [] PROGMEM = "AC Sub"; +const char pstrUsageACSuperscript [] PROGMEM = "AC Super"; +const char pstrUsageACAllCaps [] PROGMEM = "AC All Caps"; +const char pstrUsageACRotate [] PROGMEM = "AC Rotate"; +const char pstrUsageACResize [] PROGMEM = "AC Resize"; +const char pstrUsageACFlipHorizontal [] PROGMEM = "AC Flp H"; +const char pstrUsageACFlipVertical [] PROGMEM = "AC Flp V"; +const char pstrUsageACMirrorHorizontal [] PROGMEM = "AC Mir H"; +const char pstrUsageACMirrorVertical [] PROGMEM = "AC Mir V"; +const char pstrUsageACFontSelect [] PROGMEM = "AC Fnt Sel"; +const char pstrUsageACFontColor [] PROGMEM = "AC Fnt Clr"; +const char pstrUsageACFontSize [] PROGMEM = "AC Fnt Size"; +const char pstrUsageACJustifyLeft [] PROGMEM = "AC Just Left"; +const char pstrUsageACJustifyCenterH [] PROGMEM = "AC Just Cent H"; +const char pstrUsageACJustifyRight [] PROGMEM = "AC Just Right"; +const char pstrUsageACJustifyBlockH [] PROGMEM = "AC Just Block H"; +const char pstrUsageACJustifyTop [] PROGMEM = "AC Just Top"; +const char pstrUsageACJustifyCenterV [] PROGMEM = "AC Just Cent V"; +const char pstrUsageACJustifyBottom [] PROGMEM = "AC Just Bot"; +const char pstrUsageACJustifyBlockV [] PROGMEM = "AC Just Block V"; +const char pstrUsageACIndentDecrease [] PROGMEM = "AC Indent Dec"; +const char pstrUsageACIndentIncrease [] PROGMEM = "AC Indent Inc"; +const char pstrUsageACNumberedList [] PROGMEM = "AC Num List"; +const char pstrUsageACRestartNumbering [] PROGMEM = "AC Res Num"; +const char pstrUsageACBulletedList [] PROGMEM = "AC Blt List"; +const char pstrUsageACPromote [] PROGMEM = "AC Promote"; +const char pstrUsageACDemote [] PROGMEM = "AC Demote"; +const char pstrUsageACYes [] PROGMEM = "AC Yes"; +const char pstrUsageACNo [] PROGMEM = "AC No"; +const char pstrUsageACCancel [] PROGMEM = "AC Cancel"; +const char pstrUsageACCatalog [] PROGMEM = "AC Ctlg"; +const char pstrUsageACBuyChkout [] PROGMEM = "AC Buy"; +const char pstrUsageACAddToCart [] PROGMEM = "AC Add2Cart"; +const char pstrUsageACExpand [] PROGMEM = "AC Xpnd"; +const char pstrUsageACExpandAll [] PROGMEM = "AC Xpand All"; +const char pstrUsageACCollapse [] PROGMEM = "AC Collapse"; +const char pstrUsageACCollapseAll [] PROGMEM = "AC Collapse All"; +const char pstrUsageACPrintPreview [] PROGMEM = "AC Prn Prevw"; +const char pstrUsageACPasteSpecial [] PROGMEM = "AC Paste Spec"; +const char pstrUsageACInsertMode [] PROGMEM = "AC Ins Mode"; +const char pstrUsageACDelete [] PROGMEM = "AC Del"; +const char pstrUsageACLock [] PROGMEM = "AC Lock"; +const char pstrUsageACUnlock [] PROGMEM = "AC Unlock"; +const char pstrUsageACProtect [] PROGMEM = "AC Prot"; +const char pstrUsageACUnprotect [] PROGMEM = "AC Unprot"; +const char pstrUsageACAttachComment [] PROGMEM = "AC Attach Cmnt"; +const char pstrUsageACDeleteComment [] PROGMEM = "AC Del Cmnt"; +const char pstrUsageACViewComment [] PROGMEM = "AC View Cmnt"; +const char pstrUsageACSelectWord [] PROGMEM = "AC Sel Word"; +const char pstrUsageACSelectSentence [] PROGMEM = "AC Sel Sntc"; +const char pstrUsageACSelectParagraph [] PROGMEM = "AC Sel Para"; +const char pstrUsageACSelectColumn [] PROGMEM = "AC Sel Col"; +const char pstrUsageACSelectRow [] PROGMEM = "AC Sel Row"; +const char pstrUsageACSelectTable [] PROGMEM = "AC Sel Tbl"; +const char pstrUsageACSelectObject [] PROGMEM = "AC Sel Obj"; +const char pstrUsageACRedoRepeat [] PROGMEM = "AC Redo"; +const char pstrUsageACSort [] PROGMEM = "AC Sort"; +const char pstrUsageACSortAscending [] PROGMEM = "AC Sort Asc"; +const char pstrUsageACSortDescending [] PROGMEM = "AC Sort Desc"; +const char pstrUsageACFilter [] PROGMEM = "AC Filt"; +const char pstrUsageACSetClock [] PROGMEM = "AC Set Clk"; +const char pstrUsageACViewClock [] PROGMEM = "AC View Clk"; +const char pstrUsageACSelectTimeZone [] PROGMEM = "AC Sel Time Z"; +const char pstrUsageACEditTimeZone [] PROGMEM = "AC Edt Time Z"; +const char pstrUsageACSetAlarm [] PROGMEM = "AC Set Alm"; +const char pstrUsageACClearAlarm [] PROGMEM = "AC Clr Alm"; +const char pstrUsageACSnoozeAlarm [] PROGMEM = "AC Snz Alm"; +const char pstrUsageACResetAlarm [] PROGMEM = "AC Rst Alm"; +const char pstrUsageACSyncronize [] PROGMEM = "AC Sync"; +const char pstrUsageACSendReceive [] PROGMEM = "AC Snd/Rcv"; +const char pstrUsageACSendTo [] PROGMEM = "AC Snd To"; +const char pstrUsageACReply [] PROGMEM = "AC Reply"; +const char pstrUsageACReplyAll [] PROGMEM = "AC Reply All"; +const char pstrUsageACForwardMessage [] PROGMEM = "AC Fwd Msg"; +const char pstrUsageACSend [] PROGMEM = "AC Snd"; +const char pstrUsageACAttachFile [] PROGMEM = "AC Att File"; +const char pstrUsageACUpload [] PROGMEM = "AC Upld"; +const char pstrUsageACDownload [] PROGMEM = "AC Dnld"; +const char pstrUsageACSetBorders [] PROGMEM = "AC Set Brd"; +const char pstrUsageACInsertRow [] PROGMEM = "AC Ins Row"; +const char pstrUsageACInsertColumn [] PROGMEM = "AC Ins Col"; +const char pstrUsageACInsertFile [] PROGMEM = "AC Ins File"; +const char pstrUsageACInsertPicture [] PROGMEM = "AC Ins Pic"; +const char pstrUsageACInsertObject [] PROGMEM = "AC Ins Obj"; +const char pstrUsageACInsertSymbol [] PROGMEM = "AC Ins Sym"; +const char pstrUsageACSaveAndClose [] PROGMEM = "AC Sav&Cls"; +const char pstrUsageACRename [] PROGMEM = "AC Rename"; +const char pstrUsageACMerge [] PROGMEM = "AC Merge"; +const char pstrUsageACSplit [] PROGMEM = "AC Split"; +const char pstrUsageACDistributeHorizontaly [] PROGMEM = "AC Dist Hor"; +const char pstrUsageACDistributeVerticaly [] PROGMEM = "AC Dist Ver"; + +// Digitaizers +const char pstrUsageDigitizer [] PROGMEM = "Digitizer"; +const char pstrUsagePen [] PROGMEM = "Pen"; +const char pstrUsageLightPen [] PROGMEM = "Light Pen"; +const char pstrUsageTouchScreen [] PROGMEM = "Touch Scr"; +const char pstrUsageTouchPad [] PROGMEM = "Touch Pad"; +const char pstrUsageWhiteBoard [] PROGMEM = "White Brd"; +const char pstrUsageCoordinateMeasuringMachine [] PROGMEM = "Coord Meas Mach"; +const char pstrUsage3DDigitizer [] PROGMEM = "3D Dgtz"; +const char pstrUsageStereoPlotter [] PROGMEM = "Stereo Plot"; +const char pstrUsageArticulatedArm [] PROGMEM = "Art Arm"; +const char pstrUsageArmature [] PROGMEM = "Armature"; +const char pstrUsageMultiplePointDigitizer [] PROGMEM = "Multi Point Dgtz"; +const char pstrUsageFreeSpaceWand [] PROGMEM = "Free Space Wand"; +const char pstrUsageStylus [] PROGMEM = "Stylus"; +const char pstrUsagePuck [] PROGMEM = "Puck"; +const char pstrUsageFinger [] PROGMEM = "Finger"; +const char pstrUsageTipPressure [] PROGMEM = "Tip Press"; +const char pstrUsageBarrelPressure [] PROGMEM = "Brl Press"; +const char pstrUsageInRange [] PROGMEM = "In Range"; +const char pstrUsageTouch [] PROGMEM = "Touch"; +const char pstrUsageUntouch [] PROGMEM = "Untouch"; +const char pstrUsageTap [] PROGMEM = "Tap"; +const char pstrUsageQuality [] PROGMEM = "Qlty"; +const char pstrUsageDataValid [] PROGMEM = "Data Valid"; +const char pstrUsageTransducerIndex [] PROGMEM = "Transducer Ind"; +const char pstrUsageTabletFunctionKeys [] PROGMEM = "Tabl Func Keys"; +const char pstrUsageProgramChangeKeys [] PROGMEM = "Pgm Chng Keys"; +//const char pstrUsageBatteryStrength [] PROGMEM = "Bat Strength"; +const char pstrUsageInvert [] PROGMEM = "Invert"; +const char pstrUsageXTilt [] PROGMEM = "X Tilt"; +const char pstrUsageYTilt [] PROGMEM = "Y Tilt"; +const char pstrUsageAzimuth [] PROGMEM = "Azimuth"; +const char pstrUsageAltitude [] PROGMEM = "Altitude"; +const char pstrUsageTwist [] PROGMEM = "Twist"; +const char pstrUsageTipSwitch [] PROGMEM = "Tip Sw"; +const char pstrUsageSecondaryTipSwitch [] PROGMEM = "Scnd Tip Sw"; +const char pstrUsageBarrelSwitch [] PROGMEM = "Brl Sw"; +const char pstrUsageEraser [] PROGMEM = "Eraser"; +const char pstrUsageTabletPick [] PROGMEM = "Tbl Pick"; + +// Alphanumeric Display Page +const char pstrUsageAlphanumericDisplay [] PROGMEM = "Alphanum Disp"; +const char pstrUsageBitmappedDisplay [] PROGMEM = "Bmp Disp"; +const char pstrUsageDisplayAttributesReport [] PROGMEM = "Disp Attr Rpt"; +const char pstrUsageASCIICharacterSet [] PROGMEM = "ASCII chset"; +const char pstrUsageDataReadBack [] PROGMEM = "Data Rd Back"; +const char pstrUsageFontReadBack [] PROGMEM = "Fnt Rd Back"; +const char pstrUsageDisplayControlReport [] PROGMEM = "Disp Ctrl Rpt"; +const char pstrUsageClearDisplay [] PROGMEM = "Clr Disp"; +//const char pstrUsageDisplayEnable [] PROGMEM = "Disp Enbl"; +const char pstrUsageScreenSaverDelay [] PROGMEM = "Scr Sav Delay"; +const char pstrUsageScreenSaverEnable [] PROGMEM = "Scr Sav Enbl"; +const char pstrUsageVerticalScroll [] PROGMEM = "V Scroll"; +const char pstrUsageHorizontalScroll [] PROGMEM = "H Scroll"; +const char pstrUsageCharacterReport [] PROGMEM = "Char Rpt"; +const char pstrUsageDisplayData [] PROGMEM = "Disp Data"; +const char pstrUsageDisplayStatus [] PROGMEM = "Disp Stat"; +const char pstrUsageStatusNotReady [] PROGMEM = "Stat !Ready"; +const char pstrUsageStatusReady [] PROGMEM = "Stat Ready"; +const char pstrUsageErrorNotALoadableCharacter [] PROGMEM = "Err Not Ld Char"; +const char pstrUsageErrorFotDataCanNotBeRead [] PROGMEM = "Fnt Data Rd Err"; +const char pstrUsageCursorPositionReport [] PROGMEM = "Cur Pos Rpt"; +const char pstrUsageRow [] PROGMEM = "Row"; +const char pstrUsageColumn [] PROGMEM = "Col"; +const char pstrUsageRows [] PROGMEM = "Rows"; +const char pstrUsageColumns [] PROGMEM = "Cols"; +const char pstrUsageCursorPixelPosition [] PROGMEM = "Cur Pix Pos"; +const char pstrUsageCursorMode [] PROGMEM = "Cur Mode"; +const char pstrUsageCursorEnable [] PROGMEM = "Cur Enbl"; +const char pstrUsageCursorBlink [] PROGMEM = "Cur Blnk"; +const char pstrUsageFontReport [] PROGMEM = "Fnt Rpt"; +const char pstrUsageFontData [] PROGMEM = "Fnt Data"; +const char pstrUsageCharacterWidth [] PROGMEM = "Char Wdth"; +const char pstrUsageCharacterHeight [] PROGMEM = "Char Hght"; +const char pstrUsageCharacterSpacingHorizontal [] PROGMEM = "Char Space H"; +const char pstrUsageCharacterSpacingVertical [] PROGMEM = "Char Space V"; +const char pstrUsageUnicodeCharset [] PROGMEM = "Unicode Char"; +const char pstrUsageFont7Segment [] PROGMEM = "Fnt 7-seg"; +const char pstrUsage7SegmentDirectMap [] PROGMEM = "7-seg map"; +const char pstrUsageFont14Segment [] PROGMEM = "Fnt 14-seg"; +const char pstrUsage14SegmentDirectMap [] PROGMEM = "14-seg map"; +const char pstrUsageDisplayBrightness [] PROGMEM = "Disp Bright"; +const char pstrUsageDisplayContrast [] PROGMEM = "Disp Cntrst"; +const char pstrUsageCharacterAttribute [] PROGMEM = "Char Attr"; +const char pstrUsageAttributeReadback [] PROGMEM = "Attr Readbk"; +const char pstrUsageAttributeData [] PROGMEM = "Attr Data"; +const char pstrUsageCharAttributeEnhance [] PROGMEM = "Char Attr Enh"; +const char pstrUsageCharAttributeUnderline [] PROGMEM = "Char Attr Undl"; +const char pstrUsageCharAttributeBlink [] PROGMEM = "Char Attr Blnk"; +const char pstrUsageBitmapSizeX [] PROGMEM = "Bmp Size X"; +const char pstrUsageBitmapSizeY [] PROGMEM = "Bmp Size Y"; +const char pstrUsageBitDepthFormat [] PROGMEM = "Bit Dpth Fmt"; +const char pstrUsageDisplayOrientation [] PROGMEM = "Disp Ornt"; +const char pstrUsagePaletteReport [] PROGMEM = "Pal Rpt"; +const char pstrUsagePaletteDataSize [] PROGMEM = "Pal Data Size"; +const char pstrUsagePaletteDataOffset [] PROGMEM = "Pal Data Off"; +const char pstrUsagePaletteData [] PROGMEM = "Pal Data"; +const char pstrUsageBlitReport [] PROGMEM = "Blit Rpt"; +const char pstrUsageBlitRectangleX1 [] PROGMEM = "Blit Rect X1"; +const char pstrUsageBlitRectangleY1 [] PROGMEM = "Blit Rect Y1"; +const char pstrUsageBlitRectangleX2 [] PROGMEM = "Blit Rect X2"; +const char pstrUsageBlitRectangleY2 [] PROGMEM = "Blit Rect Y2"; +const char pstrUsageBlitData [] PROGMEM = "Blit Data"; +const char pstrUsageSoftButton [] PROGMEM = "Soft Btn"; +const char pstrUsageSoftButtonID [] PROGMEM = "Soft Btn ID"; +const char pstrUsageSoftButtonSide [] PROGMEM = "Soft Btn Side"; +const char pstrUsageSoftButtonOffset1 [] PROGMEM = "Soft Btn Off1"; +const char pstrUsageSoftButtonOffset2 [] PROGMEM = "Soft Btn Off2"; +const char pstrUsageSoftButtonReport [] PROGMEM = "Soft Btn Rpt"; + +// Medical Instrument Page +const char pstrUsageMedicalUltrasound [] PROGMEM = "Med Ultrasnd"; +const char pstrUsageVCRAcquisition [] PROGMEM = "VCR/Acq"; +const char pstrUsageFreezeThaw [] PROGMEM = "Freeze"; +const char pstrUsageClipStore [] PROGMEM = "Clip Store"; +const char pstrUsageUpdate [] PROGMEM = "Update"; +const char pstrUsageNext [] PROGMEM = "Next"; +const char pstrUsageSave [] PROGMEM = "Save"; +const char pstrUsagePrint [] PROGMEM = "Print"; +const char pstrUsageMicrophoneEnable [] PROGMEM = "Mic Enbl"; +const char pstrUsageCine [] PROGMEM = "Cine"; +const char pstrUsageTransmitPower [] PROGMEM = "Trans Pwr"; +//const char pstrUsageVolume [] PROGMEM = "Vol"; +const char pstrUsageFocus [] PROGMEM = "Focus"; +const char pstrUsageDepth [] PROGMEM = "Depth"; +const char pstrUsageSoftStepPrimary [] PROGMEM = "Soft Stp-Pri"; +const char pstrUsageSoftStepSecondary [] PROGMEM = "Soft Stp-Sec"; +const char pstrUsageDepthGainCompensation [] PROGMEM = "Dpth Gain Comp"; +const char pstrUsageZoomSelect [] PROGMEM = "Zoom Sel"; +const char pstrUsageZoomAdjust [] PROGMEM = "Zoom Adj"; +const char pstrUsageSpectralDopplerModeSelect [] PROGMEM = "Spec Dop Mode Sel"; +const char pstrUsageSpectralDopplerModeAdjust [] PROGMEM = "Spec Dop Mode Adj"; +const char pstrUsageColorDopplerModeSelect [] PROGMEM = "Color Dop Mode Sel"; +const char pstrUsageColorDopplerModeAdjust [] PROGMEM = "Color Dop Mode Adj"; +const char pstrUsageMotionModeSelect [] PROGMEM = "Motion Mode Sel"; +const char pstrUsageMotionModeAdjust [] PROGMEM = "Motion Mode Adj"; +const char pstrUsage2DModeSelect [] PROGMEM = "2D Mode Sel"; +const char pstrUsage2DModeAdjust [] PROGMEM = "2D Mode Adj"; +const char pstrUsageSoftControlSelect [] PROGMEM = "Soft Ctrl Sel"; +const char pstrUsageSoftControlAdjust [] PROGMEM = "Soft Ctrl Adj"; + +//extern const char *usagePageTitles0[15]; +//const char *usagePageTitles1[]; +//const char *genDesktopTitles0[]; +//const char *genDesktopTitles1[]; +//const char *genDesktopTitles2[]; +//const char *genDesktopTitles3[]; +//const char *genDesktopTitles4[]; +//const char *simuTitles0[]; +//const char *simuTitles1[]; +//const char *simuTitles2[]; +//const char *vrTitles0[]; +//const char *vrTitles1[]; +//const char *sportsCtrlTitles0[]; +//const char *sportsCtrlTitles1[]; +//const char *sportsCtrlTitles2[]; +//const char *gameTitles0[]; +//const char *gameTitles1[]; +//const char *genDevCtrlTitles[]; +//const char *ledTitles[]; +//const char *telTitles0[]; +//const char *telTitles1[]; +//const char *telTitles2[]; +//const char *telTitles3[]; +//const char *telTitles4[]; +//const char *telTitles5[]; +//const char *consTitles0[]; +//const char *consTitles1[]; +//const char *consTitles2[]; +//const char *consTitles3[]; +//const char *consTitles4[]; +//const char *consTitles5[]; +//const char *consTitles6[]; +//const char *consTitles7[]; +//const char *consTitles8[]; +//const char *consTitles9[]; +//const char *consTitlesA[]; +//const char *consTitlesB[]; +//const char *consTitlesC[]; +//const char *consTitlesD[]; +//const char *consTitlesE[]; +//const char *digitTitles0[]; +//const char *digitTitles1[]; +//const char *digitTitles2[]; +//const char *aplphanumTitles0[]; +//const char *aplphanumTitles1[]; +//const char *aplphanumTitles2[]; +//const char *medInstrTitles0[]; +//const char *medInstrTitles1[]; +//const char *medInstrTitles2[]; +//const char *medInstrTitles3[]; +//const char *medInstrTitles4[]; + +#endif //__HIDUSAGESTR_H__ \ No newline at end of file diff --git a/hidusagetitlearrays.cpp b/hidusagetitlearrays.cpp new file mode 100644 index 00000000..e8cda978 --- /dev/null +++ b/hidusagetitlearrays.cpp @@ -0,0 +1,1047 @@ +/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. + +This software may be distributed and modified under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free Software +Foundation and appearing in the file GPL2.TXT included in the packaging of +this file. Please note that GPL2 Section 2[b] requires that all works based +on this software must also be made publicly available under the terms of +the GPL2 ("Copyleft"). + +Contact information +------------------- + +Circuits At Home, LTD +Web : http://www.circuitsathome.com +e-mail : support@circuitsathome.com +*/ +#if !defined(__HIDUSAGETITLEARRAYS_H__) +#define __HIDUSAGETITLEARRAYS_H__ + +#include +#include "hidusagestr.h" + +//const char *usagePageTitles0[] PROGMEM = +//{ +// pstrUsagePageGenericDesktopControls , +// pstrUsagePageSimulationControls , +// pstrUsagePageVRControls , +// pstrUsagePageSportControls , +// pstrUsagePageGameControls , +// pstrUsagePageGenericDeviceControls , +// pstrUsagePageKeyboardKeypad , +// pstrUsagePageLEDs , +// pstrUsagePageButton , +// pstrUsagePageOrdinal , +// pstrUsagePageTelephone , +// pstrUsagePageConsumer , +// pstrUsagePageDigitizer , +// pstrUsagePagePID , +// pstrUsagePageUnicode +//}; +// +//const char *usagePageTitles1[] PROGMEM = +//{ +// pstrUsagePageBarCodeScanner , +// pstrUsagePageScale , +// pstrUsagePageMSRDevices , +// pstrUsagePagePointOfSale , +// pstrUsagePageCameraControl , +// pstrUsagePageArcade +//}; +//const char *genDesktopTitles0[] PROGMEM = +//{ +// pstrUsagePointer , +// pstrUsageMouse , +// pstrUsageJoystick , +// pstrUsageGamePad , +// pstrUsageKeyboard , +// pstrUsageKeypad , +// pstrUsageMultiAxisController , +// pstrUsageTabletPCSystemControls +// +//}; +//const char *genDesktopTitles1[] PROGMEM = +//{ +// pstrUsageX , +// pstrUsageY , +// pstrUsageZ , +// pstrUsageRx , +// pstrUsageRy , +// pstrUsageRz , +// pstrUsageSlider , +// pstrUsageDial , +// pstrUsageWheel , +// pstrUsageHatSwitch , +// pstrUsageCountedBuffer , +// pstrUsageByteCount , +// pstrUsageMotionWakeup , +// pstrUsageStart , +// pstrUsageSelect , +// pstrUsagePageReserved , +// pstrUsageVx , +// pstrUsageVy , +// pstrUsageVz , +// pstrUsageVbrx , +// pstrUsageVbry , +// pstrUsageVbrz , +// pstrUsageVno , +// pstrUsageFeatureNotification , +// pstrUsageResolutionMultiplier +//}; +//const char *genDesktopTitles2[] PROGMEM = +//{ +// pstrUsageSystemControl , +// pstrUsageSystemPowerDown , +// pstrUsageSystemSleep , +// pstrUsageSystemWakeup , +// pstrUsageSystemContextMenu , +// pstrUsageSystemMainMenu , +// pstrUsageSystemAppMenu , +// pstrUsageSystemMenuHelp , +// pstrUsageSystemMenuExit , +// pstrUsageSystemMenuSelect , +// pstrUsageSystemMenuRight , +// pstrUsageSystemMenuLeft , +// pstrUsageSystemMenuUp , +// pstrUsageSystemMenuDown , +// pstrUsageSystemColdRestart , +// pstrUsageSystemWarmRestart , +// pstrUsageDPadUp , +// pstrUsageDPadDown , +// pstrUsageDPadRight , +// pstrUsageDPadLeft +//}; +//const char *genDesktopTitles3[] PROGMEM = +//{ +// pstrUsageSystemDock , +// pstrUsageSystemUndock , +// pstrUsageSystemSetup , +// pstrUsageSystemBreak , +// pstrUsageSystemDebuggerBreak , +// pstrUsageApplicationBreak , +// pstrUsageApplicationDebuggerBreak, +// pstrUsageSystemSpeakerMute , +// pstrUsageSystemHibernate +//}; +//const char *genDesktopTitles4[] PROGMEM = +//{ +// pstrUsageSystemDisplayInvert , +// pstrUsageSystemDisplayInternal , +// pstrUsageSystemDisplayExternal , +// pstrUsageSystemDisplayBoth , +// pstrUsageSystemDisplayDual , +// pstrUsageSystemDisplayToggleIntExt , +// pstrUsageSystemDisplaySwapPriSec , +// pstrUsageSystemDisplayLCDAutoscale +//}; +//const char *simuTitles0[] PROGMEM = +//{ +// pstrUsageFlightSimulationDevice , +// pstrUsageAutomobileSimulationDevice , +// pstrUsageTankSimulationDevice , +// pstrUsageSpaceshipSimulationDevice , +// pstrUsageSubmarineSimulationDevice , +// pstrUsageSailingSimulationDevice , +// pstrUsageMotocicleSimulationDevice , +// pstrUsageSportsSimulationDevice , +// pstrUsageAirplaneSimulationDevice , +// pstrUsageHelicopterSimulationDevice , +// pstrUsageMagicCarpetSimulationDevice, +// pstrUsageBicycleSimulationDevice +//}; +//const char *simuTitles1[] PROGMEM = +//{ +// pstrUsageFlightControlStick , +// pstrUsageFlightStick , +// pstrUsageCyclicControl , +// pstrUsageCyclicTrim , +// pstrUsageFlightYoke , +// pstrUsageTrackControl +//}; +//const char *simuTitles2[] PROGMEM = +//{ +// pstrUsageAileron , +// pstrUsageAileronTrim , +// pstrUsageAntiTorqueControl , +// pstrUsageAutopilotEnable , +// pstrUsageChaffRelease , +// pstrUsageCollectiveControl , +// pstrUsageDiveBrake , +// pstrUsageElectronicCountermeasures , +// pstrUsageElevator , +// pstrUsageElevatorTrim , +// pstrUsageRudder , +// pstrUsageThrottle , +// pstrUsageFlightCommunications , +// pstrUsageFlareRelease , +// pstrUsageLandingGear , +// pstrUsageToeBrake , +// pstrUsageTrigger , +// pstrUsageWeaponsArm , +// pstrUsageWeaponsSelect , +// pstrUsageWingFlaps , +// pstrUsageAccelerator , +// pstrUsageBrake , +// pstrUsageClutch , +// pstrUsageShifter , +// pstrUsageSteering , +// pstrUsageTurretDirection , +// pstrUsageBarrelElevation , +// pstrUsageDivePlane , +// pstrUsageBallast , +// pstrUsageBicycleCrank , +// pstrUsageHandleBars , +// pstrUsageFrontBrake , +// pstrUsageRearBrake +//}; +//const char *vrTitles0[] PROGMEM = +//{ +// pstrUsageBelt , +// pstrUsageBodySuit , +// pstrUsageFlexor , +// pstrUsageGlove , +// pstrUsageHeadTracker , +// pstrUsageHeadMountedDisplay , +// pstrUsageHandTracker , +// pstrUsageOculometer , +// pstrUsageVest , +// pstrUsageAnimatronicDevice +//}; +//const char *vrTitles1[] PROGMEM = +//{ +// pstrUsageStereoEnable , +// pstrUsageDisplayEnable +//}; +//const char *sportsCtrlTitles0[] PROGMEM = +//{ +// pstrUsageBaseballBat , +// pstrUsageGolfClub , +// pstrUsageRowingMachine , +// pstrUsageTreadmill +//}; +//const char *sportsCtrlTitles1[] PROGMEM = +//{ +// pstrUsageOar , +// pstrUsageSlope , +// pstrUsageRate , +// pstrUsageStickSpeed , +// pstrUsageStickFaceAngle , +// pstrUsageStickHeelToe , +// pstrUsageStickFollowThough , +// pstrUsageStickTempo , +// pstrUsageStickType , +// pstrUsageStickHeight +//}; +//const char *sportsCtrlTitles2[] PROGMEM = +//{ +// pstrUsagePutter , +// pstrUsage1Iron , +// pstrUsage2Iron , +// pstrUsage3Iron , +// pstrUsage4Iron , +// pstrUsage5Iron , +// pstrUsage6Iron , +// pstrUsage7Iron , +// pstrUsage8Iron , +// pstrUsage9Iron , +// pstrUsage10Iron , +// pstrUsage11Iron , +// pstrUsageSandWedge , +// pstrUsageLoftWedge , +// pstrUsagePowerWedge , +// pstrUsage1Wood , +// pstrUsage3Wood , +// pstrUsage5Wood , +// pstrUsage7Wood , +// pstrUsage9Wood +//}; +//const char *gameTitles0[] PROGMEM = +//{ +// pstrUsage3DGameController , +// pstrUsagePinballDevice , +// pstrUsageGunDevice +//}; +//const char *gameTitles1[] PROGMEM = +//{ +// pstrUsagePointOfView , +// pstrUsageTurnRightLeft , +// pstrUsagePitchForwardBackward , +// pstrUsageRollRightLeft , +// pstrUsageMoveRightLeft , +// pstrUsageMoveForwardBackward , +// pstrUsageMoveUpDown , +// pstrUsageLeanRightLeft , +// pstrUsageLeanForwardBackward , +// pstrUsageHeightOfPOV , +// pstrUsageFlipper , +// pstrUsageSecondaryFlipper , +// pstrUsageBump , +// pstrUsageNewGame , +// pstrUsageShootBall , +// pstrUsagePlayer , +// pstrUsageGunBolt , +// pstrUsageGunClip , +// pstrUsageGunSelector , +// pstrUsageGunSingleShot , +// pstrUsageGunBurst , +// pstrUsageGunAutomatic , +// pstrUsageGunSafety , +// pstrUsageGamepadFireJump , +// pstrUsageGamepadTrigger +//}; +//const char *genDevCtrlTitles[] PROGMEM = +//{ +// pstrUsageBatteryStrength, +// pstrUsageWirelessChannel, +// pstrUsageWirelessID, +// pstrUsageDiscoverWirelessControl, +// pstrUsageSecurityCodeCharEntered, +// pstrUsageSecurityCodeCharErased, +// pstrUsageSecurityCodeCleared +//}; +//const char *ledTitles[] PROGMEM = +//{ +// pstrUsageNumLock , +// pstrUsageCapsLock , +// pstrUsageScrollLock , +// pstrUsageCompose , +// pstrUsageKana , +// pstrUsagePower , +// pstrUsageShift , +// pstrUsageDoNotDisturb , +// pstrUsageMute , +// pstrUsageToneEnable , +// pstrUsageHighCutFilter , +// pstrUsageLowCutFilter , +// pstrUsageEqualizerEnable , +// pstrUsageSoundFieldOn , +// pstrUsageSurroundOn , +// pstrUsageRepeat , +// pstrUsageStereo , +// pstrUsageSamplingRateDetect , +// pstrUsageSpinning , +// pstrUsageCAV , +// pstrUsageCLV , +// pstrUsageRecordingFormatDetect , +// pstrUsageOffHook , +// pstrUsageRing , +// pstrUsageMessageWaiting , +// pstrUsageDataMode , +// pstrUsageBatteryOperation , +// pstrUsageBatteryOK , +// pstrUsageBatteryLow , +// pstrUsageSpeaker , +// pstrUsageHeadSet , +// pstrUsageHold , +// pstrUsageMicrophone , +// pstrUsageCoverage , +// pstrUsageNightMode , +// pstrUsageSendCalls , +// pstrUsageCallPickup , +// pstrUsageConference , +// pstrUsageStandBy , +// pstrUsageCameraOn , +// pstrUsageCameraOff , +// pstrUsageOnLine , +// pstrUsageOffLine , +// pstrUsageBusy , +// pstrUsageReady , +// pstrUsagePaperOut , +// pstrUsagePaperJam , +// pstrUsageRemote , +// pstrUsageForward , +// pstrUsageReverse , +// pstrUsageStop , +// pstrUsageRewind , +// pstrUsageFastForward , +// pstrUsagePlay , +// pstrUsagePause , +// pstrUsageRecord , +// pstrUsageError , +// pstrUsageSelectedIndicator , +// pstrUsageInUseIndicator , +// pstrUsageMultiModeIndicator , +// pstrUsageIndicatorOn , +// pstrUsageIndicatorFlash , +// pstrUsageIndicatorSlowBlink , +// pstrUsageIndicatorFastBlink , +// pstrUsageIndicatorOff , +// pstrUsageFlashOnTime , +// pstrUsageSlowBlinkOnTime , +// pstrUsageSlowBlinkOffTime , +// pstrUsageFastBlinkOnTime , +// pstrUsageFastBlinkOffTime , +// pstrUsageIndicatorColor , +// pstrUsageIndicatorRed , +// pstrUsageIndicatorGreen , +// pstrUsageIndicatorAmber , +// pstrUsageGenericIndicator , +// pstrUsageSystemSuspend , +// pstrUsageExternalPowerConnected +//}; +//const char *telTitles0 [] PROGMEM = +//{ +// pstrUsagePhone , +// pstrUsageAnsweringMachine , +// pstrUsageMessageControls , +// pstrUsageHandset , +// pstrUsageHeadset , +// pstrUsageTelephonyKeyPad , +// pstrUsageProgrammableButton +//}; +//const char *telTitles1 [] PROGMEM = +//{ +// pstrUsageHookSwitch , +// pstrUsageFlash , +// pstrUsageFeature , +// pstrUsageHold , +// pstrUsageRedial , +// pstrUsageTransfer , +// pstrUsageDrop , +// pstrUsagePark , +// pstrUsageForwardCalls , +// pstrUsageAlternateFunction , +// pstrUsageLine , +// pstrUsageSpeakerPhone , +// pstrUsageConference , +// pstrUsageRingEnable , +// pstrUsageRingSelect , +// pstrUsagePhoneMute , +// pstrUsageCallerID , +// pstrUsageSend +//}; +//const char *telTitles2 [] PROGMEM = +//{ +// pstrUsageSpeedDial , +// pstrUsageStoreNumber , +// pstrUsageRecallNumber , +// pstrUsagePhoneDirectory +//}; +//const char *telTitles3 [] PROGMEM = +//{ +// pstrUsageVoiceMail , +// pstrUsageScreenCalls , +// pstrUsageDoNotDisturb , +// pstrUsageMessage , +// pstrUsageAnswerOnOff +//}; +//const char *telTitles4 [] PROGMEM = +//{ +// pstrUsageInsideDialTone , +// pstrUsageOutsideDialTone , +// pstrUsageInsideRingTone , +// pstrUsageOutsideRingTone , +// pstrUsagePriorityRingTone , +// pstrUsageInsideRingback , +// pstrUsagePriorityRingback , +// pstrUsageLineBusyTone , +// pstrUsageReorderTone , +// pstrUsageCallWaitingTone , +// pstrUsageConfirmationTone1 , +// pstrUsageConfirmationTone2 , +// pstrUsageTonesOff , +// pstrUsageOutsideRingback , +// pstrUsageRinger +//}; +//const char *telTitles5 [] PROGMEM = +//{ +// pstrUsagePhoneKey0 , +// pstrUsagePhoneKey1 , +// pstrUsagePhoneKey2 , +// pstrUsagePhoneKey3 , +// pstrUsagePhoneKey4 , +// pstrUsagePhoneKey5 , +// pstrUsagePhoneKey6 , +// pstrUsagePhoneKey7 , +// pstrUsagePhoneKey8 , +// pstrUsagePhoneKey9 , +// pstrUsagePhoneKeyStar , +// pstrUsagePhoneKeyPound , +// pstrUsagePhoneKeyA , +// pstrUsagePhoneKeyB , +// pstrUsagePhoneKeyC , +// pstrUsagePhoneKeyD +//}; +//const char *consTitles0[] PROGMEM = +//{ +// pstrUsageConsumerControl, +// pstrUsageNumericKeyPad, +// pstrUsageProgrammableButton, +// pstrUsageMicrophone, +// pstrUsageHeadphone, +// pstrUsageGraphicEqualizer +//}; +//const char *consTitles1[] PROGMEM = +//{ +// pstrUsagePlus10 , +// pstrUsagePlus100, +// pstrUsageAMPM +//}; +//const char *consTitles2[] PROGMEM = +//{ +// pstrUsagePower , +// pstrUsageReset , +// pstrUsageSleep , +// pstrUsageSleepAfter , +// pstrUsageSleepMode , +// pstrUsageIllumination , +// pstrUsageFunctionButtons +// +//}; +//const char *consTitles3[] PROGMEM = +//{ +// pstrUsageMenu , +// pstrUsageMenuPick , +// pstrUsageMenuUp , +// pstrUsageMenuDown , +// pstrUsageMenuLeft , +// pstrUsageMenuRight , +// pstrUsageMenuEscape , +// pstrUsageMenuValueIncrease, +// pstrUsageMenuValueDecrease +//}; +//const char *consTitles4[] PROGMEM = +//{ +// pstrUsageDataOnScreen , +// pstrUsageClosedCaption , +// pstrUsageClosedCaptionSelect, +// pstrUsageVCRTV , +// pstrUsageBroadcastMode , +// pstrUsageSnapshot , +// pstrUsageStill +//}; +//const char *consTitles5[] PROGMEM = +//{ +// pstrUsageSelection , +// pstrUsageAssignSelection , +// pstrUsageModeStep , +// pstrUsageRecallLast , +// pstrUsageEnterChannel , +// pstrUsageOrderMovie , +// pstrUsageChannel , +// pstrUsageMediaSelection , +// pstrUsageMediaSelectComputer , +// pstrUsageMediaSelectTV , +// pstrUsageMediaSelectWWW , +// pstrUsageMediaSelectDVD , +// pstrUsageMediaSelectTelephone , +// pstrUsageMediaSelectProgramGuide , +// pstrUsageMediaSelectVideoPhone , +// pstrUsageMediaSelectGames , +// pstrUsageMediaSelectMessages , +// pstrUsageMediaSelectCD , +// pstrUsageMediaSelectVCR , +// pstrUsageMediaSelectTuner , +// pstrUsageQuit , +// pstrUsageHelp , +// pstrUsageMediaSelectTape , +// pstrUsageMediaSelectCable , +// pstrUsageMediaSelectSatellite , +// pstrUsageMediaSelectSecurity , +// pstrUsageMediaSelectHome , +// pstrUsageMediaSelectCall , +// pstrUsageChannelIncrement , +// pstrUsageChannelDecrement , +// pstrUsageMediaSelectSAP , +// pstrUsagePageReserved , +// pstrUsageVCRPlus , +// pstrUsageOnce , +// pstrUsageDaily , +// pstrUsageWeekly , +// pstrUsageMonthly +//}; +//const char *consTitles6[] PROGMEM = +//{ +// pstrUsagePlay , +// pstrUsagePause , +// pstrUsageRecord , +// pstrUsageFastForward , +// pstrUsageRewind , +// pstrUsageScanNextTrack , +// pstrUsageScanPreviousTrack , +// pstrUsageStop , +// pstrUsageEject , +// pstrUsageRandomPlay , +// pstrUsageSelectDisk , +// pstrUsageEnterDisk , +// pstrUsageRepeat , +// pstrUsageTracking , +// pstrUsageTrackNormal , +// pstrUsageSlowTracking , +// pstrUsageFrameForward , +// pstrUsageFrameBackwards , +// pstrUsageMark , +// pstrUsageClearMark , +// pstrUsageRepeatFromMark , +// pstrUsageReturnToMark , +// pstrUsageSearchMarkForward , +// pstrUsageSearchMarkBackwards , +// pstrUsageCounterReset , +// pstrUsageShowCounter , +// pstrUsageTrackingIncrement , +// pstrUsageTrackingDecrement , +// pstrUsageStopEject , +// pstrUsagePlayPause , +// pstrUsagePlaySkip +//}; +//const char *consTitles7[] PROGMEM = +//{ +// pstrUsageVolume , +// pstrUsageBalance , +// pstrUsageMute , +// pstrUsageBass , +// pstrUsageTreble , +// pstrUsageBassBoost , +// pstrUsageSurroundMode , +// pstrUsageLoudness , +// pstrUsageMPX , +// pstrUsageVolumeIncrement , +// pstrUsageVolumeDecrement +//}; +//const char *consTitles8[] PROGMEM = +//{ +// pstrUsageSpeedSelect , +// pstrUsagePlaybackSpeed , +// pstrUsageStandardPlay , +// pstrUsageLongPlay , +// pstrUsageExtendedPlay , +// pstrUsageSlow +//}; +//const char *consTitles9[] PROGMEM = +//{ +// pstrUsageFanEnable , +// pstrUsageFanSpeed , +// pstrUsageLightEnable , +// pstrUsageLightIlluminationLevel , +// pstrUsageClimateControlEnable , +// pstrUsageRoomTemperature , +// pstrUsageSecurityEnable , +// pstrUsageFireAlarm , +// pstrUsagePoliceAlarm , +// pstrUsageProximity , +// pstrUsageMotion , +// pstrUsageDuresAlarm , +// pstrUsageHoldupAlarm , +// pstrUsageMedicalAlarm +//}; +//const char *consTitlesA[] PROGMEM = +//{ +// pstrUsageBalanceRight , +// pstrUsageBalanceLeft , +// pstrUsageBassIncrement , +// pstrUsageBassDecrement , +// pstrUsageTrebleIncrement , +// pstrUsageTrebleDecrement +//}; +//const char *consTitlesB[] PROGMEM = +//{ +// pstrUsageSpeakerSystem , +// pstrUsageChannelLeft , +// pstrUsageChannelRight , +// pstrUsageChannelCenter , +// pstrUsageChannelFront , +// pstrUsageChannelCenterFront , +// pstrUsageChannelSide , +// pstrUsageChannelSurround , +// pstrUsageChannelLowFreqEnhancement , +// pstrUsageChannelTop , +// pstrUsageChannelUnknown +//}; +//const char *consTitlesC[] PROGMEM = +//{ +// pstrUsageSubChannel , +// pstrUsageSubChannelIncrement , +// pstrUsageSubChannelDecrement , +// pstrUsageAlternateAudioIncrement , +// pstrUsageAlternateAudioDecrement +//}; +//const char *consTitlesD[] PROGMEM = +//{ +// pstrUsageApplicationLaunchButtons , +// pstrUsageALLaunchButtonConfigTool , +// pstrUsageALProgrammableButton , +// pstrUsageALConsumerControlConfig , +// pstrUsageALWordProcessor , +// pstrUsageALTextEditor , +// pstrUsageALSpreadsheet , +// pstrUsageALGraphicsEditor , +// pstrUsageALPresentationApp , +// pstrUsageALDatabaseApp , +// pstrUsageALEmailReader , +// pstrUsageALNewsreader , +// pstrUsageALVoicemail , +// pstrUsageALContactsAddressBook , +// pstrUsageALCalendarSchedule , +// pstrUsageALTaskProjectManager , +// pstrUsageALLogJournalTimecard , +// pstrUsageALCheckbookFinance , +// pstrUsageALCalculator , +// pstrUsageALAVCapturePlayback , +// pstrUsageALLocalMachineBrowser , +// pstrUsageALLANWANBrow , +// pstrUsageALInternetBrowser , +// pstrUsageALRemoteNetISPConnect , +// pstrUsageALNetworkConference , +// pstrUsageALNetworkChat , +// pstrUsageALTelephonyDialer , +// pstrUsageALLogon , +// pstrUsageALLogoff , +// pstrUsageALLogonLogoff , +// pstrUsageALTermLockScrSav , +// pstrUsageALControlPannel , +// pstrUsageALCommandLineProcessorRun , +// pstrUsageALProcessTaskManager , +// pstrUsageALSelectTaskApplication , +// pstrUsageALNextTaskApplication , +// pstrUsageALPreviousTaskApplication , +// pstrUsageALPreemptiveHaltTaskApp , +// pstrUsageALIntegratedHelpCenter , +// pstrUsageALDocuments , +// pstrUsageALThesaurus , +// pstrUsageALDictionary , +// pstrUsageALDesktop , +// pstrUsageALSpellCheck , +// pstrUsageALGrammarCheck , +// pstrUsageALWirelessStatus , +// pstrUsageALKeyboardLayout , +// pstrUsageALVirusProtection , +// pstrUsageALEncryption , +// pstrUsageALScreenSaver , +// pstrUsageALAlarms , +// pstrUsageALClock , +// pstrUsageALFileBrowser , +// pstrUsageALPowerStatus , +// pstrUsageALImageBrowser , +// pstrUsageALAudioBrowser , +// pstrUsageALMovieBrowser , +// pstrUsageALDigitalRightsManager , +// pstrUsageALDigitalWallet , +// pstrUsagePageReserved , +// pstrUsageALInstantMessaging , +// pstrUsageALOEMFeaturesBrowser , +// pstrUsageALOEMHelp , +// pstrUsageALOnlineCommunity , +// pstrUsageALEntertainmentContentBrow , +// pstrUsageALOnlineShoppingBrowser , +// pstrUsageALSmartCardInfoHelp , +// pstrUsageALMarketMonitorFinBrowser , +// pstrUsageALCustomCorpNewsBrowser , +// pstrUsageALOnlineActivityBrowser , +// pstrUsageALResearchSearchBrowser , +// pstrUsageALAudioPlayer +//}; +//const char *consTitlesE[] PROGMEM = +//{ +// pstrUsageGenericGUIAppControls , +// pstrUsageACNew , +// pstrUsageACOpen , +// pstrUsageACClose , +// pstrUsageACExit , +// pstrUsageACMaximize , +// pstrUsageACMinimize , +// pstrUsageACSave , +// pstrUsageACPrint , +// pstrUsageACProperties , +// pstrUsageACUndo , +// pstrUsageACCopy , +// pstrUsageACCut , +// pstrUsageACPaste , +// pstrUsageACSelectAll , +// pstrUsageACFind , +// pstrUsageACFindAndReplace , +// pstrUsageACSearch , +// pstrUsageACGoto , +// pstrUsageACHome , +// pstrUsageACBack , +// pstrUsageACForward , +// pstrUsageACStop , +// pstrUsageACRefresh , +// pstrUsageACPreviousLink , +// pstrUsageACNextLink , +// pstrUsageACBookmarks , +// pstrUsageACHistory , +// pstrUsageACSubscriptions , +// pstrUsageACZoomIn , +// pstrUsageACZoomOut , +// pstrUsageACZoom , +// pstrUsageACFullScreenView , +// pstrUsageACNormalView , +// pstrUsageACViewToggle , +// pstrUsageACScrollUp , +// pstrUsageACScrollDown , +// pstrUsageACScroll , +// pstrUsageACPanLeft , +// pstrUsageACPanRight , +// pstrUsageACPan , +// pstrUsageACNewWindow , +// pstrUsageACTileHoriz , +// pstrUsageACTileVert , +// pstrUsageACFormat , +// pstrUsageACEdit , +// pstrUsageACBold , +// pstrUsageACItalics , +// pstrUsageACUnderline , +// pstrUsageACStrikethrough , +// pstrUsageACSubscript , +// pstrUsageACSuperscript , +// pstrUsageACAllCaps , +// pstrUsageACRotate , +// pstrUsageACResize , +// pstrUsageACFlipHorizontal , +// pstrUsageACFlipVertical , +// pstrUsageACMirrorHorizontal , +// pstrUsageACMirrorVertical , +// pstrUsageACFontSelect , +// pstrUsageACFontColor , +// pstrUsageACFontSize , +// pstrUsageACJustifyLeft , +// pstrUsageACJustifyCenterH , +// pstrUsageACJustifyRight , +// pstrUsageACJustifyBlockH , +// pstrUsageACJustifyTop , +// pstrUsageACJustifyCenterV , +// pstrUsageACJustifyBottom , +// pstrUsageACJustifyBlockV , +// pstrUsageACIndentDecrease , +// pstrUsageACIndentIncrease , +// pstrUsageACNumberedList , +// pstrUsageACRestartNumbering , +// pstrUsageACBulletedList , +// pstrUsageACPromote , +// pstrUsageACDemote , +// pstrUsageACYes , +// pstrUsageACNo , +// pstrUsageACCancel , +// pstrUsageACCatalog , +// pstrUsageACBuyChkout , +// pstrUsageACAddToCart , +// pstrUsageACExpand , +// pstrUsageACExpandAll , +// pstrUsageACCollapse , +// pstrUsageACCollapseAll , +// pstrUsageACPrintPreview , +// pstrUsageACPasteSpecial , +// pstrUsageACInsertMode , +// pstrUsageACDelete , +// pstrUsageACLock , +// pstrUsageACUnlock , +// pstrUsageACProtect , +// pstrUsageACUnprotect , +// pstrUsageACAttachComment , +// pstrUsageACDeleteComment , +// pstrUsageACViewComment , +// pstrUsageACSelectWord , +// pstrUsageACSelectSentence , +// pstrUsageACSelectParagraph , +// pstrUsageACSelectColumn , +// pstrUsageACSelectRow , +// pstrUsageACSelectTable , +// pstrUsageACSelectObject , +// pstrUsageACRedoRepeat , +// pstrUsageACSort , +// pstrUsageACSortAscending , +// pstrUsageACSortDescending , +// pstrUsageACFilter , +// pstrUsageACSetClock , +// pstrUsageACViewClock , +// pstrUsageACSelectTimeZone , +// pstrUsageACEditTimeZone , +// pstrUsageACSetAlarm , +// pstrUsageACClearAlarm , +// pstrUsageACSnoozeAlarm , +// pstrUsageACResetAlarm , +// pstrUsageACSyncronize , +// pstrUsageACSendReceive , +// pstrUsageACSendTo , +// pstrUsageACReply , +// pstrUsageACReplyAll , +// pstrUsageACForwardMessage , +// pstrUsageACSend , +// pstrUsageACAttachFile , +// pstrUsageACUpload , +// pstrUsageACDownload , +// pstrUsageACSetBorders , +// pstrUsageACInsertRow , +// pstrUsageACInsertColumn , +// pstrUsageACInsertFile , +// pstrUsageACInsertPicture , +// pstrUsageACInsertObject , +// pstrUsageACInsertSymbol , +// pstrUsageACSaveAndClose , +// pstrUsageACRename , +// pstrUsageACMerge , +// pstrUsageACSplit , +// pstrUsageACDistributeHorizontaly , +// pstrUsageACDistributeVerticaly +//}; +//const char *digitTitles0[] PROGMEM = +//{ +// pstrUsageDigitizer , +// pstrUsagePen , +// pstrUsageLightPen , +// pstrUsageTouchScreen , +// pstrUsageTouchPad , +// pstrUsageWhiteBoard , +// pstrUsageCoordinateMeasuringMachine , +// pstrUsage3DDigitizer , +// pstrUsageStereoPlotter , +// pstrUsageArticulatedArm , +// pstrUsageArmature , +// pstrUsageMultiplePointDigitizer , +// pstrUsageFreeSpaceWand +//}; +//const char *digitTitles1[] PROGMEM = +//{ +// pstrUsageStylus , +// pstrUsagePuck , +// pstrUsageFinger +// +//}; +//const char *digitTitles2[] PROGMEM = +//{ +// pstrUsageTipPressure , +// pstrUsageBarrelPressure , +// pstrUsageInRange , +// pstrUsageTouch , +// pstrUsageUntouch , +// pstrUsageTap , +// pstrUsageQuality , +// pstrUsageDataValid , +// pstrUsageTransducerIndex , +// pstrUsageTabletFunctionKeys , +// pstrUsageProgramChangeKeys , +// pstrUsageBatteryStrength , +// pstrUsageInvert , +// pstrUsageXTilt , +// pstrUsageYTilt , +// pstrUsageAzimuth , +// pstrUsageAltitude , +// pstrUsageTwist , +// pstrUsageTipSwitch , +// pstrUsageSecondaryTipSwitch , +// pstrUsageBarrelSwitch , +// pstrUsageEraser , +// pstrUsageTabletPick +//}; +//const char *aplphanumTitles0[] PROGMEM = +//{ +// pstrUsageAlphanumericDisplay, +// pstrUsageBitmappedDisplay +//}; +//const char *aplphanumTitles1[] PROGMEM = +//{ +// pstrUsageDisplayAttributesReport , +// pstrUsageASCIICharacterSet , +// pstrUsageDataReadBack , +// pstrUsageFontReadBack , +// pstrUsageDisplayControlReport , +// pstrUsageClearDisplay , +// pstrUsageDisplayEnable , +// pstrUsageScreenSaverDelay , +// pstrUsageScreenSaverEnable , +// pstrUsageVerticalScroll , +// pstrUsageHorizontalScroll , +// pstrUsageCharacterReport , +// pstrUsageDisplayData , +// pstrUsageDisplayStatus , +// pstrUsageStatusNotReady , +// pstrUsageStatusReady , +// pstrUsageErrorNotALoadableCharacter , +// pstrUsageErrorFotDataCanNotBeRead , +// pstrUsageCursorPositionReport , +// pstrUsageRow , +// pstrUsageColumn , +// pstrUsageRows , +// pstrUsageColumns , +// pstrUsageCursorPixelPosition , +// pstrUsageCursorMode , +// pstrUsageCursorEnable , +// pstrUsageCursorBlink , +// pstrUsageFontReport , +// pstrUsageFontData , +// pstrUsageCharacterWidth , +// pstrUsageCharacterHeight , +// pstrUsageCharacterSpacingHorizontal , +// pstrUsageCharacterSpacingVertical , +// pstrUsageUnicodeCharset , +// pstrUsageFont7Segment , +// pstrUsage7SegmentDirectMap , +// pstrUsageFont14Segment , +// pstrUsage14SegmentDirectMap , +// pstrUsageDisplayBrightness , +// pstrUsageDisplayContrast , +// pstrUsageCharacterAttribute , +// pstrUsageAttributeReadback , +// pstrUsageAttributeData , +// pstrUsageCharAttributeEnhance , +// pstrUsageCharAttributeUnderline , +// pstrUsageCharAttributeBlink +//}; +//const char *aplphanumTitles2[] PROGMEM = +//{ +// pstrUsageBitmapSizeX , +// pstrUsageBitmapSizeY , +// pstrUsagePageReserved , +// pstrUsageBitDepthFormat , +// pstrUsageDisplayOrientation , +// pstrUsagePaletteReport , +// pstrUsagePaletteDataSize , +// pstrUsagePaletteDataOffset , +// pstrUsagePaletteData , +// pstrUsageBlitReport , +// pstrUsageBlitRectangleX1 , +// pstrUsageBlitRectangleY1 , +// pstrUsageBlitRectangleX2 , +// pstrUsageBlitRectangleY2 , +// pstrUsageBlitData , +// pstrUsageSoftButton , +// pstrUsageSoftButtonID , +// pstrUsageSoftButtonSide , +// pstrUsageSoftButtonOffset1 , +// pstrUsageSoftButtonOffset2 , +// pstrUsageSoftButtonReport +//}; +//const char *medInstrTitles0[] PROGMEM = +//{ +// pstrUsageVCRAcquisition , +// pstrUsageFreezeThaw , +// pstrUsageClipStore , +// pstrUsageUpdate , +// pstrUsageNext , +// pstrUsageSave , +// pstrUsagePrint , +// pstrUsageMicrophoneEnable +//}; +//const char *medInstrTitles1[] PROGMEM = +//{ +// pstrUsageCine , +// pstrUsageTransmitPower , +// pstrUsageVolume , +// pstrUsageFocus , +// pstrUsageDepth +//}; +//const char *medInstrTitles2[] PROGMEM = +//{ +// pstrUsageSoftStepPrimary , +// pstrUsageSoftStepSecondary +//}; +//const char *medInstrTitles3[] PROGMEM = +//{ +// pstrUsageZoomSelect , +// pstrUsageZoomAdjust , +// pstrUsageSpectralDopplerModeSelect , +// pstrUsageSpectralDopplerModeAdjust , +// pstrUsageColorDopplerModeSelect , +// pstrUsageColorDopplerModeAdjust , +// pstrUsageMotionModeSelect , +// pstrUsageMotionModeAdjust , +// pstrUsage2DModeSelect , +// pstrUsage2DModeAdjust +//}; +//const char *medInstrTitles4[] PROGMEM = +//{ +// pstrUsageSoftControlSelect , +// pstrUsageSoftControlAdjust +//}; + +#endif // __HIDUSAGETITLEARRAYS_H__ \ No newline at end of file