FreeBSD kernel usb device Code
usb_template_phone.c File Reference
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usb_core.h>
#include <dev/usb/usb_cdc.h>
#include <dev/usb/usb_ioctl.h>
#include <dev/usb/usb_util.h>
#include <dev/usb/template/usb_template.h>
Include dependency graph for usb_template_phone.c:

Go to the source code of this file.

Macros

#define PHONE_DEFAULT_VENDOR_ID   USB_TEMPLATE_VENDOR
 
#define PHONE_DEFAULT_PRODUCT_ID   0x05dc
 
#define PHONE_DEFAULT_MIXER   "Mixer interface"
 
#define PHONE_DEFAULT_RECORD   "Record interface"
 
#define PHONE_DEFAULT_PLAYBACK   "Playback interface"
 
#define PHONE_DEFAULT_HID   "HID interface"
 
#define PHONE_DEFAULT_MANUFACTURER   USB_TEMPLATE_MANUFACTURER
 
#define PHONE_DEFAULT_PRODUCT   "USB Phone Device"
 
#define PHONE_DEFAULT_SERIAL_NUMBER   "March 2008"
 

Enumerations

enum  {
  PHONE_LANG_INDEX , PHONE_MIXER_INDEX , PHONE_RECORD_INDEX , PHONE_PLAYBACK_INDEX ,
  PHONE_HID_INDEX , PHONE_MANUFACTURER_INDEX , PHONE_PRODUCT_INDEX , PHONE_SERIAL_NUMBER_INDEX ,
  PHONE_MAX_INDEX
}
 

Functions

static const void * phone_get_vendor_desc (const struct usb_device_request *req, uint16_t *plen)
 
static const void * phone_get_string_desc (uint16_t lang_id, uint8_t string_index)
 
static void phone_init (void *arg __unused)
 
static void phone_uninit (void *arg __unused)
 
 SYSINIT (phone_init, SI_SUB_LOCK, SI_ORDER_FIRST, phone_init, NULL)
 
 SYSUNINIT (phone_uninit, SI_SUB_LOCK, SI_ORDER_FIRST, phone_uninit, NULL)
 

Variables

static struct usb_string_descriptor phone_mixer
 
static struct usb_string_descriptor phone_record
 
static struct usb_string_descriptor phone_playback
 
static struct usb_string_descriptor phone_hid
 
static struct usb_string_descriptor phone_manufacturer
 
static struct usb_string_descriptor phone_product
 
static struct usb_string_descriptor phone_serial_number
 
static struct sysctl_ctx_list phone_ctx_list
 
static uint8_t phone_hid_descriptor []
 
static const uint8_t phone_raw_desc_0 []
 
static const uint8_t phone_raw_desc_1 []
 
static const uint8_t phone_raw_desc_2 []
 
static const uint8_t phone_raw_desc_3 []
 
static const uint8_t phone_raw_desc_4 []
 
static const uint8_t phone_raw_desc_5 []
 
static const uint8_t phone_raw_desc_6 []
 
static const void * phone_raw_iface_0_desc []
 
static const struct usb_temp_interface_desc phone_iface_0
 
static const uint8_t phone_raw_desc_20 []
 
static const uint8_t phone_raw_desc_21 []
 
static const uint8_t phone_raw_desc_22 []
 
static const void * phone_raw_iface_1_desc []
 
static const void * phone_raw_ep_1_desc []
 
static const struct usb_temp_packet_size phone_isoc_mps
 
static const struct usb_temp_interval phone_isoc_interval
 
static const struct usb_temp_endpoint_desc phone_isoc_in_ep
 
static const struct usb_temp_endpoint_descphone_iface_1_ep []
 
static const struct usb_temp_interface_desc phone_iface_1_alt_0
 
static const struct usb_temp_interface_desc phone_iface_1_alt_1
 
static const uint8_t phone_raw_desc_30 []
 
static const uint8_t phone_raw_desc_31 []
 
static const uint8_t phone_raw_desc_32 []
 
static const void * phone_raw_iface_2_desc []
 
static const void * phone_raw_ep_2_desc []
 
static const struct usb_temp_endpoint_desc phone_isoc_out_ep
 
static const struct usb_temp_endpoint_descphone_iface_2_ep []
 
static const struct usb_temp_interface_desc phone_iface_2_alt_0
 
static const struct usb_temp_interface_desc phone_iface_2_alt_1
 
static const uint8_t phone_hid_raw_desc_0 []
 
static const void * phone_hid_desc_0 []
 
static const struct usb_temp_packet_size phone_hid_mps
 
static const struct usb_temp_interval phone_hid_interval
 
static const struct usb_temp_endpoint_desc phone_hid_in_ep
 
static const struct usb_temp_endpoint_descphone_iface_3_ep []
 
static const struct usb_temp_interface_desc phone_iface_3
 
static const struct usb_temp_interface_descphone_interfaces []
 
static const struct usb_temp_config_desc phone_config_desc
 
static const struct usb_temp_config_descphone_configs []
 
static usb_temp_get_string_desc_t phone_get_string_desc
 
static usb_temp_get_vendor_desc_t phone_get_vendor_desc
 
struct usb_temp_device_desc usb_template_phone
 

Macro Definition Documentation

◆ PHONE_DEFAULT_HID

#define PHONE_DEFAULT_HID   "HID interface"

Definition at line 87 of file usb_template_phone.c.

◆ PHONE_DEFAULT_MANUFACTURER

#define PHONE_DEFAULT_MANUFACTURER   USB_TEMPLATE_MANUFACTURER

Definition at line 88 of file usb_template_phone.c.

◆ PHONE_DEFAULT_MIXER

#define PHONE_DEFAULT_MIXER   "Mixer interface"

Definition at line 84 of file usb_template_phone.c.

◆ PHONE_DEFAULT_PLAYBACK

#define PHONE_DEFAULT_PLAYBACK   "Playback interface"

Definition at line 86 of file usb_template_phone.c.

◆ PHONE_DEFAULT_PRODUCT

#define PHONE_DEFAULT_PRODUCT   "USB Phone Device"

Definition at line 89 of file usb_template_phone.c.

◆ PHONE_DEFAULT_PRODUCT_ID

#define PHONE_DEFAULT_PRODUCT_ID   0x05dc

Definition at line 83 of file usb_template_phone.c.

◆ PHONE_DEFAULT_RECORD

#define PHONE_DEFAULT_RECORD   "Record interface"

Definition at line 85 of file usb_template_phone.c.

◆ PHONE_DEFAULT_SERIAL_NUMBER

#define PHONE_DEFAULT_SERIAL_NUMBER   "March 2008"

Definition at line 90 of file usb_template_phone.c.

◆ PHONE_DEFAULT_VENDOR_ID

#define PHONE_DEFAULT_VENDOR_ID   USB_TEMPLATE_VENDOR

Definition at line 82 of file usb_template_phone.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PHONE_LANG_INDEX 
PHONE_MIXER_INDEX 
PHONE_RECORD_INDEX 
PHONE_PLAYBACK_INDEX 
PHONE_HID_INDEX 
PHONE_MANUFACTURER_INDEX 
PHONE_PRODUCT_INDEX 
PHONE_SERIAL_NUMBER_INDEX 
PHONE_MAX_INDEX 

Definition at line 70 of file usb_template_phone.c.

Function Documentation

◆ phone_get_string_desc()

◆ phone_get_vendor_desc()

static const void * phone_get_vendor_desc ( const struct usb_device_request req,
uint16_t *  plen 
)
static

Definition at line 386 of file usb_template_phone.c.

References phone_hid_descriptor, plen, and req.

◆ phone_init()

◆ phone_uninit()

static void phone_uninit ( void *arg  __unused)
static

Definition at line 497 of file usb_template_phone.c.

References phone_ctx_list.

◆ SYSINIT()

SYSINIT ( phone_init  ,
SI_SUB_LOCK  ,
SI_ORDER_FIRST  ,
phone_init  ,
NULL   
)

◆ SYSUNINIT()

SYSUNINIT ( phone_uninit  ,
SI_SUB_LOCK  ,
SI_ORDER_FIRST  ,
phone_uninit  ,
NULL   
)

Variable Documentation

◆ phone_config_desc

const struct usb_temp_config_desc phone_config_desc
static
Initial value:
= {
.ppIfaceDesc = phone_interfaces,
.bmAttributes = 0,
.bMaxPower = 0,
.iConfiguration = PHONE_PRODUCT_INDEX,
}
static const struct usb_temp_interface_desc * phone_interfaces[]
@ PHONE_PRODUCT_INDEX

Definition at line 348 of file usb_template_phone.c.

◆ phone_configs

const struct usb_temp_config_desc* phone_configs[]
static
Initial value:
= {
NULL,
}
static const struct usb_temp_config_desc phone_config_desc

Definition at line 355 of file usb_template_phone.c.

◆ phone_ctx_list

struct sysctl_ctx_list phone_ctx_list
static

Definition at line 100 of file usb_template_phone.c.

Referenced by phone_init(), and phone_uninit().

◆ phone_get_string_desc

usb_temp_get_string_desc_t phone_get_string_desc
static

Definition at line 360 of file usb_template_phone.c.

◆ phone_get_vendor_desc

usb_temp_get_vendor_desc_t phone_get_vendor_desc
static

Definition at line 361 of file usb_template_phone.c.

◆ phone_hid

struct usb_string_descriptor phone_hid
static

Definition at line 95 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_hid_desc_0

const void* phone_hid_desc_0[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_hid_raw_desc_0[]

Definition at line 302 of file usb_template_phone.c.

◆ phone_hid_descriptor

uint8_t phone_hid_descriptor[]
static
Initial value:
= {
0x05, 0x0b, 0x09, 0x01, 0xa1, 0x01, 0x05, 0x09,
0x19, 0x01, 0x29, 0x3f, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x80, 0x81, 0x00, 0x05, 0x08,
0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 0x25, 0x01,
0x75, 0x01, 0x95, 0x80, 0x91, 0x00, 0xc0
}

Definition at line 110 of file usb_template_phone.c.

Referenced by phone_get_vendor_desc().

◆ phone_hid_in_ep

const struct usb_temp_endpoint_desc phone_hid_in_ep
static
Initial value:
= {
.pPacketSize = &phone_hid_mps,
.pIntervals = &phone_hid_interval,
.bEndpointAddress = UE_DIR_IN,
.bmAttributes = UE_INTERRUPT,
}
#define UE_INTERRUPT
Definition: usb.h:544
#define UE_DIR_IN
Definition: usb.h:531
static const struct usb_temp_interval phone_hid_interval
static const struct usb_temp_packet_size phone_hid_mps

Definition at line 317 of file usb_template_phone.c.

◆ phone_hid_interval

const struct usb_temp_interval phone_hid_interval
static
Initial value:
= {
.bInterval[USB_SPEED_FULL] = 2,
.bInterval[USB_SPEED_HIGH] = 2,
}
@ USB_SPEED_FULL
Definition: usb.h:754
@ USB_SPEED_HIGH
Definition: usb.h:755

Definition at line 312 of file usb_template_phone.c.

◆ phone_hid_mps

const struct usb_temp_packet_size phone_hid_mps
static
Initial value:
= {
.mps[USB_SPEED_FULL] = 0x10,
.mps[USB_SPEED_HIGH] = 0x10,
}

Definition at line 307 of file usb_template_phone.c.

◆ phone_hid_raw_desc_0

const uint8_t phone_hid_raw_desc_0[]
static
Initial value:
= {
0x09, 0x21, 0x00, 0x01, 0x00, 0x01, 0x22, sizeof(phone_hid_descriptor),
0x00
}
static uint8_t phone_hid_descriptor[]

Definition at line 297 of file usb_template_phone.c.

◆ phone_iface_0

const struct usb_temp_interface_desc phone_iface_0
static
Initial value:
= {
.ppEndpoints = NULL,
.ppRawDesc = phone_raw_iface_0_desc,
.bInterfaceClass = UICLASS_AUDIO,
.bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL,
.bInterfaceProtocol = 0,
.iInterface = PHONE_MIXER_INDEX,
}
#define UICLASS_AUDIO
Definition: usb.h:429
#define UISUBCLASS_AUDIOCONTROL
Definition: usb.h:430
static const void * phone_raw_iface_0_desc[]
@ PHONE_MIXER_INDEX

Definition at line 164 of file usb_template_phone.c.

◆ phone_iface_1_alt_0

const struct usb_temp_interface_desc phone_iface_1_alt_0
static
Initial value:
= {
.ppEndpoints = NULL,
.ppRawDesc = NULL,
.bInterfaceClass = UICLASS_AUDIO,
.bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = PHONE_PLAYBACK_INDEX,
}
#define UISUBCLASS_AUDIOSTREAM
Definition: usb.h:431
@ PHONE_PLAYBACK_INDEX

Definition at line 221 of file usb_template_phone.c.

◆ phone_iface_1_alt_1

const struct usb_temp_interface_desc phone_iface_1_alt_1
static
Initial value:
= {
.ppEndpoints = phone_iface_1_ep,
.bInterfaceClass = UICLASS_AUDIO,
.bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = PHONE_PLAYBACK_INDEX,
.isAltInterface = 1,
}
const void ** ppRawDesc
Definition: usb_template.h:56
static const struct usb_temp_endpoint_desc * phone_iface_1_ep[]
static const void * phone_raw_iface_1_desc[]

Definition at line 230 of file usb_template_phone.c.

◆ phone_iface_1_ep

const struct usb_temp_endpoint_desc* phone_iface_1_ep[]
static
Initial value:
= {
NULL,
}
static const struct usb_temp_endpoint_desc phone_isoc_in_ep

Definition at line 216 of file usb_template_phone.c.

◆ phone_iface_2_alt_0

const struct usb_temp_interface_desc phone_iface_2_alt_0
static
Initial value:
= {
.ppEndpoints = NULL,
.ppRawDesc = NULL,
.bInterfaceClass = UICLASS_AUDIO,
.bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = PHONE_RECORD_INDEX,
}
@ PHONE_RECORD_INDEX

Definition at line 278 of file usb_template_phone.c.

◆ phone_iface_2_alt_1

const struct usb_temp_interface_desc phone_iface_2_alt_1
static
Initial value:
= {
.ppEndpoints = phone_iface_2_ep,
.bInterfaceClass = UICLASS_AUDIO,
.bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = PHONE_RECORD_INDEX,
.isAltInterface = 1,
}
static const void * phone_raw_iface_2_desc[]
static const struct usb_temp_endpoint_desc * phone_iface_2_ep[]

Definition at line 287 of file usb_template_phone.c.

◆ phone_iface_2_ep

const struct usb_temp_endpoint_desc* phone_iface_2_ep[]
static
Initial value:
= {
NULL,
}
static const struct usb_temp_endpoint_desc phone_isoc_out_ep

Definition at line 273 of file usb_template_phone.c.

◆ phone_iface_3

const struct usb_temp_interface_desc phone_iface_3
static
Initial value:
= {
.ppEndpoints = phone_iface_3_ep,
.bInterfaceClass = UICLASS_HID,
.bInterfaceSubClass = 0,
.bInterfaceProtocol = 0,
.iInterface = PHONE_HID_INDEX,
}
#define UICLASS_HID
Definition: usb.h:453
static const struct usb_temp_endpoint_desc * phone_iface_3_ep[]
static const void * phone_hid_desc_0[]
@ PHONE_HID_INDEX

Definition at line 329 of file usb_template_phone.c.

◆ phone_iface_3_ep

const struct usb_temp_endpoint_desc* phone_iface_3_ep[]
static
Initial value:
= {
NULL,
}
static const struct usb_temp_endpoint_desc phone_hid_in_ep

Definition at line 324 of file usb_template_phone.c.

◆ phone_interfaces

const struct usb_temp_interface_desc* phone_interfaces[]
static
Initial value:
= {
NULL,
}
static const struct usb_temp_interface_desc phone_iface_3
static const struct usb_temp_interface_desc phone_iface_2_alt_0
static const struct usb_temp_interface_desc phone_iface_2_alt_1
static const struct usb_temp_interface_desc phone_iface_1_alt_1
static const struct usb_temp_interface_desc phone_iface_0
static const struct usb_temp_interface_desc phone_iface_1_alt_0

Definition at line 338 of file usb_template_phone.c.

◆ phone_isoc_in_ep

const struct usb_temp_endpoint_desc phone_isoc_in_ep
static
Initial value:
= {
.ppRawDesc = phone_raw_ep_1_desc,
.pPacketSize = &phone_isoc_mps,
.pIntervals = &phone_isoc_interval,
.bEndpointAddress = UE_DIR_IN,
.bmAttributes = UE_ISOCHRONOUS,
}
#define UE_ISOCHRONOUS
Definition: usb.h:542
static const struct usb_temp_packet_size phone_isoc_mps
static const void * phone_raw_ep_1_desc[]
static const struct usb_temp_interval phone_isoc_interval

Definition at line 208 of file usb_template_phone.c.

◆ phone_isoc_interval

const struct usb_temp_interval phone_isoc_interval
static
Initial value:
= {
.bInterval[USB_SPEED_FULL] = 1,
.bInterval[USB_SPEED_HIGH] = 4,
}

Definition at line 203 of file usb_template_phone.c.

◆ phone_isoc_mps

const struct usb_temp_packet_size phone_isoc_mps
static
Initial value:
= {
.mps[USB_SPEED_FULL] = 0x10,
.mps[USB_SPEED_HIGH] = 0x10,
}

Definition at line 198 of file usb_template_phone.c.

◆ phone_isoc_out_ep

const struct usb_temp_endpoint_desc phone_isoc_out_ep
static
Initial value:
= {
.ppRawDesc = phone_raw_ep_2_desc,
.pPacketSize = &phone_isoc_mps,
.pIntervals = &phone_isoc_interval,
.bEndpointAddress = UE_DIR_OUT,
.bmAttributes = UE_ISOCHRONOUS,
}
#define UE_DIR_OUT
Definition: usb.h:532
static const void * phone_raw_ep_2_desc[]

Definition at line 265 of file usb_template_phone.c.

◆ phone_manufacturer

struct usb_string_descriptor phone_manufacturer
static

Definition at line 96 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_mixer

struct usb_string_descriptor phone_mixer
static

Definition at line 92 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_playback

struct usb_string_descriptor phone_playback
static

Definition at line 94 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_product

struct usb_string_descriptor phone_product
static

Definition at line 97 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_raw_desc_0

const uint8_t phone_raw_desc_0[]
static
Initial value:
= {
0x0a, 0x24, 0x01, 0x00, 0x01, 0x4a, 0x00, 0x02,
0x01, 0x02
}

Definition at line 118 of file usb_template_phone.c.

◆ phone_raw_desc_1

const uint8_t phone_raw_desc_1[]
static
Initial value:
= {
0x0c, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00
}

Definition at line 123 of file usb_template_phone.c.

◆ phone_raw_desc_2

const uint8_t phone_raw_desc_2[]
static
Initial value:
= {
0x0c, 0x24, 0x02, 0x02, 0x01, 0x01, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00
}

Definition at line 128 of file usb_template_phone.c.

◆ phone_raw_desc_20

const uint8_t phone_raw_desc_20[]
static
Initial value:
= {
0x07, 0x24, 0x01, 0x04, 0x01, 0x01, 0x00
}

Definition at line 173 of file usb_template_phone.c.

◆ phone_raw_desc_21

const uint8_t phone_raw_desc_21[]
static
Initial value:
= {
0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x40, 0x1f, 0x00
}

Definition at line 177 of file usb_template_phone.c.

◆ phone_raw_desc_22

const uint8_t phone_raw_desc_22[]
static
Initial value:
= {
0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00
}

Definition at line 183 of file usb_template_phone.c.

◆ phone_raw_desc_3

const uint8_t phone_raw_desc_3[]
static
Initial value:
= {
0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x06,
0x00
}

Definition at line 133 of file usb_template_phone.c.

◆ phone_raw_desc_30

const uint8_t phone_raw_desc_30[]
static
Initial value:
= {
0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
}

Definition at line 240 of file usb_template_phone.c.

◆ phone_raw_desc_31

const uint8_t phone_raw_desc_31[]
static
Initial value:
= {
0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x40, 0x1f, 0x00
}

Definition at line 244 of file usb_template_phone.c.

◆ phone_raw_desc_32

const uint8_t phone_raw_desc_32[]
static
Initial value:
= {
0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00
}

Definition at line 250 of file usb_template_phone.c.

◆ phone_raw_desc_4

const uint8_t phone_raw_desc_4[]
static
Initial value:
= {
0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x05,
0x00
}

Definition at line 138 of file usb_template_phone.c.

◆ phone_raw_desc_5

const uint8_t phone_raw_desc_5[]
static
Initial value:
= {
0x0b, 0x24, 0x06, 0x05, 0x01, 0x02, 0x03, 0x00,
0x03, 0x00, 0x00
}

Definition at line 143 of file usb_template_phone.c.

◆ phone_raw_desc_6

const uint8_t phone_raw_desc_6[]
static
Initial value:
= {
0x0b, 0x24, 0x06, 0x06, 0x02, 0x02, 0x03, 0x00,
0x03, 0x00, 0x00
}

Definition at line 148 of file usb_template_phone.c.

◆ phone_raw_ep_1_desc

const void* phone_raw_ep_1_desc[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_raw_desc_22[]

Definition at line 193 of file usb_template_phone.c.

◆ phone_raw_ep_2_desc

const void* phone_raw_ep_2_desc[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_raw_desc_32[]

Definition at line 260 of file usb_template_phone.c.

◆ phone_raw_iface_0_desc

const void* phone_raw_iface_0_desc[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_raw_desc_4[]
static const uint8_t phone_raw_desc_0[]
static const uint8_t phone_raw_desc_1[]
static const uint8_t phone_raw_desc_5[]
static const uint8_t phone_raw_desc_3[]
static const uint8_t phone_raw_desc_6[]
static const uint8_t phone_raw_desc_2[]

Definition at line 153 of file usb_template_phone.c.

◆ phone_raw_iface_1_desc

const void* phone_raw_iface_1_desc[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_raw_desc_21[]
static const uint8_t phone_raw_desc_20[]

Definition at line 187 of file usb_template_phone.c.

◆ phone_raw_iface_2_desc

const void* phone_raw_iface_2_desc[]
static
Initial value:
= {
NULL,
}
static const uint8_t phone_raw_desc_31[]
static const uint8_t phone_raw_desc_30[]

Definition at line 254 of file usb_template_phone.c.

◆ phone_record

struct usb_string_descriptor phone_record
static

Definition at line 93 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ phone_serial_number

struct usb_string_descriptor phone_serial_number
static

Definition at line 98 of file usb_template_phone.c.

Referenced by phone_get_string_desc(), and phone_init().

◆ usb_template_phone

struct usb_temp_device_desc usb_template_phone
Initial value:
= {
.getStringDesc = &phone_get_string_desc,
.getVendorDesc = &phone_get_vendor_desc,
.ppConfigDesc = phone_configs,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_IN_INTERFACE,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.iManufacturer = PHONE_MANUFACTURER_INDEX,
.iProduct = PHONE_PRODUCT_INDEX,
.iSerialNumber = PHONE_SERIAL_NUMBER_INDEX,
}
#define UDCLASS_IN_INTERFACE
Definition: usb.h:371
#define PHONE_DEFAULT_VENDOR_ID
#define PHONE_DEFAULT_PRODUCT_ID
@ PHONE_MANUFACTURER_INDEX
@ PHONE_SERIAL_NUMBER_INDEX
static usb_temp_get_vendor_desc_t phone_get_vendor_desc
static const struct usb_temp_config_desc * phone_configs[]
static usb_temp_get_string_desc_t phone_get_string_desc

Definition at line 363 of file usb_template_phone.c.

Referenced by usb_temp_setup_by_index().