Changeset 07498c1 in mainline
- Timestamp:
 - 2011-11-07T08:37:51Z (14 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - 05920d23
 - Parents:
 - e3e0953
 - Location:
 - uspace/lib/usbhid
 - Files:
 - 
      
- 2 edited
 
- 
          
  include/usb/hid/usages/consumer.h (modified) (1 diff)
 - 
          
  src/consumer.c (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/lib/usbhid/include/usb/hid/usages/consumer.h
re3e0953 r07498c1 37 37 #define LIBUSBHID_CONSUMER_H_ 38 38 39 const char *usbhid_multimedia_usage_to_str( intusage);39 const char *usbhid_multimedia_usage_to_str(unsigned usage); 40 40 41 41 #endif /* LIBUSBHID_CONSUMER_H_ */  - 
      
uspace/lib/usbhid/src/consumer.c
re3e0953 r07498c1 38 38 #include <usb/hid/usages/consumer.h> 39 39 40 static const char *usbhid_consumer_usage_str[ 0x29d] = {40 static const char *usbhid_consumer_usage_str[] = { 41 41 [0x01] = "Consumer Control", 42 42 [0x02] = "Numeric Key Pad", … … 358 358 [0x13e] = "Reserved", 359 359 [0x13f] = "Reserved", 360 [0x140] = "Reserved", 360 [0x140] = "Reserved", 361 361 [0x141] = "Reserved", 362 362 [0x142] = "Reserved", … … 717 717 * @retval HelenOS key code corresponding to the given USB Consumer Page Usage. 718 718 */ 719 const char *usbhid_multimedia_usage_to_str( intusage)719 const char *usbhid_multimedia_usage_to_str(unsigned usage) 720 720 { 721 size_t map_length = sizeof(usbhid_consumer_usage_str) / sizeof(char *); 721 static const size_t map_length = 722 sizeof(usbhid_consumer_usage_str) / sizeof(char *); 722 723 723 if ( (usage < 0) || ((size_t)usage >= map_length))724 if (usage >= map_length) 724 725 return "Unknown usage"; 725 726 726 /*! @todo What if the usage is not in the table? */727 727 return usbhid_consumer_usage_str[usage]; 728 728 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  