aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-10-19 19:38:06 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-10-19 19:38:06 +0100
commit8f3c91e91b634adaca77dac6cf314445cceefc78 (patch)
tree8a779a28ccfbbfae413f6f7df21fb0a8650d3747 /examples
parentbd7a4f258643bf72d5e97f86f0f2272b381ed1ba (diff)
downloadlibphidget21-8f3c91e91b634adaca77dac6cf314445cceefc78.tar.gz
Imported Upstream version 2.1.8.20120912upstream/2.1.8.20120912
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.in64
-rw-r--r--examples/manager.c7
-rw-r--r--examples/phidgetsbclist.c4
3 files changed, 40 insertions, 35 deletions
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 157dfd0..fb9c1cb 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -49,8 +49,8 @@ PROGRAMS = $(noinst_PROGRAMS)
ifkit_SOURCES = ifkit.c
ifkit_OBJECTS = ifkit.$(OBJEXT)
ifkit_LDADD = $(LDADD)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
manager_SOURCES = manager.c
manager_OBJECTS = manager.$(OBJEXT)
@@ -68,21 +68,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = ifkit.c manager.c phidgetsbclist.c
DIST_SOURCES = ifkit.c manager.c phidgetsbclist.c
@@ -105,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -129,6 +130,7 @@ LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -154,6 +156,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -186,7 +189,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -246,13 +248,13 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-ifkit$(EXEEXT): $(ifkit_OBJECTS) $(ifkit_DEPENDENCIES)
+ifkit$(EXEEXT): $(ifkit_OBJECTS) $(ifkit_DEPENDENCIES) $(EXTRA_ifkit_DEPENDENCIES)
@rm -f ifkit$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ifkit_OBJECTS) $(ifkit_LDADD) $(LIBS)
-manager$(EXEEXT): $(manager_OBJECTS) $(manager_DEPENDENCIES)
+manager$(EXEEXT): $(manager_OBJECTS) $(manager_DEPENDENCIES) $(EXTRA_manager_DEPENDENCIES)
@rm -f manager$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(manager_OBJECTS) $(manager_LDADD) $(LIBS)
-phidgetsbclist$(EXEEXT): $(phidgetsbclist_OBJECTS) $(phidgetsbclist_DEPENDENCIES)
+phidgetsbclist$(EXEEXT): $(phidgetsbclist_OBJECTS) $(phidgetsbclist_DEPENDENCIES) $(EXTRA_phidgetsbclist_DEPENDENCIES)
@rm -f phidgetsbclist$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(phidgetsbclist_OBJECTS) $(phidgetsbclist_LDADD) $(LIBS)
@@ -269,26 +271,23 @@ distclean-compile:
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -392,10 +391,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/examples/manager.c b/examples/manager.c
index 74bddbd..d44acfa 100644
--- a/examples/manager.c
+++ b/examples/manager.c
@@ -29,7 +29,7 @@ int gotAttach(CPhidgetHandle phid, void *ptr) {
CPhidget_getDeviceLabel(phid, &label);
CPhidget_getSerialNumber(phid, &serial);
CPhidget_getDeviceVersion(phid, &version);
- CPhidget_getDeviceType(phid, &id);
+ CPhidget_getDeviceName(phid, &id);
printf("Device Added: %s, Serial: %d, Version: %d Label: %s\n",id,serial,version,label);
return 0;
@@ -42,7 +42,7 @@ int gotDetach(CPhidgetHandle phid, void *ptr) {
//print out some info
CPhidget_getSerialNumber(phid, &serial);
CPhidget_getDeviceVersion(phid, &version);
- CPhidget_getDeviceType((CPhidgetHandle)phid,(const char **)&id);
+ CPhidget_getDeviceName((CPhidgetHandle)phid,(const char **)&id);
printf("Device Removed: %s, Serial: %d, Version: %d\n",id,serial,version);
return 0;
@@ -53,12 +53,13 @@ int main()
{
CPhidgetManagerHandle phidm;
- CPhidget_enableLogging(PHIDGET_LOG_VERBOSE, NULL);
+ //CPhidget_enableLogging(PHIDGET_LOG_VERBOSE, NULL);
CPhidgetManager_create(&phidm);
CPhidgetManager_set_OnAttach_Handler(phidm, gotAttach, NULL);
CPhidgetManager_set_OnDetach_Handler(phidm, gotDetach, NULL);
CPhidgetManager_open(phidm);
+ //CPhidgetManager_openRemote(phidm, NULL, NULL);
signal (SIGTERM, sighandler);
signal (SIGINT, sighandler);
diff --git a/examples/phidgetsbclist.c b/examples/phidgetsbclist.c
index 14a719e..000655e 100644
--- a/examples/phidgetsbclist.c
+++ b/examples/phidgetsbclist.c
@@ -53,14 +53,14 @@ int display_device_info(CPhidgetSBCHandle sbc)
int attach(CPhidgetSBCHandle sbc, void *userPtr)
{
- printf("===ATTACH===\n");
+ printf("\n===ATTACH===\n");
display_device_info(sbc);
return 0;
}
int detach(CPhidgetSBCHandle sbc, void *userPtr)
{
- printf("===DETACH===\n");
+ printf("\n===DETACH===\n");
display_device_info(sbc);
return 0;
}