[RFC v2 01/15] lib: Add host order unaligned access functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 lib/bluetooth.h |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 0fc4508..f0776aa 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -153,6 +153,21 @@ do {						\
 	__p->__v = (val);			\
 } while(0)
 
+static inline uint64_t bt_get_64(const void *ptr)
+{
+	return bt_get_unaligned((const uint64_t *) ptr);
+}
+
+static inline uint32_t bt_get_32(const void *ptr)
+{
+	return bt_get_unaligned((const uint32_t *) ptr);
+}
+
+static inline uint16_t bt_get_16(const void *ptr)
+{
+	return bt_get_unaligned((const uint16_t *) ptr);
+}
+
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 static inline uint64_t bt_get_le64(const void *ptr)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux