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
This commit is contained in:
patacongo 2008-10-11 19:35:55 +00:00
parent 802fd32f91
commit 75be6467e0

View File

@ -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)