Skip to content

Commit b7d4490

Browse files
committed
Report: add CreateBuffer method that returns an initialized report buffer
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
1 parent e00dd4a commit b7d4490

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

HidSharp/Reports/Report.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ void ComputeLength()
127127
_computed = true;
128128
}
129129

130+
public byte[] CreateBuffer()
131+
{
132+
byte[] buffer = new byte[Length];
133+
buffer[0] = ReportID;
134+
return buffer;
135+
}
136+
130137
public DeviceItem DeviceItem
131138
{
132139
get;

0 commit comments

Comments
 (0)