~ubuntu-branches/ubuntu/karmic/pilot-link/karmic

« back to all changes in this revision

Viewing changes to include/pi-usb.h

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2007-02-14 23:30:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070214233059-znxrekb2mgjr0mgd
Tags: 0.12.2-1
* New upstream release
 - Closes: #410152 "pilot-link: udev rules need updating"
* debian/control: add Build-Depends: libbluetooth2-dev
 - add bluetooth support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * pi-usb.h
 
2
 * $Id: pi-usb.h,v 1.21 2007/02/09 16:11:37 desrod Exp $
 
3
 *
 
4
 * pi-usb.h: Support for USB-connected Palm devices
3
5
 *
4
6
 * This library is free software; you can redistribute it and/or modify it
5
7
 * under the terms of the GNU Library General Public License as published by
15
17
 * along with this library; if not, write to the Free Software Foundation,
16
18
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
19
 */
 
20
 
18
21
#ifndef _PILOT_USB_H_
19
22
#define _PILOT_USB_H_
20
23
 
25
28
extern "C" {
26
29
#endif
27
30
 
 
31
#if defined(sun) && defined(__SVR4)
 
32
#define u_int8_t uint8_t
 
33
#define u_int16_t uint16_t
 
34
#define u_int32_t uint32_t
 
35
#endif
 
36
 
28
37
#define PI_USB_DEV     1
29
38
 
30
39
        struct pi_usb_data;
63
72
                struct pi_usb_impl impl;        /**< structure containing ptr to the actual implementations for the current platform */
64
73
                struct pi_usb_dev dev;          /**< device structure */
65
74
 
66
 
                unsigned char buf[256];         /**< temp. buffer to hold incoming data when peeking at init time*/
 
75
                unsigned char buf[256];         /**< temp. buffer to hold incoming data when peeking at init time */
67
76
                size_t buf_size;
68
77
 
69
 
                /* I/O options */
 
78
                /* IO options */
70
79
                void *ref;                      /**< Used by the platform implementation to keep a ptr to additional private data */
71
80
 
72
 
                /* Baud rate info (for USB serial adapters on platforms where they connect through the USB layer, like Darwin) */
 
81
                /* Baud rate info (for USB serial adapters on platforms
 
82
                   where they connect through the USB layer, like Darwin) */
73
83
                int rate;                       /**< Current port baud rate */
74
84
                int establishrate;              /**< Baud rate to use after link is established */
75
 
                int establishhighrate;          /**< Boolean: try to establish rate higher than the device publishes*/
 
85
                int establishhighrate;          /**< Boolean: try to establish rate higher than the device publishes */
76
86
 
77
87
                int timeout;
78
88
        } pi_usb_data_t;
82
92
        extern int USB_check_device PI_ARGS((pi_usb_data_t *dev, u_int16_t vendor, u_int16_t product));
83
93
        extern int USB_configure_device PI_ARGS((pi_usb_data_t *dev, u_int8_t *input_pipe, u_int8_t *output_pipe));
84
94
 
85
 
 
86
95
        /* Start of the new generic USB pilot init stuff. */
87
96
 
88
97
        /*
89
 
         * USB control requests we send to the devices
90
 
         * From linux/drivers/usb/serial/visor.h
 
98
         * USB control requests we send to the devices From
 
99
         * linux/drivers/usb/serial/visor.h
91
100
         */
92
 
#define GENERIC_REQUEST_BYTES_AVAILABLE         0x01
93
 
#define GENERIC_CLOSE_NOTIFICATION              0x02
94
 
#define VISOR_GET_CONNECTION_INFORMATION        0x03
95
 
#define PALM_GET_EXT_CONNECTION_INFORMATION     0x04
 
101
        #define GENERIC_REQUEST_BYTES_AVAILABLE         0x01
 
102
        #define GENERIC_CLOSE_NOTIFICATION              0x02
 
103
        #define VISOR_GET_CONNECTION_INFORMATION        0x03
 
104
        #define PALM_GET_EXT_CONNECTION_INFORMATION     0x04
96
105
 
97
106
        /*
98
107
         * Reply struct and defines for VISOR_GET_CONNECTION_INFORMATION
106
115
                        u_int8_t port;
107
116
                } connections[2];
108
117
        } visor_connection_info_t;
 
118
 
109
119
        /* struct visor_connection_info.connection[x].port defines: */
110
 
#define VISOR_ENDPOINT_1        0x01
111
 
#define VISOR_ENDPOINT_2        0x02
 
120
        #define VISOR_ENDPOINT_1        0x01
 
121
        #define VISOR_ENDPOINT_2        0x02
112
122
 
113
123
        /* struct visor_connection_info.connection[x].port_function_id defines: */
114
 
#define VISOR_FUNCTION_GENERIC              0x00
115
 
#define VISOR_FUNCTION_DEBUGGER             0x01
116
 
#define VISOR_FUNCTION_HOTSYNC              0x02
117
 
#define VISOR_FUNCTION_CONSOLE              0x03
118
 
#define VISOR_FUNCTION_REMOTE_FILE_SYS      0x04
 
124
        #define VISOR_FUNCTION_GENERIC              0x00
 
125
        #define VISOR_FUNCTION_DEBUGGER             0x01
 
126
        #define VISOR_FUNCTION_HOTSYNC              0x02
 
127
        #define VISOR_FUNCTION_CONSOLE              0x03
 
128
        #define VISOR_FUNCTION_REMOTE_FILE_SYS      0x04
119
129
 
120
130
        /*
121
131
         * Reply struct for PALM_GET_EXT_CONNECTION_INFORMATION