~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy-proposed

« back to all changes in this revision

Viewing changes to xpp/astribank_usb.h

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2013-08-25 12:48:37 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130825124837-wtefi7f9dsihg8is
Tags: 1:2.7.0-1ubuntu1
* Merge from debian. Remaining changes:
  - debian/control: Added gawk as dependency for dkms build
  - debian/control: Package dahdi Depends on dahdi-dkms | dahdi-source
  - debian/control: Set ubuntu maintainer    
  - added debian/dahdi.postinst
  - debian/control: Removed Uploaders field.
  - added debian/dahdi.postinst
  - added --error-handler=init_failed to debian/rules
  

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 */
24
24
 
25
25
#include <stdio.h>
26
 
#include <usb.h>
 
26
#include <xusb.h>
 
27
#include <xtalk.h>
27
28
#include "mpp.h"
28
29
 
29
30
/*
63
64
};
64
65
 
65
66
struct astribank_device {
66
 
        struct usb_device       *dev;
 
67
        struct xusb             *xusb;
 
68
        struct xtalk_device     *xtalk_dev;
67
69
        usb_dev_handle          *handle;
68
70
        int                     my_interface_num;
69
71
        int                     my_ep_out;
70
72
        int                     my_ep_in;
71
 
        char                    iManufacturer[BUFSIZ];
72
 
        char                    iProduct[BUFSIZ];
73
 
        char                    iSerialNumber[BUFSIZ];
74
73
        char                    iInterface[BUFSIZ];
75
74
        int                     is_usb2;
76
75
        enum eeprom_type        eeprom_type;
79
78
        uint8_t                 mpp_proto_version;
80
79
        struct eeprom_table     *eeprom;
81
80
        struct firmware_versions        fw_versions;
82
 
        const struct interface_type     *fwtype;
83
81
        uint16_t                tx_sequenceno;
84
82
};
85
83
 
100
98
int astribank_has_twinstar(struct astribank_device *astribank);
101
99
int label_isvalid(const char *label);
102
100
 
 
101
#define AB_REPORT(report_type, astribank, fmt, ...) \
 
102
        report_type("%s [%s]: " fmt, \
 
103
                xusb_devpath((astribank)->xusb), \
 
104
                xusb_serial((astribank)->xusb), \
 
105
                ## __VA_ARGS__)
 
106
 
 
107
#define AB_INFO(astribank, fmt, ...) \
 
108
                AB_REPORT(INFO, astribank, fmt, ## __VA_ARGS__)
 
109
 
 
110
#define AB_ERR(astribank, fmt, ...) \
 
111
                AB_REPORT(ERR, astribank, fmt, ## __VA_ARGS__)
 
112
 
103
113
#endif  /* ASTRIBANK_USB_H */