2 * Copyright 2009-2011, Michael Lotz, mmlr@mlotz.ch.
3 * Distributed under the terms of the MIT License.
5 #ifndef HID_REPORT_ITEM_H
6 #define HID_REPORT_ITEM_H
8 #include <SupportDefs.h>
14 HIDReportItem(HIDReport
*report
,
15 uint32 bitOffset
, uint8 bitLength
,
16 bool hasData
, bool isArray
, bool isRelative
,
17 uint32 minimum
, uint32 maximum
,
18 uint32 usageMinimum
, uint32 usageMaximum
);
20 HIDReport
* Report() { return fReport
; };
22 bool HasData() { return fHasData
; };
23 bool Relative() { return fRelative
; };
24 bool Array() { return fArray
; };
25 bool Signed() { return fMinimum
> fMaximum
; };
30 uint32
UsageMinimum() { return fUsageMinimum
; };
31 uint32
UsageMaximum() { return fUsageMaximum
; };
36 status_t
SetData(uint32 data
);
37 uint32
Data() { return fData
; };
39 uint32
ScaledData(uint8 scaleToBits
, bool toBeSigned
);
40 uint32
ScaledRangeData(uint32 minimum
, uint32 maximum
);
41 float ScaledFloatData();
43 bool Valid() { return fValid
; };
45 void PrintToStream(uint32 indentLevel
= 0);
65 #endif // HID_REPORT_ITEM_H