/*
LUFA Library
- Copyright (C) Dean Camera, 2013.
+ Copyright (C) Dean Camera, 2018.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
HID_ReportInfo_t* const ParserData)
{
HID_StateTable_t StateTable[HID_STATETABLE_STACK_DEPTH];
- HID_StateTable_t* CurrStateTable = &StateTable[0];
- HID_CollectionPath_t* CurrCollectionPath = NULL;
- HID_ReportSizeInfo_t* CurrReportIDInfo = &ParserData->ReportIDSizes[0];
+ HID_StateTable_t* CurrStateTable = &StateTable[0];
+ HID_CollectionPath_t* CurrCollectionPath = NULL;
+ HID_ReportSizeInfo_t* CurrReportIDInfo = &ParserData->ReportIDSizes[0];
uint16_t UsageList[HID_USAGE_STACK_DEPTH];
- uint8_t UsageListSize = 0;
- HID_MinMax_t UsageMinMax = {0, 0};
+ uint8_t UsageListSize = 0;
+ HID_MinMax_t UsageMinMax = {0, 0};
memset(ParserData, 0x00, sizeof(HID_ReportInfo_t));
memset(CurrStateTable, 0x00, sizeof(HID_StateTable_t));
memcpy((CurrStateTable + 1),
CurrStateTable,
- sizeof(HID_ReportItem_t));
+ sizeof(HID_StateTable_t));
CurrStateTable++;
break;
while (DataBitsRem--)
{
- if (ReportItem->Value & (1 << (CurrentBit % 8)))
- ReportData[CurrentBit / 8] |= BitMask;
+ if (ReportItem->Value & BitMask)
+ ReportData[CurrentBit / 8] |= (1 << (CurrentBit % 8));
CurrentBit++;
BitMask <<= 1;