Misc.
authorpavel <pavel@aaa>
Tue, 14 Oct 2014 08:57:37 +0000 (11:57 +0300)
committerpavel <pavel@aaa>
Tue, 14 Oct 2014 08:58:00 +0000 (11:58 +0300)
.editorconfig [new file with mode: 0644]
commandline/usbrelay-cmd.c

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..fdce3a8
--- /dev/null
@@ -0,0 +1,34 @@
+;
+; http://editorconfig.org/#supported-properties
+root = true  ; top-most EditorConfig file
+
+[*]
+end_of_line = lf
+insert_final_newline = false
+
+; 4 space indentation
+[*.c]
+charset = latin1
+indent_style = space
+indent_size = 4
+
+[*.h]
+charset = latin1
+indent_style = space
+indent_size = 4
+
+[*.cpp]
+charset = latin1
+indent_style = space
+indent_size = 4
+
+[*.txt]
+indent_style = tab
+indent_size = 8
+end_of_line = crlf
+;insert_final_newline = false
+
+[*.bat]
+end_of_line = crlf
+indent_style = space
+indent_size = 2
index 1c8c9a458a5e97d74bf884c203c816b409c5d398..f90b9c065e0361b522f7897b1a30db6195d5d7a8 100644 (file)
@@ -2,10 +2,11 @@
 //
 // pa01 15-Apr-2014
 // Currently finds the 1st matching device by ven,dev, product name string.
+// Two channel devices only!
 // TODO:
 // - Enum all matching devices, select one by ID
 // - Determine the relay model (1 or 2 or more) by product string? 
-// Windows build: using VC++2008 & WDK7.1
+// Build for Windows: using VC++ 2008 and WDK7.1
 //~~~~~~~~~~~~~~~~~~~~~~~~
 
 /* Prototype: V-USB example: vusb-20121206/examples/hid-data/commandline/hidtool.c 
@@ -211,7 +212,7 @@ static int rel_onoff( USBDEVHANDLE dev, int is_on, char const *numstr )
 
 int main(int argc, char **argv)
 {
-    usbDevice_t *dev;
+    USBDEVHANDLE dev;
     int         err;
     char const *arg1 = (argc >= 2) ? argv[1] : NULL;
     char const *arg2 = (argc >= 3) ? argv[2] : NULL;