Skip to content
Snippets Groups Projects
Commit 75be6467 authored by patacongo's avatar patacongo
Browse files

Added macro for LE 32-bit values

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1030 42af7a65-404d-4744-a932-0658087f49c3
parent 802fd32f
No related branches found
No related tags found
No related merge requests found
......@@ -53,11 +53,13 @@
#define LSBYTE(u16) ((u16) & 0xff) /* Get LS byte from uint16 */
#define GETUINT16(p) (((uint16)p[1]<<8)|(uint16)p[0])
#define GETUINT32(p) (((uint32)p[3]<<24)|((uint32)p[2]<<16)|\
((uint32)p[1]<<8)|(uint32)p[0])
/* USB directions (in endpoint addresses) */
#define USB_DIR_OUT (0x00) /* To the device */
#define USB_DIR_IN (0x80) /* To the host */
#define USB_DIR_OUT (0x00) /* host-to-device */
#define USB_DIR_IN (0x80) /* device-to-host */
#define USB_EPNO(addr) ((addr)&0x7f)
#define USB_EPOUT(addr) ((addr)|USB_DIR_OUT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment