Commit 5046541b authored by Harald Welte's avatar Harald Welte

icE1usb: update ice1usb_proto.h to firmware 0.2-8

git revision cac342af6bccc9820a8617f900afaf663ad608ed of
https://git.osmocom.org/osmo-e1-hardware

Change-Id: I1423531470a1c9165d713108fb6a87ff47ff6e29
parent e2590c0d
......@@ -1013,6 +1013,8 @@ static int ice1usb_probe(struct usb_interface *intf, const struct usb_device_id
dev_err(&intf->dev, "Cannot find ON altsetting");
goto error;
}
dev_info(&intf->dev, "altsetting off=%u, on=%u\n",
ieu->alt_off->desc.bAlternateSetting, ieu->alt_on->desc.bAlternateSetting);
/* locate ON / OFF altsettings */
if (find_endpoints(ieu, ieu->alt_on) < 4) {
......@@ -1035,6 +1037,7 @@ static int ice1usb_probe(struct usb_interface *intf, const struct usb_device_id
//ddev->location = USB_BUS_PATH;
dspan = &ieu->dahdi.span;
/* TODO: include USB path info? */
snprintf(dspan->name, sizeof(dspan->name), "icE1usb/1/%d",
ieu->alt_on->desc.bInterfaceNumber); //TDOO: device != 1
snprintf(dspan->desc, sizeof(dspan->desc), "Osmocom icE1USB Card 1 Span %d",
......
......@@ -23,8 +23,54 @@ enum e1usb_dev_capability {
ICE1USB_DEV_CAP_GPSDO,
};
/***********************************************************************
* Control Endpoint / GPS-DO Interface Requests
***********************************************************************/
#define ICE1USB_INTF_GET_GPSDO_STATUS 0x10
#define ICE1USB_INTF_GET_GPSDO_MODE 0x12 /*!< uint8_t */
#define ICE1USB_INTF_SET_GPSDO_MODE 0x13 /*!< wValue = mode */
#define ICE1USB_INTF_GET_GPSDO_TUNE 0x14 /*!< data = struct e1usb_gpsdo_tune */
#define ICE1USB_INTF_SET_GPSDO_TUNE 0x15 /*!< data = struct e1usb_gpsdo_tune */
enum ice1usb_gpsdo_mode {
ICE1USB_GPSDO_MODE_DISABLED = 0,
ICE1USB_GPSDO_MODE_AUTO = 1,
};
enum ice1usb_gpsdo_antenna_state {
ICE1USB_GPSDO_ANT_UNKNOWN = 0,
ICE1USB_GPSDO_ANT_OK = 1,
ICE1USB_GPSDO_ANT_OPEN = 2,
ICE1USB_GPSDO_ANT_SHORT = 3,
};
enum ice1usb_gpsdo_state {
ICE1USB_GPSDO_STATE_DISABLED = 0,
ICE1USB_GPSDO_STATE_CALIBRATE = 1,
ICE1USB_GPSDO_STATE_HOLD_OVER = 2,
ICE1USB_GPSDO_STATE_TUNE_COARSE = 3,
ICE1USB_GPSDO_STATE_TUNE_FINE = 4,
};
struct e1usb_gpsdo_tune {
uint16_t coarse;
uint16_t fine;
} __attribute__((packed));
struct e1usb_gpsdo_status {
uint8_t state;
uint8_t antenna_state; /*!< Antenna state */
uint8_t valid_fix; /*!< Valid GPS Fix (0/1) */
uint8_t mode; /*!< Current configured operating mode */
struct e1usb_gpsdo_tune tune; /*!< Current VCXO tuning values */
uint32_t freq_est; /*!< Latest frequency estimate measurement */
} __attribute__((packed));
/* Interface Requests */
/***********************************************************************
* Control Endpoint / E1 Interface Requests
***********************************************************************/
/*! returns a bit-mask of optional device capabilities (see enum e1usb_intf_capability) */
#define ICE1USB_INTF_GET_CAPABILITIES 0x01
......@@ -32,6 +78,7 @@ enum e1usb_dev_capability {
#define ICE1USB_INTF_GET_TX_CFG 0x03 /*!< struct ice1usb_tx_config */
#define ICE1USB_INTF_SET_RX_CFG 0x04 /*!< struct ice1usb_rx_config */
#define ICE1USB_INTF_GET_RX_CFG 0x05 /*!< struct ice1usb_rx_config */
#define ICE1USB_INTF_GET_ERRORS 0x06 /*!< struct ice1usb_irq_err */
//enum e1usb_intf_capability { };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment