From aed7e4dc9012271e99699c63466b6a925c44d8d7 Mon Sep 17 00:00:00 2001 From: pavel Date: Tue, 14 Oct 2014 11:57:37 +0300 Subject: [PATCH] Misc. --- .editorconfig | 34 ++++++++++++++++++++++++++++++++++ commandline/usbrelay-cmd.c | 5 +++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fdce3a8 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/commandline/usbrelay-cmd.c b/commandline/usbrelay-cmd.c index 1c8c9a4..f90b9c0 100644 --- a/commandline/usbrelay-cmd.c +++ b/commandline/usbrelay-cmd.c @@ -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; -- 2.25.1