summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2014-03-24 16:25:33 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-24 22:07:44 +0200
commita60d6832ac37a84828100780f996560523881ecd (patch)
tree980350ac650ef831947d27ce2b66e2394570cc5c
parent5842f1b65742fe745bc35e62efcb973edcda9abb (diff)
downloadbluez-a60d6832ac37a84828100780f996560523881ecd.tar.gz
Replace att_get_u32() by get_le32()
-rw-r--r--profiles/cyclingspeed/cyclingspeed.c3
-rw-r--r--profiles/thermometer/thermometer.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/profiles/cyclingspeed/cyclingspeed.c b/profiles/cyclingspeed/cyclingspeed.c
index f78c2242e..918f23759 100644
--- a/profiles/cyclingspeed/cyclingspeed.c
+++ b/profiles/cyclingspeed/cyclingspeed.c
@@ -36,6 +36,7 @@
#include "src/profile.h"
#include "src/service.h"
#include "src/dbus-common.h"
+#include "src/shared/util.h"
#include "src/error.h"
#include "attrib/gattrib.h"
#include "attrib/att.h"
@@ -573,7 +574,7 @@ static void process_measurement(struct csc *csc, const uint8_t *pdu,
}
m.has_wheel_rev = true;
- m.wheel_rev = att_get_u32(pdu);
+ m.wheel_rev = get_le32(pdu);
m.last_wheel_time = att_get_u16(pdu + 4);
pdu += 6;
len -= 6;
diff --git a/profiles/thermometer/thermometer.c b/profiles/thermometer/thermometer.c
index c9ab759a2..d2ea56bd7 100644
--- a/profiles/thermometer/thermometer.c
+++ b/profiles/thermometer/thermometer.c
@@ -36,6 +36,7 @@
#include "src/device.h"
#include "src/profile.h"
#include "src/service.h"
+#include "src/shared/util.h"
#include "src/error.h"
#include "src/log.h"
#include "attrib/gattrib.h"
@@ -361,7 +362,7 @@ static void proc_measurement(struct thermometer *t, const uint8_t *pdu,
return;
}
- raw = att_get_u32(pdu);
+ raw = get_le32(pdu);
m.mant = raw & 0x00FFFFFF;
m.exp = ((int32_t) raw) >> 24;