Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
hfc_usb.h File Reference

Go to the source code of this file.

Data Structures

struct  ctrl_buft
 
struct  hfcusb_symbolic_list
 
struct  vendor_data
 

Macros

#define DRIVER_AUTHOR   "Peter Sprenger ([email protected])"
 
#define DRIVER_DESC   "HFC-S USB based HiSAX ISDN driver"
 
#define HFC_CTRL_TIMEOUT   20 /* 5ms timeout writing/reading regs */
 
#define HFC_TIMER_T3   8000 /* timeout for l1 activation timer */
 
#define HFC_TIMER_T4   500 /* time for state change interval */
 
#define HFCUSB_L1_STATECHANGE   0 /* L1 state changed */
 
#define HFCUSB_L1_DRX   1 /* D-frame received */
 
#define HFCUSB_L1_ERX   2 /* E-frame received */
 
#define HFCUSB_L1_DTX   4 /* D-frames completed */
 
#define MAX_BCH_SIZE   2048 /* allowed B-channel packet size */
 
#define HFCUSB_RX_THRESHOLD   64 /* threshold for fifo report bit rx */
 
#define HFCUSB_TX_THRESHOLD   64 /* threshold for fifo report bit tx */
 
#define HFCUSB_CHIP_ID   0x16 /* Chip ID register index */
 
#define HFCUSB_CIRM   0x00 /* cirm register index */
 
#define HFCUSB_USB_SIZE   0x07 /* int length register */
 
#define HFCUSB_USB_SIZE_I   0x06 /* iso length register */
 
#define HFCUSB_F_CROSS   0x0b /* bit order register */
 
#define HFCUSB_CLKDEL   0x37 /* bit delay register */
 
#define HFCUSB_CON_HDLC   0xfa /* channel connect register */
 
#define HFCUSB_HDLC_PAR   0xfb
 
#define HFCUSB_SCTRL   0x31 /* S-bus control register (tx) */
 
#define HFCUSB_SCTRL_E   0x32 /* same for E and special funcs */
 
#define HFCUSB_SCTRL_R   0x33 /* S-bus control register (rx) */
 
#define HFCUSB_F_THRES   0x0c /* threshold register */
 
#define HFCUSB_FIFO   0x0f /* fifo select register */
 
#define HFCUSB_F_USAGE   0x1a /* fifo usage register */
 
#define HFCUSB_MST_MODE0   0x14
 
#define HFCUSB_MST_MODE1   0x15
 
#define HFCUSB_P_DATA   0x1f
 
#define HFCUSB_INC_RES_F   0x0e
 
#define HFCUSB_STATES   0x30
 
#define HFCUSB_CHIPID   0x40 /* ID value of HFC-S USB */
 
#define HFCUSB_NUM_FIFOS   8 /* maximum number of fifos */
 
#define HFCUSB_B1_TX   0 /* index for B1 transmit bulk/int */
 
#define HFCUSB_B1_RX   1 /* index for B1 receive bulk/int */
 
#define HFCUSB_B2_TX   2
 
#define HFCUSB_B2_RX   3
 
#define HFCUSB_D_TX   4
 
#define HFCUSB_D_RX   5
 
#define HFCUSB_PCM_TX   6
 
#define HFCUSB_PCM_RX   7
 
#define USB_INT   0
 
#define USB_BULK   1
 
#define USB_ISOC   2
 
#define ISOC_PACKETS_D   8
 
#define ISOC_PACKETS_B   8
 
#define ISO_BUFFER_SIZE   128
 
#define SINK_MAX   68
 
#define SINK_MIN   48
 
#define SINK_DMIN   12
 
#define SINK_DMAX   18
 
#define BITLINE_INF   (-64 * 8)
 
#define write_usb(a, b, c)   usb_control_msg((a)->dev, (a)->ctrl_out_pipe, 0, 0x40, (c), (b), NULL, 0, HFC_CTRL_TIMEOUT)
 
#define read_usb(a, b, c)   usb_control_msg((a)->dev, (a)->ctrl_in_pipe, 1, 0xC0, 0, (b), (c), 1, HFC_CTRL_TIMEOUT)
 
#define HFC_CTRL_BUFSIZE   32
 
#define HFCUSB_DBG_INIT   0x0001
 
#define HFCUSB_DBG_STATES   0x0002
 
#define HFCUSB_DBG_DCHANNEL   0x0080
 
#define HFCUSB_DBG_FIFO_ERR   0x4000
 
#define HFCUSB_DBG_VERBOSE_USB   0x8000
 
#define CNF_4INT3ISO   1
 
#define CNF_3INT3ISO   2
 
#define CNF_4ISO3ISO   3
 
#define CNF_3ISO3ISO   4
 
#define EP_NUL   1
 
#define EP_NOP   2
 
#define EP_ISO   3
 
#define EP_BLK   4
 
#define EP_INT   5
 
#define LED_OFF   0
 
#define LED_SCHEME1   1
 
#define LED_SCHEME2   2
 
#define LED_POWER_ON   1
 
#define LED_POWER_OFF   2
 
#define LED_S0_ON   3
 
#define LED_S0_OFF   4
 
#define LED_B1_ON   5
 
#define LED_B1_OFF   6
 
#define LED_B1_DATA   7
 
#define LED_B2_ON   8
 
#define LED_B2_OFF   9
 
#define LED_B2_DATA   10
 
#define LED_NORMAL   0
 
#define LED_INVERTED   1
 

Macro Definition Documentation

#define BITLINE_INF   (-64 * 8)

Definition at line 79 of file hfc_usb.h.

#define CNF_3INT3ISO   2

Definition at line 135 of file hfc_usb.h.

#define CNF_3ISO3ISO   4

Definition at line 137 of file hfc_usb.h.

#define CNF_4INT3ISO   1

Definition at line 134 of file hfc_usb.h.

#define CNF_4ISO3ISO   3

Definition at line 136 of file hfc_usb.h.

#define DRIVER_AUTHOR   "Peter Sprenger ([email protected])"

Definition at line 10 of file hfc_usb.h.

#define DRIVER_DESC   "HFC-S USB based HiSAX ISDN driver"

Definition at line 11 of file hfc_usb.h.

#define EP_BLK   4

Definition at line 142 of file hfc_usb.h.

#define EP_INT   5

Definition at line 143 of file hfc_usb.h.

#define EP_ISO   3

Definition at line 141 of file hfc_usb.h.

#define EP_NOP   2

Definition at line 140 of file hfc_usb.h.

#define EP_NUL   1

Definition at line 139 of file hfc_usb.h.

#define HFC_CTRL_BUFSIZE   32

Definition at line 84 of file hfc_usb.h.

#define HFC_CTRL_TIMEOUT   20 /* 5ms timeout writing/reading regs */

Definition at line 14 of file hfc_usb.h.

#define HFC_TIMER_T3   8000 /* timeout for l1 activation timer */

Definition at line 15 of file hfc_usb.h.

#define HFC_TIMER_T4   500 /* time for state change interval */

Definition at line 16 of file hfc_usb.h.

#define HFCUSB_B1_RX   1 /* index for B1 receive bulk/int */

Definition at line 54 of file hfc_usb.h.

#define HFCUSB_B1_TX   0 /* index for B1 transmit bulk/int */

Definition at line 53 of file hfc_usb.h.

#define HFCUSB_B2_RX   3

Definition at line 56 of file hfc_usb.h.

#define HFCUSB_B2_TX   2

Definition at line 55 of file hfc_usb.h.

#define HFCUSB_CHIP_ID   0x16 /* Chip ID register index */

Definition at line 28 of file hfc_usb.h.

#define HFCUSB_CHIPID   0x40 /* ID value of HFC-S USB */

Definition at line 48 of file hfc_usb.h.

#define HFCUSB_CIRM   0x00 /* cirm register index */

Definition at line 29 of file hfc_usb.h.

#define HFCUSB_CLKDEL   0x37 /* bit delay register */

Definition at line 33 of file hfc_usb.h.

#define HFCUSB_CON_HDLC   0xfa /* channel connect register */

Definition at line 34 of file hfc_usb.h.

#define HFCUSB_D_RX   5

Definition at line 58 of file hfc_usb.h.

#define HFCUSB_D_TX   4

Definition at line 57 of file hfc_usb.h.

#define HFCUSB_DBG_DCHANNEL   0x0080

Definition at line 96 of file hfc_usb.h.

#define HFCUSB_DBG_FIFO_ERR   0x4000

Definition at line 97 of file hfc_usb.h.

#define HFCUSB_DBG_INIT   0x0001

Definition at line 94 of file hfc_usb.h.

#define HFCUSB_DBG_STATES   0x0002

Definition at line 95 of file hfc_usb.h.

#define HFCUSB_DBG_VERBOSE_USB   0x8000

Definition at line 98 of file hfc_usb.h.

#define HFCUSB_F_CROSS   0x0b /* bit order register */

Definition at line 32 of file hfc_usb.h.

#define HFCUSB_F_THRES   0x0c /* threshold register */

Definition at line 39 of file hfc_usb.h.

#define HFCUSB_F_USAGE   0x1a /* fifo usage register */

Definition at line 41 of file hfc_usb.h.

#define HFCUSB_FIFO   0x0f /* fifo select register */

Definition at line 40 of file hfc_usb.h.

#define HFCUSB_HDLC_PAR   0xfb

Definition at line 35 of file hfc_usb.h.

#define HFCUSB_INC_RES_F   0x0e

Definition at line 45 of file hfc_usb.h.

#define HFCUSB_L1_DRX   1 /* D-frame received */

Definition at line 19 of file hfc_usb.h.

#define HFCUSB_L1_DTX   4 /* D-frames completed */

Definition at line 21 of file hfc_usb.h.

#define HFCUSB_L1_ERX   2 /* E-frame received */

Definition at line 20 of file hfc_usb.h.

#define HFCUSB_L1_STATECHANGE   0 /* L1 state changed */

Definition at line 18 of file hfc_usb.h.

#define HFCUSB_MST_MODE0   0x14

Definition at line 42 of file hfc_usb.h.

#define HFCUSB_MST_MODE1   0x15

Definition at line 43 of file hfc_usb.h.

#define HFCUSB_NUM_FIFOS   8 /* maximum number of fifos */

Definition at line 52 of file hfc_usb.h.

#define HFCUSB_P_DATA   0x1f

Definition at line 44 of file hfc_usb.h.

#define HFCUSB_PCM_RX   7

Definition at line 60 of file hfc_usb.h.

#define HFCUSB_PCM_TX   6

Definition at line 59 of file hfc_usb.h.

#define HFCUSB_RX_THRESHOLD   64 /* threshold for fifo report bit rx */

Definition at line 25 of file hfc_usb.h.

#define HFCUSB_SCTRL   0x31 /* S-bus control register (tx) */

Definition at line 36 of file hfc_usb.h.

#define HFCUSB_SCTRL_E   0x32 /* same for E and special funcs */

Definition at line 37 of file hfc_usb.h.

#define HFCUSB_SCTRL_R   0x33 /* S-bus control register (rx) */

Definition at line 38 of file hfc_usb.h.

#define HFCUSB_STATES   0x30

Definition at line 46 of file hfc_usb.h.

#define HFCUSB_TX_THRESHOLD   64 /* threshold for fifo report bit tx */

Definition at line 26 of file hfc_usb.h.

#define HFCUSB_USB_SIZE   0x07 /* int length register */

Definition at line 30 of file hfc_usb.h.

#define HFCUSB_USB_SIZE_I   0x06 /* iso length register */

Definition at line 31 of file hfc_usb.h.

#define ISO_BUFFER_SIZE   128

Definition at line 72 of file hfc_usb.h.

#define ISOC_PACKETS_B   8

Definition at line 71 of file hfc_usb.h.

#define ISOC_PACKETS_D   8

Definition at line 70 of file hfc_usb.h.

#define LED_B1_DATA   7

Definition at line 198 of file hfc_usb.h.

#define LED_B1_OFF   6

Definition at line 197 of file hfc_usb.h.

#define LED_B1_ON   5

Definition at line 196 of file hfc_usb.h.

#define LED_B2_DATA   10

Definition at line 201 of file hfc_usb.h.

#define LED_B2_OFF   9

Definition at line 200 of file hfc_usb.h.

#define LED_B2_ON   8

Definition at line 199 of file hfc_usb.h.

#define LED_INVERTED   1

Definition at line 204 of file hfc_usb.h.

#define LED_NORMAL   0

Definition at line 203 of file hfc_usb.h.

#define LED_OFF   0

Definition at line 188 of file hfc_usb.h.

#define LED_POWER_OFF   2

Definition at line 193 of file hfc_usb.h.

#define LED_POWER_ON   1

Definition at line 192 of file hfc_usb.h.

#define LED_S0_OFF   4

Definition at line 195 of file hfc_usb.h.

#define LED_S0_ON   3

Definition at line 194 of file hfc_usb.h.

#define LED_SCHEME1   1

Definition at line 189 of file hfc_usb.h.

#define LED_SCHEME2   2

Definition at line 190 of file hfc_usb.h.

#define MAX_BCH_SIZE   2048 /* allowed B-channel packet size */

Definition at line 23 of file hfc_usb.h.

#define read_usb (   a,
  b,
  c 
)    usb_control_msg((a)->dev, (a)->ctrl_in_pipe, 1, 0xC0, 0, (b), (c), 1, HFC_CTRL_TIMEOUT)

Definition at line 83 of file hfc_usb.h.

#define SINK_DMAX   18

Definition at line 78 of file hfc_usb.h.

#define SINK_DMIN   12

Definition at line 77 of file hfc_usb.h.

#define SINK_MAX   68

Definition at line 75 of file hfc_usb.h.

#define SINK_MIN   48

Definition at line 76 of file hfc_usb.h.

#define USB_BULK   1

Definition at line 67 of file hfc_usb.h.

#define USB_INT   0

Definition at line 66 of file hfc_usb.h.

#define USB_ISOC   2

Definition at line 68 of file hfc_usb.h.

#define write_usb (   a,
  b,
  c 
)    usb_control_msg((a)->dev, (a)->ctrl_out_pipe, 0, 0x40, (c), (b), NULL, 0, HFC_CTRL_TIMEOUT)

Definition at line 82 of file hfc_usb.h.