Esempio n. 1
0
        /*------------------------------------------------------------------------------------------
        *                      HID Interface class demo code
        *
        * This demo code returns the details of all connected HID devices, then selects one of them
        * and connects to it. A synchronous read / write operation is performed and the device is
        * closed.
        * Two methods are included to show the synchronous and asynchronous operations of this software.
        *
        * The intention of this code is to provide a demonstration which can be run in a debug
        * environment, and the sample methods can be cut and pasted into your program
        * ----------------------------------------------------------------------------------------*/

        static void Main(string[] args)
        {
            HID_demo demo = new HID_demo();

            //call one or other of these methods to demonstrate each type of operation - sync and async
            demo.startAsyncOperation();
            //demo.useSynchronousOperation();
        }
Esempio n. 2
0
        /*------------------------------------------------------------------------------------------
         *                      HID Interface class demo code
         *
         * This demo code returns the details of all connected HID devices, then selects one of them
         * and connects to it. A synchronous read / write operation is performed and the device is
         * closed.
         * Two methods are included to show the synchronous and asynchronous operations of this software.
         *
         * The intention of this code is to provide a demonstration which can be run in a debug
         * environment, and the sample methods can be cut and pasted into your program
         * ----------------------------------------------------------------------------------------*/
        static void Main(string[] args)
        {
            HID_demo demo = new HID_demo();

            //call one or other of these methods to demonstrate each type of operation - sync and async
            demo.startAsyncOperation();
            //demo.useSynchronousOperation();
        }