diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-11 19:35:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-11 19:35:55 +0000 |
commit | 9ab9aa14f35208b190a72ce0c7909f29dd1cf00a (patch) | |
tree | c4783498bf6f21205fea47ae6b018d7864665162 /nuttx | |
parent | 498937e3ad17de1bc66fcaec37d82e4393073c2f (diff) | |
download | px4-nuttx-9ab9aa14f35208b190a72ce0c7909f29dd1cf00a.tar.gz px4-nuttx-9ab9aa14f35208b190a72ce0c7909f29dd1cf00a.tar.bz2 px4-nuttx-9ab9aa14f35208b190a72ce0c7909f29dd1cf00a.zip |
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
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/include/nuttx/usb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/usb.h b/nuttx/include/nuttx/usb.h index bd044abc0..4b5835d93 100644 --- a/nuttx/include/nuttx/usb.h +++ b/nuttx/include/nuttx/usb.h @@ -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) |