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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers xbusdef.h Source File

xbusdef.h

Go to the documentation of this file.
00001 /*!
00002  * \file
00003  * \copyright Copyright (C) Xsens Technologies B.V., 2015.
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
00006  * use this file except in compliance with the License. You may obtain a copy
00007  * of the License at
00008  *
00009  * http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00013  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
00014  * License for the specific language governing permissions and limitations
00015  * under the License.
00016  */
00017 
00018 #ifndef __XBUSDEF_H
00019 #define __XBUSDEF_H
00020 
00021 /*! \brief Xbus message preamble byte. */
00022 #define XBUS_PREAMBLE (0xFA)
00023 /*! \brief Xbus message bus ID for master devices. */
00024 #define XBUS_MASTERDEVICE (0xFF)
00025 /*! \brief Xbus length byte for messages without payload. */
00026 #define XBUS_NO_PAYLOAD (0x00)
00027 /*! \brief Xbus length byte for message with an extended payload. */
00028 #define XBUS_EXTENDED_LENGTH (0xFF)
00029 
00030 /*! \brief Opcode to write to control pipe in I2C/SPI mode */
00031 #define XBUS_CONTROL_PIPE (0x03)
00032 #define XBUS_PIPE_STATUS (0x04)
00033 #define XBUS_NOTIFICATION_PIPE (0x05)
00034 #define XBUS_MEASUREMENT_PIPE (0x06)
00035 
00036 #endif // __XBUSDEF_H