mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 17:23:35 +08:00
Add logic to hold off processing OUT SETUP request until OUT data phase completes
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4596 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -95,10 +95,14 @@
|
||||
#define USB_ISEPIN(addr) (((addr) & USB_DIR_MASK) == USB_DIR_IN)
|
||||
#define USB_ISEPOUT(addr) (((addr) & USB_DIR_MASK) == USB_DIR_OUT)
|
||||
|
||||
/* Control Setup Packet. Byte 0=Request */
|
||||
/* Control Setup Packet. Byte 0 = Request type */
|
||||
|
||||
#define USB_REQ_DIR_IN (1 << 7) /* Bit 7=1: IN */
|
||||
#define USB_REQ_DIR_OUT (0 << 7) /* Bit 7=0: OUT */
|
||||
#define USB_REQ_DIR_MASK (1 << 7) /* Bit 7=1: Direction bit */
|
||||
#define USB_REQ_DIR_IN (1 << 7) /* Bit 7=1: Device-to-host */
|
||||
#define USB_REQ_DIR_OUT (0 << 7) /* Bit 7=0: Host-to-device */
|
||||
|
||||
#define USB_REQ_ISIN(type) (((type) & USB_REQ_DIR_MASK) != 0)
|
||||
#define USB_REQ_ISOUT(type) (((type) & USB_REQ_DIR_MASK) == 0)
|
||||
|
||||
#define USB_REQ_TYPE_SHIFT (5) /* Bits 5:6: Request type */
|
||||
# define USB_REQ_TYPE_MASK (3 << USB_REQ_TYPE_SHIFT)
|
||||
@@ -113,7 +117,7 @@
|
||||
# define USB_REQ_RECIPIENT_ENDPOINT (2 << USB_REQ_RECIPIENT_SHIFT)
|
||||
# define USB_REQ_RECIPIENT_OTHER (3 << USB_REQ_RECIPIENT_SHIFT)
|
||||
|
||||
/* Control Setup Packet. Byte 1=Standard Request Codes */
|
||||
/* Control Setup Packet. Byte 1 = Standard Request Codes */
|
||||
|
||||
#define USB_REQ_GETSTATUS (0x00)
|
||||
#define USB_REQ_CLEARFEATURE (0x01)
|
||||
|
||||
Reference in New Issue
Block a user