Skip to content

Commit

Permalink
add packaging target, small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Dec 11, 2020
1 parent b21ef5a commit 87dd7d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ HIDAPI_DIR ?= ../hidapi

# try to do some autodetecting
UNAME := $(shell uname -s)
ARCH := $(shell uname -m)

ifeq "$(UNAME)" "Darwin"
OS=macosx
OS=macos
endif
ifeq "$(OS)" "Windows_NT"
OS=windows
Expand All @@ -26,7 +27,7 @@ endif


############# Mac
ifeq "$(OS)" "macosx"
ifeq "$(OS)" "macos"

LIBS=-framework IOKit -framework CoreFoundation -framework AppKit
OBJS=$(HIDAPI_DIR)/mac/hid.o
Expand Down Expand Up @@ -70,3 +71,7 @@ hidapitester: $(OBJS)
clean:
rm -f $(OBJS)
rm -f hidapitester$(EXE)

package: hidapitester$(EXE)
@echo "Packaging up hidapitester for '$(OS)-$(ARCH)'"
zip hidapitester-$(OS)-$(ARCH).zip hidapitester$(EXE)
14 changes: 7 additions & 7 deletions hidapitester.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ static void print_usage(char *myname)
"\n"
"Examples: \n"
". List all devices \n"
" hidapitester --list \n"
" hidapitester --list \n"
". List details of all devices w/ vendorId 0x2341 \n"
" hidapitester --vidpid 2341 --list-detail \n"
" hidapitester --vidpid 2341 --list-detail \n"
". Open device with usagePage 0xFFAB, send Feature report on reportId 1\n"
" hidapitester -l 9 --usagePage 0xFFAB --open --send-feature 1,99,44,22 \n"
" hidapitester -l 9 --usagePage 0xFFAB --open --send-feature 1,99,44,22 \n"
". Open vid/pid xxxx:yyyy, send 64-byte Output report, read 64-byte Input report\n"
" hidapitester --vidpid xxxx:yyyy -l 64 --open --send-output 1,2,3 --read-input \n"
" hidapitester --vidpid xxxx:yyyy -l 64 --open --send-output 1,2,3 --read-input \n"
". Read Input report continuously with 1500 msec timeout \n"
" hidapitester --vidpid xxxx:yyyy -l 64 -t 1500 --open --read-input-forever\n"
" hidapitester --vidpid xxxx:yyyy -l 64 -t 1500 --open --read-input-forever\n"
". Send FadeToRGB #FF00FF command to blink(1)\n"
" hidapitester --vidpid 27b8:01ed -l 9 --open --send-feature 1,99,255,0,255\n"

" hidapitester --vidpid 27b8:01ed -l 9 --open --send-feature 1,99,255,0,255\n"
"\n"
""

"", myname);
Expand Down

0 comments on commit 87dd7d4

Please sign in to comment.