#define USB_TIMEOUT 50000
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define LE32(x) x
+#elif BYTE_ORDER == BIG_ENDIAN
+#define LE32(x) ((uint32_t)((((uint32_t)x)>>24) | ((((uint32_t)x)>>8) & 0xff00) | ((((uint32_t)x)<<8) & 0xff0000) | (((uint32_t)x)<<24)))
+#else
+#error BYTE_ORDER not defined/known!
+#endif
+
//Helper-routine: Convert a little-endian 4-byte word to an int
static void int2chars(unsigned char *buff,unsigned int a) {
buff[3]=(a>>24)&0xff;