Esempio n. 1
0
        public void WriteReport(HidReport report, WriteCallback callback, int timeout)
        {
            var writeReportDelegate = new WriteReportDelegate(WriteReport);
            var asyncState          = new HidAsyncState(writeReportDelegate, callback);

            writeReportDelegate.BeginInvoke(report, timeout, EndWriteReport, asyncState);
        }
Esempio n. 2
0
        public async Task <bool> WriteReportAsync(HidReport report, int timeout = 0)
        {
            var writeReportDelegate = new WriteReportDelegate(WriteReport);

            return(await Task <bool> .Factory.FromAsync(writeReportDelegate.BeginInvoke, writeReportDelegate.EndInvoke, report, timeout, null));
        }
Esempio n. 3
0
 public bool WriteReport(HidReport report, int timeout)
 {
     return(Write(report.GetBytes(), timeout));
 }
Esempio n. 4
0
 public void WriteReport(HidReport report, WriteCallback callback)
 {
     WriteReport(report, callback, 0);
 }
Esempio n. 5
0
 public bool WriteReport(HidReport report)
 {
     return(WriteReport(report, 0));
 }