aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-24 19:12:54 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-24 19:12:54 +0100
commit6bdea1491597b2cb3ed82e9c1892a727b62daf34 (patch)
tree0166fe74f01c50f18e2c2bf79f634192e5fde567 /include
parent837beea52c8d10aa9ca31ca36779755c78e84242 (diff)
mtp: Add implementation from cellmgr
Diffstat (limited to 'include')
-rw-r--r--include/mtp/mtp_level3.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mtp/mtp_level3.h b/include/mtp/mtp_level3.h
index 0ef2c8f..457fe60 100644
--- a/include/mtp/mtp_level3.h
+++ b/include/mtp/mtp_level3.h
@@ -94,7 +94,10 @@ static inline uint16_t c_swap_16(uint16_t in)
((link) & MTP_LINK_MASK) << 28)
#define MTP_MAKE_APOC(apoc) \
c_swap_16((apoc & 0x3fff))
-#error "Need to add MTP_READ_DPC/MTP_READ_OPC for big endian"
+#define MTP_READ_DPC(addr) \
+ (c_swap_32(addr) & MTP_ADDR_MASK)
+#define MTP_READ_OPC(addr) \
+ ((c_swap_32(addr) >> 14) & MTP_ADDR_MASK)
#else
#error "Unknown endian"
#endif