darwin_libusb.h File Reference

#include <IOKit/IOCFBundle.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/usb/IOUSBLib.h>
#include <IOKit/IOKitLib.h>
Include dependency graph for darwin_libusb.h:

Go to the source code of this file.

Defines

#define LUSBDARWINSTALL   (ELAST+1)
#define USB_ERROR(r, x)
#define USB_ERROR_STR(r, x, format, args...)
#define USB_ERROR_STR_ORIG(x, format, args...)
#define USB_ERROR_STR_NO_RET(x, format, args...)

Enumerations

enum  usb_error_type_t { USB_ERROR_TYPE_NONE = 0, USB_ERROR_TYPE_STRING, USB_ERROR_TYPE_ERRNO }

Variables

char usb_error_str [1024]
int usb_error_errno
usb_error_type_t usb_error_type

Define Documentation

#define LUSBDARWINSTALL   (ELAST+1)
#define USB_ERROR ( r,
 ) 
Value:
do {                                             \
    usb_error_type = USB_ERROR_TYPE_ERRNO;       \
    usb_error_errno = x;                         \
    return (r);                                  \
  } while (0)
#define USB_ERROR_STR ( r,
x,
format,
args...   ) 
Value:
do {                                                                    \
    usb_error_type = USB_ERROR_TYPE_STRING;                             \
    snprintf (usb_error_str, sizeof (usb_error_str) - 1,                \
              format, ## args);                                         \
    if (usb_debug) {                                                    \
      std::cerr << "USB error: " << usb_error_str << std::cerr;         \
    }                                                                   \
    return (r);                                                         \
  } while (0)

Referenced by fusb_ephandle_darwin::start(), and fusb_ephandle_darwin::write().

#define USB_ERROR_STR_NO_RET ( x,
format,
args...   ) 
Value:
do {                                                                    \
    usb_error_type = USB_ERROR_TYPE_STRING;                             \
    snprintf (usb_error_str, sizeof (usb_error_str) - 1,                \
              format, ## args);                                         \
    if (usb_debug) {                                                    \
      std::cerr << "USB error: " << usb_error_str << std::endl;         \
    }                                                                   \
  } while (0)

Referenced by fusb_ephandle_darwin::abort().

#define USB_ERROR_STR_ORIG ( x,
format,
args...   ) 
Value:
do {                                                                    \
    usb_error_type = USB_ERROR_TYPE_STRING;                             \
    snprintf (usb_error_str, sizeof (usb_error_str) - 1,                \
              format, ## args);                                         \
    if (usb_debug) {                                                    \
      std::cerr << "USB error: " << usb_error_str << std::endl;         \
    }                                                                   \
    return (x);                                                         \
  } while (0)

Enumeration Type Documentation

Enumerator:
USB_ERROR_TYPE_NONE 
USB_ERROR_TYPE_STRING 
USB_ERROR_TYPE_ERRNO 

Variable Documentation

char usb_error_str[1024]
Generated on Sat Oct 23 17:30:23 2010 for Universal Software Radio Peripheral by  doxygen 1.6.3