mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
drivers: nxstyle fixes
Fixes for errors reported by nxstyle Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
dd1d980c3a
commit
e1d361eddf
+21
-7
@@ -159,7 +159,7 @@ static const struct dfu_cfgdesc_s g_dfu_cfgdesc =
|
||||
.ifno = 0,
|
||||
.alt = 0,
|
||||
.neps = 0,
|
||||
.classid = 0xFE,
|
||||
.classid = 0xfe,
|
||||
.subclass = 0x01,
|
||||
.protocol = 0x01, /* DFU runtime protocol */
|
||||
.iif = 0
|
||||
@@ -167,10 +167,22 @@ static const struct dfu_cfgdesc_s g_dfu_cfgdesc =
|
||||
{
|
||||
.len = sizeof(struct dfu_funcdesc_s),
|
||||
.type = 0x21,
|
||||
.attributes = 0x0B,
|
||||
.detach_timeout = { LSBYTE(DFU_MAX_TIMEOUT), MSBYTE(DFU_MAX_TIMEOUT) },
|
||||
.transfer_size = { LSBYTE(DFU_MAX_TRANSFER), MSBYTE(DFU_MAX_TRANSFER) },
|
||||
.dfu_version = { LSBYTE(DFU_VERSION), MSBYTE(DFU_VERSION) }
|
||||
.attributes = 0x0b,
|
||||
.detach_timeout =
|
||||
{
|
||||
LSBYTE(DFU_MAX_TIMEOUT),
|
||||
MSBYTE(DFU_MAX_TIMEOUT)
|
||||
},
|
||||
.transfer_size =
|
||||
{
|
||||
LSBYTE(DFU_MAX_TRANSFER),
|
||||
MSBYTE(DFU_MAX_TRANSFER)
|
||||
},
|
||||
.dfu_version =
|
||||
{
|
||||
LSBYTE(DFU_VERSION),
|
||||
MSBYTE(DFU_VERSION)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -315,6 +327,7 @@ static int dfu_make_msft_extprop_desc(FAR uint8_t *buf)
|
||||
*payload++ = LSBYTE(namelen); /* wPropertyNameLength */
|
||||
*payload++ = MSBYTE(namelen);
|
||||
payload += convert_to_utf16(payload, propname); /* bPropertyName */
|
||||
|
||||
*payload++ = 0; /* Null terminator */
|
||||
*payload++ = 0;
|
||||
*payload++ = LSBYTE(valuelen); /* dwPropertyDataLength */
|
||||
@@ -365,7 +378,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
else if (ctrl->value[1] == USB_DESC_TYPE_STRING)
|
||||
{
|
||||
ret = usbclass_mkstrdesc(ctrl->value[0],
|
||||
(FAR struct usb_strdesc_s *)ctrlreq->buf);
|
||||
(FAR struct usb_strdesc_s *)ctrlreq->buf);
|
||||
}
|
||||
}
|
||||
else if (ctrl->req == USB_REQ_SETCONFIGURATION)
|
||||
@@ -395,7 +408,8 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
* we can send the USB reply packet first.
|
||||
*/
|
||||
|
||||
work_queue(HPWORK, &priv->work_item, dfu_workqueue_callback, NULL, 1);
|
||||
work_queue(HPWORK, &priv->work_item,
|
||||
dfu_workqueue_callback, NULL, 1);
|
||||
ret = 0;
|
||||
}
|
||||
else if (ctrl->req == USB_REQ_DFU_GETSTATUS)
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __NUTTX_DRIVERS_USBDEV_RNDIS_STD_H
|
||||
#define __NUTTX_DRIVERS_USBDEV_RNDIS_STD_H
|
||||
|
||||
@@ -44,8 +43,10 @@
|
||||
|
||||
/* Definitions for Microsoft RNDIS protocol.
|
||||
* Documentation:
|
||||
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/remote-ndis--rndis-2
|
||||
* https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/WinArchive/[MS-RNDIS].pdf
|
||||
* https://docs.microsoft.com/en-us/windows-hardware/
|
||||
* drivers/network/remote-ndis--rndis-2
|
||||
* https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/
|
||||
* WinArchive/[MS-RNDIS].pdf
|
||||
*/
|
||||
|
||||
#define RNDIS_MAJOR_VERSION 1
|
||||
|
||||
Reference in New Issue
Block a user