rik freije / Mbed 2 deprecated MTi-1_rikbeun

Dependencies:   mbed-rtos mbed Xbus

Fork of MTi-1_example by Xsens

Committer:
Alex Young
Date:
Wed May 13 14:51:24 2015 +0200
Revision:
6:28cdd6ee6b9d
Child:
15:558d279addd9
Basic implementation for extracting items from MTData2 packets

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Alex Young 6:28cdd6ee6b9d 1 /*!
Alex Young 6:28cdd6ee6b9d 2 * \file
Alex Young 6:28cdd6ee6b9d 3 * \copyright
Alex Young 6:28cdd6ee6b9d 4 * Copyright (C) Xsens Technologies B.V., 2015. All rights reserved.
Alex Young 6:28cdd6ee6b9d 5 *
Alex Young 6:28cdd6ee6b9d 6 * This source code is intended for use only by Xsens Technologies BV and
Alex Young 6:28cdd6ee6b9d 7 * those that have explicit written permission to use it from
Alex Young 6:28cdd6ee6b9d 8 * Xsens Technologies BV.
Alex Young 6:28cdd6ee6b9d 9 *
Alex Young 6:28cdd6ee6b9d 10 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
Alex Young 6:28cdd6ee6b9d 11 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
Alex Young 6:28cdd6ee6b9d 12 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
Alex Young 6:28cdd6ee6b9d 13 * PARTICULAR PURPOSE.
Alex Young 6:28cdd6ee6b9d 14 */
Alex Young 6:28cdd6ee6b9d 15
Alex Young 6:28cdd6ee6b9d 16 #ifndef __MTDATA2_H
Alex Young 6:28cdd6ee6b9d 17 #define __MTDATA2_H
Alex Young 6:28cdd6ee6b9d 18
Alex Young 6:28cdd6ee6b9d 19 #include <stdint.h>
Alex Young 6:28cdd6ee6b9d 20 #include <stdbool.h>
Alex Young 6:28cdd6ee6b9d 21
Alex Young 6:28cdd6ee6b9d 22 /*! \brief Xbus message ID for MTData2 packets. */
Alex Young 6:28cdd6ee6b9d 23 #define MTDATA2_MESSAGE_ID (0x36)
Alex Young 6:28cdd6ee6b9d 24
Alex Young 6:28cdd6ee6b9d 25 #ifdef __cplusplus
Alex Young 6:28cdd6ee6b9d 26 extern "C" {
Alex Young 6:28cdd6ee6b9d 27 #endif
Alex Young 6:28cdd6ee6b9d 28
Alex Young 6:28cdd6ee6b9d 29 enum XsDataIdentifier
Alex Young 6:28cdd6ee6b9d 30 {
Alex Young 6:28cdd6ee6b9d 31 XDI_PacketCounter = 0x1020,
Alex Young 6:28cdd6ee6b9d 32 XDI_SampleTimeFine = 0x1060,
Alex Young 6:28cdd6ee6b9d 33 XDI_Quaternion = 0x2010,
Alex Young 6:28cdd6ee6b9d 34 XDI_DeltaV = 0x4010,
Alex Young 6:28cdd6ee6b9d 35 XDI_Acceleration = 0x4020,
Alex Young 6:28cdd6ee6b9d 36 XDI_RateOfTurn = 0x8020,
Alex Young 6:28cdd6ee6b9d 37 XDI_DeltaQ = 0x8030,
Alex Young 6:28cdd6ee6b9d 38 XDI_MagneticField = 0xC020,
Alex Young 6:28cdd6ee6b9d 39 XDI_StatusWord = 0xE020,
Alex Young 6:28cdd6ee6b9d 40 };
Alex Young 6:28cdd6ee6b9d 41
Alex Young 6:28cdd6ee6b9d 42 bool MtData2_getItem(void* item, enum XsDataIdentifier id, uint8_t const* data, uint16_t dataLength);
Alex Young 6:28cdd6ee6b9d 43
Alex Young 6:28cdd6ee6b9d 44 #ifdef __cplusplus
Alex Young 6:28cdd6ee6b9d 45 }
Alex Young 6:28cdd6ee6b9d 46 #endif // extern "C"
Alex Young 6:28cdd6ee6b9d 47
Alex Young 6:28cdd6ee6b9d 48 #endif // __MTDATA2_H