/* This function retrieves data from HID item. It only supports short items, which has 4 types of data: 0, 1, 2, or 4 bytes. */
UINT32 GetItemData(IN HID_ITEM *HidItem)
/* This function retrieves data from HID item. It only supports short items, which has 4 types of data: 0, 1, 2, or 4 bytes. */
UINT32 GetItemData(IN HID_ITEM *HidItem)
{
  switch (HidItem->Size) {
    case 1:
      return HidItem->Data.Uint8;
    case 2:
      return HidItem->Data.Uint16;
    case 4:
      return HidItem->Data.Uint32;
  }
  return 0;
}