CSSE4011_BLE_IMU IMU Seeed Tiny Ble

Dependencies:   BLE_API_Tiny_BLE MPU6050-DMP-Seeed-Tiny-BLE mbed

Committer:
flywind
Date:
Wed Jun 10 12:56:48 2015 +0000
Revision:
2:44bc61abdf33
Parent:
0:f90c3452d779
milestone working one , yaw pitch roll update in BLE sucessfull

Who changed what in which revision?

UserRevisionLine numberNew contents of line
flywind 0:f90c3452d779 1 /* mbed Microcontroller Library
flywind 0:f90c3452d779 2 * Copyright (c) 2006-2013 ARM Limited
flywind 0:f90c3452d779 3 *
flywind 0:f90c3452d779 4 * Licensed under the Apache License, Version 2.0 (the "License");
flywind 0:f90c3452d779 5 * you may not use this file except in compliance with the License.
flywind 0:f90c3452d779 6 * You may obtain a copy of the License at
flywind 0:f90c3452d779 7 *
flywind 0:f90c3452d779 8 * http://www.apache.org/licenses/LICENSE-2.0
flywind 0:f90c3452d779 9 *
flywind 0:f90c3452d779 10 * Unless required by applicable law or agreed to in writing, software
flywind 0:f90c3452d779 11 * distributed under the License is distributed on an "AS IS" BASIS,
flywind 0:f90c3452d779 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
flywind 0:f90c3452d779 13 * See the License for the specific language governing permissions and
flywind 0:f90c3452d779 14 * limitations under the License.
flywind 0:f90c3452d779 15 *
flywind 0:f90c3452d779 16
flywind 0:f90c3452d779 17 *
flywind 0:f90c3452d779 18 *
flywind 0:f90c3452d779 19 */
flywind 0:f90c3452d779 20
flywind 0:f90c3452d779 21 #include "MPUService.h"
flywind 0:f90c3452d779 22
flywind 0:f90c3452d779 23 const uint8_t MPUServiceBaseUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 24 0xD9, 0x88, 0x8D, 0xC0, 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 25 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 26 };
flywind 0:f90c3452d779 27 const uint16_t MPUServiceShortUUID = 0x8DC0;
flywind 0:f90c3452d779 28
flywind 0:f90c3452d779 29 const uint16_t MPUServiceYPRCharacteristicShortUUID = 0x8DC1;
flywind 0:f90c3452d779 30
flywind 0:f90c3452d779 31 const uint16_t MPUServiceAccelCharacteristicShortUUID = 0x8DC2;
flywind 0:f90c3452d779 32 const uint16_t MPUServiceQuatCharacteristicShortUUID = 0x8DC3;
flywind 0:f90c3452d779 33 const uint16_t MPUServiceTimeCharacteristicShortUUID = 0x8DC4;
flywind 0:f90c3452d779 34 const uint16_t MPUServiceSettingCharacteristicShortUUID = 0x8DC5;
flywind 0:f90c3452d779 35
flywind 0:f90c3452d779 36 const uint8_t MPUServiceUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 37 0xD9, 0x88, (uint8_t)(MPUServiceShortUUID >> 8), (uint8_t)(MPUServiceShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 38 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 39 };
flywind 0:f90c3452d779 40
flywind 0:f90c3452d779 41 const uint8_t MPUServiceUUID_reversed[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 42 0x66, 0x9A, 0x0C, 0x20, 0x00, 0x08, 0x39, 0xB9,
flywind 0:f90c3452d779 43 0xE5, 0x11, 0x91, 0x0E, (uint8_t)(MPUServiceShortUUID & 0xFF), (uint8_t)(MPUServiceShortUUID >> 8), 0x88, 0xD9
flywind 0:f90c3452d779 44 };
flywind 0:f90c3452d779 45
flywind 0:f90c3452d779 46 const uint8_t MPUServiceYPRCharacteristicUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 47 0xD9, 0x88, (uint8_t)(MPUServiceYPRCharacteristicShortUUID >> 8), (uint8_t)(MPUServiceYPRCharacteristicShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 48 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 49 };
flywind 0:f90c3452d779 50
flywind 0:f90c3452d779 51 const uint8_t MPUServiceAccelCharacteristicUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 52 0xD9, 0x88, (uint8_t)(MPUServiceAccelCharacteristicShortUUID >> 8), (uint8_t)(MPUServiceAccelCharacteristicShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 53 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 54 };
flywind 0:f90c3452d779 55
flywind 0:f90c3452d779 56 const uint8_t MPUServiceQuatCharacteristicUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 57 0xD9, 0x88, (uint8_t)(MPUServiceQuatCharacteristicShortUUID >> 8), (uint8_t)(MPUServiceQuatCharacteristicShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 58 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 59 };
flywind 0:f90c3452d779 60
flywind 0:f90c3452d779 61 const uint8_t MPUServiceTimeCharacteristicUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 62 0xD9, 0x88, (uint8_t)(MPUServiceTimeCharacteristicShortUUID >> 8), (uint8_t)(MPUServiceTimeCharacteristicShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 63 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 64 };
flywind 0:f90c3452d779 65
flywind 0:f90c3452d779 66 const uint8_t MPUServiceSettingCharacteristicUUID[LENGTH_OF_LONG_UUID] = {
flywind 0:f90c3452d779 67 0xD9, 0x88, (uint8_t)(MPUServiceSettingCharacteristicShortUUID >> 8), (uint8_t)(MPUServiceSettingCharacteristicShortUUID & 0xFF), 0x0E, 0x91, 0x11, 0xE5,
flywind 0:f90c3452d779 68 0xB9, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
flywind 0:f90c3452d779 69 };
flywind 0:f90c3452d779 70
flywind 0:f90c3452d779 71