From c276bcd92efd515520c90e9d656da44c0a18f0db Mon Sep 17 00:00:00 2001 From: schulz Date: Wed, 30 Jan 2019 20:01:56 +0000 Subject: [PATCH] use simpliest little endian macros git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@55629 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- .../soc/broadcom/2708/usb/usb2otg/usb2otg_hub.h | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/arm-native/soc/broadcom/2708/usb/usb2otg/usb2otg_hub.h b/arch/arm-native/soc/broadcom/2708/usb/usb2otg/usb2otg_hub.h index d40b9f5ab8..fa5b540de4 100644 --- a/arch/arm-native/soc/broadcom/2708/usb/usb2otg/usb2otg_hub.h +++ b/arch/arm-native/soc/broadcom/2708/usb/usb2otg/usb2otg_hub.h @@ -1,22 +1,30 @@ /* - Copyright © 2013, The AROS Development Team. All rights reserved. + Copyright � 2013, The AROS Development Team. All rights reserved. $Id$ */ #include +#if AROS_BIG_ENDIAN +#define LE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8)) +#define BE16(x) (x) +#else +#define LE16(x) (x) +#define BE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8)) +#endif + /* Root hub data */ const struct UsbStdDevDesc OTGRootHubDevDesc = { sizeof(struct UsbStdDevDesc), UDT_DEVICE, - AROS_WORD2LE(0x0200), + LE16(0x0200), HUB_CLASSCODE, 0, 0, 8, - AROS_WORD2LE(0x0000), - AROS_WORD2LE(0x0000), - AROS_WORD2LE(0x0100), + LE16(0x0000), + LE16(0x0000), + LE16(0x0100), 0, 1, 0, @@ -35,7 +43,7 @@ const struct OTGHubCfg OTGRootHubCfg = .HubCfgDesc = { sizeof(struct UsbStdCfgDesc), UDT_CONFIGURATION, - AROS_WORD2LE(sizeof(struct OTGHubCfg)), + LE16(sizeof(struct OTGHubCfg)), 1, 1, 3, @@ -55,12 +63,12 @@ const struct OTGHubCfg OTGRootHubCfg = 4 }, - .HubEPDesc = { + .HubEPDesc = { sizeof(struct UsbStdEPDesc), UDT_ENDPOINT, URTF_IN|1, USEAF_INTERRUPT, - AROS_WORD2LE(8), + LE16(8), 255 }, }; -- 2.11.4.GIT