// TAMS USB Switch Controller Example // A program to manage more than one USB Switch Controller. #include #include "tamsSC.h" main () { tHANDLE handle1, handle2; // The "tamsSCusb1" and "tamsSCusb2" strings MUST match the identifiers // shown in the title bar of the Graphical User Interface. // See "Using more than one TAMS 1887 in a System" in the // Installation and Operation Manual. if (INVALID_HANDLE_VALUE == (handle1 = tamsSCstart ("tamsSCusb1"))) { fprintf (stderr, tamsSCerror () ); exit (1); } if (INVALID_HANDLE_VALUE == (handle2 = tamsSCstart ("tamsSCusb2"))) { fprintf (stderr, tamsSCerror () ); exit (1); } // Now set switch 4 of each controller to position 2. tamsSCswitch (handle1, SWITCH_4, POSITION_2); tamsSCswitch (handle2, SWITCH_4, POSITION_2); tamsSCend (handle1); tamsSCend (handle2); }