/* Callback for the HID Report Parser. This function is called each time the HID report parser is about to store an IN, OUT or FEATURE item into the HIDReportInfo structure. To save on RAM, we are able to filter out items we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would have occupied). */
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t *const CurrentItem)
/* Callback for the HID Report Parser. This function is called each time the HID report parser is about to store an IN, OUT or FEATURE item into the HIDReportInfo structure. To save on RAM, we are able to filter out items we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would have occupied). */
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t *const CurrentItem)
{
	bool IsMouse = false;
	for (HID_CollectionPath_t* CurrPath = CurrentItem->CollectionPath; CurrPath != NULL; CurrPath = CurrPath->Parent)
	{
		if ((CurrPath->Usage.Page  == USAGE_PAGE_GENERIC_DCTRL) &&
		    (CurrPath->Usage.Usage == USAGE_MOUSE))
		{
			IsMouse = true;
			break;
		}
	}
	if (!IsMouse)
	  return false;
	return ((CurrentItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) ||
	        (CurrentItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL));
}