From 8b77db6280c6d832eb89455e1b30877454a9a5a1 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 30 Nov 2016 22:05:43 -0500 Subject: Starting to get data. --- src/survive_internal.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/survive_internal.h') diff --git a/src/survive_internal.h b/src/survive_internal.h index 70249e3..394842b 100644 --- a/src/survive_internal.h +++ b/src/survive_internal.h @@ -6,7 +6,7 @@ #include #include -#define SV_INFO( x... ) printf( x ) +#define SV_INFO( x... ) { char stbuff[1024]; sprintf( stbuff, x ); ctx->notefunction( ctx, stbuff ); } #define SV_ERROR( x... ) { char stbuff[1024]; sprintf( stbuff, x ); ctx->faultfunction( ctx, stbuff ); } //XXX TODO This one needs to be rewritten. @@ -26,7 +26,8 @@ #define USB_IF_LIGHTCAP 4 #define MAX_INTERFACES 5 -#define INTBUFFSIZE 64 +#define INTBUFFSIZE 64 +#define SENSORS_PER_OBJECT 32 struct SurviveContext; struct SurviveUSBInterface; @@ -44,18 +45,27 @@ struct SurviveUSBInterface const char * hname; //human-readable names }; +struct SurvivePhoto +{ + uint32_t last; + uint32_t lastcode; + uint32_t lastlength; +}; + struct SurviveContext { //USB Subsystem struct libusb_context* usbctx; void(*faultfunction)( struct SurviveContext * ctx, const char * fault ); + void(*notefunction)( struct SurviveContext * ctx, const char * fault ); struct libusb_device_handle * udev[MAX_USB_DEVS]; struct SurviveUSBInterface uiface[MAX_INTERFACES]; + +// struct SurvivePhoto }; //USB Subsystem - void survive_usb_close( struct SurviveContext * t ); int survive_usb_init( struct SurviveContext * t ); int survive_usb_poll( struct SurviveContext * ctx ); -- cgit v1.2.3