[tuxdroid-svn] r1001 - software_suite_v2/middleware/tuxdriver/trunk/src
Status: Beta
Brought to you by:
ks156
From: eFfeM <c2m...@c2...> - 2008-04-21 19:17:34
|
Author: eFfeM Date: 2008-04-21 21:17:27 +0200 (Mon, 21 Apr 2008) New Revision: 1001 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_error.h software_suite_v2/middleware/tuxdriver/trunk/src/tux_misc.h software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.h software_suite_v2/middleware/tuxdriver/trunk/src/usb.h Log: converted tabs to spaces Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_error.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_error.h 2008-04-21 19:11:46 UTC (rev 1000) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_error.h 2008-04-21 19:17:27 UTC (rev 1001) @@ -21,22 +21,22 @@ #ifndef _TUX_ERROR_H_ #define _TUX_ERROR_H_ -#define TUX_ERROR_BEGIN 256 +#define TUX_ERROR_BEGIN 256 typedef int TuxDrvError; typedef enum { - E_TUXDRV_NOERROR = 0, - E_TUXDRV_PARSERISDISABLED = TUX_ERROR_BEGIN, - E_TUXDRV_INVALIDCOMMAND, - E_TUXDRV_STACKOVERFLOW, - E_TUXDRV_FILEERROR, - E_TUXDRV_BADWAVFILE, - E_TUXDRV_INVALIDIDENTIFIER, - E_TUXDRV_INVALIDNAME, - E_TUXDRV_INVALIDPARAMETER, - E_TUXDRV_BUSY, - E_TUXDRV_WAVSIZEEXCEDED, + E_TUXDRV_NOERROR = 0, + E_TUXDRV_PARSERISDISABLED = TUX_ERROR_BEGIN, + E_TUXDRV_INVALIDCOMMAND, + E_TUXDRV_STACKOVERFLOW, + E_TUXDRV_FILEERROR, + E_TUXDRV_BADWAVFILE, + E_TUXDRV_INVALIDIDENTIFIER, + E_TUXDRV_INVALIDNAME, + E_TUXDRV_INVALIDPARAMETER, + E_TUXDRV_BUSY, + E_TUXDRV_WAVSIZEEXCEDED, } tux_drv_error_t; extern const char *tux_error_strerror(TuxDrvError error_code); Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_misc.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_misc.h 2008-04-21 19:11:46 UTC (rev 1000) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_misc.h 2008-04-21 19:17:27 UTC (rev 1001) @@ -29,8 +29,8 @@ #ifdef WIN32 # include <windows.h> # include <mmsystem.h> -# define sleep(sec) Sleep(sec * 1000) -# define usleep(usec) Sleep(usec / 1000) +# define sleep(sec) Sleep(sec * 1000) +# define usleep(usec) Sleep(usec / 1000) # define LIBEXPORT __declspec(dllexport) # define LIBLOCAL #else @@ -40,7 +40,7 @@ /** - * Callback function prototype for simple event + * Callback function prototype for simple event */ typedef void(*simple_callback_t)(void); Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.h 2008-04-21 19:11:46 UTC (rev 1000) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.h 2008-04-21 19:17:27 UTC (rev 1001) @@ -40,7 +40,7 @@ #define MIN_FIRMWARE_VERSION 0x030 #ifdef WIN32 -# define usb_busses usb_get_busses() +# define usb_busses usb_get_busses() #endif typedef int TuxUSBError; @@ -62,25 +62,25 @@ } tux_usb_error_code_t; /** - * Callback function for the frame receiving event - * @param data A pointer to the frame + * Callback function for the frame receiving event + * @param data A pointer to the frame */ typedef void(*frame_callback_t)(unsigned char *data); /** - * Callback function prototype for the RF state event - * @param state state of rf connection + * Callback function prototype for the RF state event + * @param state state of rf connection */ typedef void(*rf_state_callback_t)(unsigned char state); /** Initialization of the module - Some mutex are initialized in this function. + Some mutex are initialized in this function. */ extern void tux_usb_init_module(void); /** - * Finalization of the module - * Some mutex are finalizaed in this function. + * Finalization of the module + * Some mutex are finalizaed in this function. */ extern void tux_usb_exit_module(void); @@ -93,13 +93,13 @@ extern TuxUSBError tux_usb_capture(void); /** Release of the usb handle - @return An error code indicating the success of the operation. + @return An error code indicating the success of the operation. (TuxUSBNoError | TuxUSBCantReleaseInterface | TuxUSBCantCloseDevice) */ extern TuxUSBError tux_usb_release(void); /** Set the callback function for the frame event. - @param funct The function will be linked + @param funct The function will be linked */ extern void tux_usb_set_frame_callback(frame_callback_t funct); Modified: software_suite_v2/middleware/tuxdriver/trunk/src/usb.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/usb.h 2008-04-21 19:11:46 UTC (rev 1000) +++ software_suite_v2/middleware/tuxdriver/trunk/src/usb.h 2008-04-21 19:17:27 UTC (rev 1001) @@ -34,39 +34,39 @@ /* * Device and/or Interface Class codes */ -#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ -#define USB_CLASS_AUDIO 1 -#define USB_CLASS_COMM 2 -#define USB_CLASS_HID 3 -#define USB_CLASS_PRINTER 7 -#define USB_CLASS_MASS_STORAGE 8 -#define USB_CLASS_HUB 9 -#define USB_CLASS_DATA 10 -#define USB_CLASS_VENDOR_SPEC 0xff +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_DATA 10 +#define USB_CLASS_VENDOR_SPEC 0xff /* * Descriptor types */ -#define USB_DT_DEVICE 0x01 -#define USB_DT_CONFIG 0x02 -#define USB_DT_STRING 0x03 -#define USB_DT_INTERFACE 0x04 -#define USB_DT_ENDPOINT 0x05 +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 -#define USB_DT_HID 0x21 -#define USB_DT_REPORT 0x22 -#define USB_DT_PHYSICAL 0x23 -#define USB_DT_HUB 0x29 +#define USB_DT_HID 0x21 +#define USB_DT_REPORT 0x22 +#define USB_DT_PHYSICAL 0x23 +#define USB_DT_HUB 0x29 /* * Descriptor sizes per descriptor type */ -#define USB_DT_DEVICE_SIZE 18 -#define USB_DT_CONFIG_SIZE 9 -#define USB_DT_INTERFACE_SIZE 9 -#define USB_DT_ENDPOINT_SIZE 7 -#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ -#define USB_DT_HUB_NONVAR_SIZE 7 +#define USB_DT_DEVICE_SIZE 18 +#define USB_DT_CONFIG_SIZE 9 +#define USB_DT_INTERFACE_SIZE 9 +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ +#define USB_DT_HUB_NONVAR_SIZE 7 @@ -93,7 +93,7 @@ }; /* Endpoint descriptor */ -#define USB_MAXENDPOINTS 32 +#define USB_MAXENDPOINTS 32 struct usb_endpoint_descriptor { unsigned char bLength; unsigned char bDescriptorType; @@ -104,21 +104,21 @@ unsigned char bRefresh; unsigned char bSynchAddress; - unsigned char *extra; /* Extra descriptors */ + unsigned char *extra; /* Extra descriptors */ int extralen; }; -#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ -#define USB_ENDPOINT_DIR_MASK 0x80 +#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ +#define USB_ENDPOINT_DIR_MASK 0x80 -#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ -#define USB_ENDPOINT_TYPE_CONTROL 0 -#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 -#define USB_ENDPOINT_TYPE_BULK 2 -#define USB_ENDPOINT_TYPE_INTERRUPT 3 +#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ +#define USB_ENDPOINT_TYPE_CONTROL 0 +#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 +#define USB_ENDPOINT_TYPE_BULK 2 +#define USB_ENDPOINT_TYPE_INTERRUPT 3 /* Interface descriptor */ -#define USB_MAXINTERFACES 32 +#define USB_MAXINTERFACES 32 struct usb_interface_descriptor { unsigned char bLength; unsigned char bDescriptorType; @@ -132,11 +132,11 @@ struct usb_endpoint_descriptor *endpoint; - unsigned char *extra; /* Extra descriptors */ + unsigned char *extra; /* Extra descriptors */ int extralen; }; -#define USB_MAXALTSETTING 128 /* Hard limit */ +#define USB_MAXALTSETTING 128 /* Hard limit */ struct usb_interface { struct usb_interface_descriptor *altsetting; @@ -145,7 +145,7 @@ }; /* Configuration descriptor information.. */ -#define USB_MAXCONFIG 8 +#define USB_MAXCONFIG 8 struct usb_config_descriptor { unsigned char bLength; unsigned char bDescriptorType; @@ -158,7 +158,7 @@ struct usb_interface *interface; - unsigned char *extra; /* Extra descriptors */ + unsigned char *extra; /* Extra descriptors */ int extralen; }; @@ -191,39 +191,39 @@ /* * Standard requests */ -#define USB_REQ_GET_STATUS 0x00 -#define USB_REQ_CLEAR_FEATURE 0x01 +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 /* 0x02 is reserved */ -#define USB_REQ_SET_FEATURE 0x03 +#define USB_REQ_SET_FEATURE 0x03 /* 0x04 is reserved */ -#define USB_REQ_SET_ADDRESS 0x05 -#define USB_REQ_GET_DESCRIPTOR 0x06 -#define USB_REQ_SET_DESCRIPTOR 0x07 -#define USB_REQ_GET_CONFIGURATION 0x08 -#define USB_REQ_SET_CONFIGURATION 0x09 -#define USB_REQ_GET_INTERFACE 0x0A -#define USB_REQ_SET_INTERFACE 0x0B -#define USB_REQ_SYNCH_FRAME 0x0C +#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_GET_DESCRIPTOR 0x06 +#define USB_REQ_SET_DESCRIPTOR 0x07 +#define USB_REQ_GET_CONFIGURATION 0x08 +#define USB_REQ_SET_CONFIGURATION 0x09 +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C -#define USB_TYPE_STANDARD (0x00 << 5) -#define USB_TYPE_CLASS (0x01 << 5) -#define USB_TYPE_VENDOR (0x02 << 5) -#define USB_TYPE_RESERVED (0x03 << 5) +#define USB_TYPE_STANDARD (0x00 << 5) +#define USB_TYPE_CLASS (0x01 << 5) +#define USB_TYPE_VENDOR (0x02 << 5) +#define USB_TYPE_RESERVED (0x03 << 5) -#define USB_RECIP_DEVICE 0x00 -#define USB_RECIP_INTERFACE 0x01 -#define USB_RECIP_ENDPOINT 0x02 -#define USB_RECIP_OTHER 0x03 +#define USB_RECIP_DEVICE 0x00 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_OTHER 0x03 /* * Various libusb API related stuff */ -#define USB_ENDPOINT_IN 0x80 -#define USB_ENDPOINT_OUT 0x00 +#define USB_ENDPOINT_IN 0x80 +#define USB_ENDPOINT_OUT 0x00 /* Error codes */ -#define USB_ERROR_BEGIN 500000 +#define USB_ERROR_BEGIN 500000 /* * This is supposed to look weird. This file is generated from autoconf @@ -245,7 +245,7 @@ struct usb_device_descriptor descriptor; struct usb_config_descriptor *config; - void *dev; /* Darwin support */ + void *dev; /* Darwin support */ unsigned char devnum; |