Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed Xbus
Fork of MTi-1_example by
Diff: xbus/xbusutility.c
- Revision:
- 27:eebe5fc884e3
- Parent:
- 18:2073072bad51
- Child:
- 45:67203918bec9
--- a/xbus/xbusutility.c Wed May 20 14:49:54 2015 +0200
+++ b/xbus/xbusutility.c Wed May 20 16:46:14 2015 +0200
@@ -32,3 +32,26 @@
*out = (in[0] << 24) | (in[1] << 16) | (in[2] << 8) | in[3];
return in + sizeof(uint32_t);
}
+
+uint8_t* XbusUtility_writeU8(uint8_t* out, uint8_t in)
+{
+ *out++ = in;
+ return out;
+}
+
+uint8_t* XbusUtility_writeU16(uint8_t* out, uint16_t in)
+{
+ *out++ = (in >> 8) & 0xFF;
+ *out++ = in & 0xFF;
+ return out;
+}
+
+uint8_t* XbusUtility_writeU32(uint8_t* out, uint32_t in)
+{
+
+ *out++ = (in >> 24) & 0xFF;
+ *out++ = (in >> 16) & 0xFF;
+ *out++ = (in >> 8) & 0xFF;
+ *out++ = in & 0xFF;
+ return out;
+}

Xsens MTi 1-series