Basic implementation of Xbus message parsing and generation for embedded processors. The code has no dependencies and should also work for other MCU architectures than ARM provided a C99 compiler is available.

Dependents:   MTi-1_example_LPC1768 MTi-1_rikbeun MTi-1_example MTi-1_example

For an example of using the Xbus library to communicate with an MTi-1 series device using a full-duplex UART see:

Import programMTi-1_example

Example of using Xbus library to communicate with an MTi-1 series device using a full-duplex UART connection.

Revision:
1:c24f69a2eff4
Parent:
0:eb25b1785ee4
--- a/xbusdef.h	Tue Jun 16 07:54:23 2015 +0000
+++ b/xbusdef.h	Fri Oct 02 16:22:33 2015 +0200
@@ -1,30 +1,36 @@
-/*!
- * \file
- * \copyright Copyright (C) Xsens Technologies B.V., 2015.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef __XBUSDEF_H
-#define __XBUSDEF_H
-
-/*! \brief Xbus message preamble byte. */
-#define XBUS_PREAMBLE (0xFA)
-/*! \brief Xbus message bus ID for master devices. */
-#define XBUS_MASTERDEVICE (0xFF)
-/*! \brief Xbus length byte for messages without payload. */
-#define XBUS_NO_PAYLOAD (0x00)
-/*! \brief Xbus length byte for message with an extended payload. */
-#define XBUS_EXTENDED_LENGTH (0xFF)
-
-#endif // __XBUSDEF_H
+/*!
+ * \file
+ * \copyright Copyright (C) Xsens Technologies B.V., 2015.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef __XBUSDEF_H
+#define __XBUSDEF_H
+
+/*! \brief Xbus message preamble byte. */
+#define XBUS_PREAMBLE (0xFA)
+/*! \brief Xbus message bus ID for master devices. */
+#define XBUS_MASTERDEVICE (0xFF)
+/*! \brief Xbus length byte for messages without payload. */
+#define XBUS_NO_PAYLOAD (0x00)
+/*! \brief Xbus length byte for message with an extended payload. */
+#define XBUS_EXTENDED_LENGTH (0xFF)
+
+/*! \brief Opcode to write to control pipe in I2C/SPI mode */
+#define XBUS_CONTROL_PIPE (0x03)
+#define XBUS_PIPE_STATUS (0x04)
+#define XBUS_NOTIFICATION_PIPE (0x05)
+#define XBUS_MEASUREMENT_PIPE (0x06)
+
+#endif // __XBUSDEF_H