30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
|
commit 84b10fc7188de11fade4df963503080acbdb198c (HEAD -> refs/heads/usb_USB_LE16_TO_CPU_le16toh)
|
||
|
Author: Uffe Jakobsen <microtop@starion.dk>
|
||
|
AuthorDate: Sun Oct 16 17:02:22 2016 +0200
|
||
|
Commit: Uffe Jakobsen <microtop@starion.dk>
|
||
|
CommitDate: Sun Oct 16 17:02:51 2016 +0200
|
||
|
|
||
|
Linux: newer usb.h does not have USB_LE16_TO_CPU() macro anymore
|
||
|
---
|
||
|
:100644 100644 b9f6bd1... d7681cf... M xu1541/misc/usb_echo_test.c
|
||
|
xu1541/misc/usb_echo_test.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git xu1541/misc/usb_echo_test.c xu1541/misc/usb_echo_test.c
|
||
|
index b9f6bd1..d7681cf 100644
|
||
|
--- xu1541/misc/usb_echo_test.c
|
||
|
+++ xu1541/misc/usb_echo_test.c
|
||
|
@@ -27,6 +27,12 @@ usb_dev_handle *handle = NULL;
|
||
|
#define QUIT_KEY
|
||
|
#endif
|
||
|
|
||
|
+// Linux: newer usb.h does not have USB_LE16_TO_CPU() macro anymore
|
||
|
+#ifndef USB_LE16_TO_CPU
|
||
|
+#include <endian.h>
|
||
|
+#define USB_LE16_TO_CPU(x) x=le16toh(x);
|
||
|
+#endif
|
||
|
+
|
||
|
/* send a number of 16 bit words to the xu1541 interface */
|
||
|
/* and verify that they are correctly returned by the echo */
|
||
|
/* command. This may be used to check the reliability of */
|