2 * Copyright 2011, Michael Lotz, mmlr@mlotz.ch.
3 * Distributed under the terms of the MIT License.
8 #include "HIDDataTypes.h"
13 HIDWriter(size_t blockSize
= 20);
18 status_t
DefineInputPadding(uint8 count
,
20 status_t
DefineInputData(uint8 count
, uint8 bitLength
,
21 main_item_data data
, uint32 logicalMinimum
,
22 uint32 logicalMaximum
, uint16 usagePage
,
24 uint16 usageMaximum
= 0xffff);
26 status_t
BeginCollection(uint8 collectionType
,
27 uint16 usagePage
, uint16 usageID
);
28 status_t
EndCollection();
32 status_t
SetUsagePage(uint16 usagePage
);
33 status_t
SetLogicalMinimum(uint32 logicalMinimum
);
34 status_t
SetLogicalMaximum(uint32 logicalMaximum
);
35 status_t
SetReportSize(uint8 reportSize
);
36 status_t
SetReportID(uint8 reportID
);
37 status_t
SetReportCount(uint8 reportCount
);
39 status_t
LocalSetUsageID(uint16 usageID
);
40 status_t
LocalSetUsageMinimum(uint16 usageMinimum
);
41 status_t
LocalSetUsageMaximum(uint16 usageMaximum
);
43 status_t
BeginCollection(uint8 collectionType
);
45 status_t
Input(main_item_data data
);
46 status_t
Output(main_item_data data
);
47 status_t
Feature(main_item_data data
);
51 status_t
WriteShortItem(uint8 type
, uint8 tag
,
53 status_t
Write(const void *data
, size_t length
);
55 size_t BufferLength() { return fBufferUsed
; };
56 const uint8
* Buffer() { return fBuffer
; };
62 size_t fBufferAllocated
;
68 #endif // HID_WRITER_H