[C] 纯文本查看 复制代码 /* Note:it should use the C99 standard when compiling the below codes */
/* USB standard device descriptor */
const usb_descriptor_device_struct device_descripter =
{
.Header =
{
.bLength = USB_DEVICE_DESC_SIZE,
.bDescriptorType = USB_DESCTYPE_DEVICE
},
.bcdUSB = 0x0200,
.bDeviceClass = 0x00,
.bDeviceSubClass = 0x00,
.bDeviceProtocol = 0x00,
.bMaxPacketSize0 = USBD_EP0_MAX_SIZE,
.idVendor = HID_USBD_VID,
.idProduct = HID_USBD_PID,
.bcdDevice = 0x0100,
.iManufacturer = USBD_MFC_STR_IDX,
.iProduct = USBD_PRODUCT_STR_IDX,
.iSerialNumber = USBD_SERIAL_STR_IDX,
.bNumberConfigurations = USBD_CFG_MAX_NUM
};
看别人写的usb库,这个给结构体赋值,的语法一直没见过,这种赋值方法叫什么名字呢?有没有相关的讲解或者出处?
|