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 #ifndef _PROJECTCONFIG_H_
flywind 0:f90c3452d779 18 #define _PROJECTCONFIG_H_
flywind 0:f90c3452d779 19
flywind 0:f90c3452d779 20 #include "blecommon.h"
flywind 0:f90c3452d779 21
flywind 0:f90c3452d779 22 /*=========================================================================
flywind 0:f90c3452d779 23 MCU & BOARD SELCTION
flywind 0:f90c3452d779 24
flywind 0:f90c3452d779 25 CFG_BOARD is one of the value defined in board.h
flywind 0:f90c3452d779 26 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 27 #define CFG_BOARD BOARD_PCA10001
flywind 0:f90c3452d779 28 #define CFG_MCU_STRING "nRF51822"
flywind 0:f90c3452d779 29 /*=========================================================================*/
flywind 0:f90c3452d779 30
flywind 0:f90c3452d779 31
flywind 0:f90c3452d779 32 /*=========================================================================
flywind 0:f90c3452d779 33 CODE BASE VERSION SETTINGS
flywind 0:f90c3452d779 34
flywind 0:f90c3452d779 35 Please do not modify this version number. To set a version number
flywind 0:f90c3452d779 36 for your project or firmware, change the values in your 'boards/'
flywind 0:f90c3452d779 37 config file.
flywind 0:f90c3452d779 38 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 39 #define CFG_CODEBASE_VERSION_MAJOR 0
flywind 0:f90c3452d779 40 #define CFG_CODEBASE_VERSION_MINOR 1
flywind 0:f90c3452d779 41 #define CFG_CODEBASE_VERSION_REVISION 0
flywind 0:f90c3452d779 42 /*=========================================================================*/
flywind 0:f90c3452d779 43
flywind 0:f90c3452d779 44
flywind 0:f90c3452d779 45 /*=========================================================================
flywind 0:f90c3452d779 46 FIRMWARE VERSION SETTINGS
flywind 0:f90c3452d779 47 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 48 #define CFG_FIRMWARE_VERSION_MAJOR 0
flywind 0:f90c3452d779 49 #define CFG_FIRMWARE_VERSION_MINOR 0
flywind 0:f90c3452d779 50 #define CFG_FIRMWARE_VERSION_REVISION 0
flywind 0:f90c3452d779 51 /*=========================================================================*/
flywind 0:f90c3452d779 52
flywind 0:f90c3452d779 53
flywind 0:f90c3452d779 54 /*=========================================================================
flywind 0:f90c3452d779 55 DEBUG LEVEL
flywind 0:f90c3452d779 56 -----------------------------------------------------------------------
flywind 0:f90c3452d779 57
flywind 0:f90c3452d779 58 CFG_DEBUG Level 3: Full debug output, any failed assert
flywind 0:f90c3452d779 59 will produce a breakpoint for the
flywind 0:f90c3452d779 60 debugger
flywind 0:f90c3452d779 61 Level 2: ATTR_ALWAYS_INLINE is null, ASSERT
flywind 0:f90c3452d779 62 has text
flywind 0:f90c3452d779 63 Level 1: ATTR_ALWAYS_INLINE is an attribute,
flywind 0:f90c3452d779 64 ASSERT has no text
flywind 0:f90c3452d779 65 Level 0: No debug information generated
flywind 0:f90c3452d779 66
flywind 0:f90c3452d779 67 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 68 #define CFG_DEBUG (1)
flywind 0:f90c3452d779 69
flywind 0:f90c3452d779 70 #if (CFG_DEBUG > 3) || (CFG_DEBUG < 0)
flywind 0:f90c3452d779 71 #error "CFG_DEBUG must be a value between 0 (no debug) and 3"
flywind 0:f90c3452d779 72 #endif
flywind 0:f90c3452d779 73 /*=========================================================================*/
flywind 0:f90c3452d779 74
flywind 0:f90c3452d779 75
flywind 0:f90c3452d779 76 /*=========================================================================
flywind 0:f90c3452d779 77 GENERAL NRF51 PERIPHERAL SETTINGS
flywind 0:f90c3452d779 78 -----------------------------------------------------------------------
flywind 0:f90c3452d779 79
flywind 0:f90c3452d779 80 CFG_SCHEDULER_ENABLE Set this to 'true' or 'false' depending on
flywind 0:f90c3452d779 81 if you use the event scheduler or not
flywind 0:f90c3452d779 82
flywind 0:f90c3452d779 83 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 84 #define CFG_SCHEDULER_ENABLE false
flywind 0:f90c3452d779 85
flywind 0:f90c3452d779 86 /*------------------------------- GPIOTE ------------------------------*/
flywind 0:f90c3452d779 87 #define CFG_GPIOTE_MAX_USERS 1 /**< Maximum number of users of the GPIOTE handler. */
flywind 0:f90c3452d779 88
flywind 0:f90c3452d779 89 /*-------------------------------- TIMER ------------------------------*/
flywind 0:f90c3452d779 90 #define CFG_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. freq = (32768/(PRESCALER+1)) */
flywind 0:f90c3452d779 91 #define CFG_TIMER_MAX_INSTANCE 1 /**< Maximum number of simultaneously created timers. */
flywind 0:f90c3452d779 92 #define CFG_TIMER_OPERATION_QUEUE_SIZE 2 /**< Size of timer operation queues. */
flywind 0:f90c3452d779 93 /*=========================================================================*/
flywind 0:f90c3452d779 94
flywind 0:f90c3452d779 95
flywind 0:f90c3452d779 96 /*=========================================================================
flywind 0:f90c3452d779 97 BTLE SETTINGS
flywind 0:f90c3452d779 98 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 99
flywind 0:f90c3452d779 100 #define CFG_BLE_TX_POWER_LEVEL 0 /**< in dBm (Valid values are -40, -20, -16, -12, -8, -4, 0, 4) */
flywind 0:f90c3452d779 101
flywind 0:f90c3452d779 102 /*---------------------------- BOND MANAGER ---------------------------*/
flywind 0:f90c3452d779 103 #define CFG_BLE_BOND_FLASH_PAGE_BOND (BLE_FLASH_PAGE_END-1) /**< Flash page used for bond manager bonding information.*/
flywind 0:f90c3452d779 104 #define CFG_BLE_BOND_FLASH_PAGE_SYS_ATTR (BLE_FLASH_PAGE_END-3) /**< Flash page used for bond manager system attribute information. TODO check if we can use BLE_FLASH_PAGE_END-2*/
flywind 0:f90c3452d779 105 #define CFG_BLE_BOND_DELETE_BUTTON_NUM 0 /**< Button to press to delete bond details during init */
flywind 0:f90c3452d779 106
flywind 0:f90c3452d779 107 /*------------------------------ SECURITY -----------------------------*/
flywind 0:f90c3452d779 108 #define CFG_BLE_SEC_PARAM_MITM 0 /**< Man In The Middle protection not required. */
flywind 0:f90c3452d779 109 #define CFG_BLE_SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O capabilities. */
flywind 0:f90c3452d779 110 #define CFG_BLE_SEC_PARAM_OOB 0 /**< Out Of Band data not available. */
flywind 0:f90c3452d779 111 #define CFG_BLE_SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */
flywind 0:f90c3452d779 112 #define CFG_BLE_SEC_PARAM_MAX_KEY_SIZE 16
flywind 0:f90c3452d779 113
flywind 0:f90c3452d779 114 /*--------------------------------- GAP -------------------------------*/
flywind 0:f90c3452d779 115 #define CFG_GAP_APPEARANCE BLE_APPEARANCE_GENERIC_TAG
flywind 0:f90c3452d779 116 #define CFG_GAP_LOCAL_NAME "nRF5x"
flywind 0:f90c3452d779 117
flywind 0:f90c3452d779 118 #define CFG_GAP_CONNECTION_MIN_INTERVAL_MS 50 /**< Minimum acceptable connection interval */
flywind 0:f90c3452d779 119 #define CFG_GAP_CONNECTION_MAX_INTERVAL_MS 500 /**< Maximum acceptable connection interval */
flywind 0:f90c3452d779 120 #define CFG_GAP_CONNECTION_SUPERVISION_TIMEOUT_MS 4000 /**< Connection supervisory timeout */
flywind 0:f90c3452d779 121 #define CFG_GAP_CONNECTION_SLAVE_LATENCY 0 /**< Slave Latency in number of connection events. */
flywind 0:f90c3452d779 122
flywind 0:f90c3452d779 123 #define CFG_GAP_ADV_INTERVAL_MS 25 /**< The advertising interval in miliseconds, should be multiply of 0.625 */
flywind 0:f90c3452d779 124 #define CFG_GAP_ADV_TIMEOUT_S 180 /**< The advertising timeout in units of seconds. */
flywind 0:f90c3452d779 125 /*=========================================================================*/
flywind 0:f90c3452d779 126
flywind 0:f90c3452d779 127
flywind 0:f90c3452d779 128 /*=========================================================================
flywind 0:f90c3452d779 129 VALIDATION
flywind 0:f90c3452d779 130 -----------------------------------------------------------------------*/
flywind 0:f90c3452d779 131 #if CFG_BLE_TX_POWER_LEVEL != -40 && CFG_BLE_TX_POWER_LEVEL != -20 && CFG_BLE_TX_POWER_LEVEL != -16 && CFG_BLE_TX_POWER_LEVEL != -12 && CFG_BLE_TX_POWER_LEVEL != -8 && CFG_BLE_TX_POWER_LEVEL != -4 && CFG_BLE_TX_POWER_LEVEL != 0 && CFG_BLE_TX_POWER_LEVEL != 4
flywind 0:f90c3452d779 132 #error "CFG_BLE_TX_POWER_LEVEL must be -40, -20, -16, -12, -8, -4, 0 or 4"
flywind 0:f90c3452d779 133 #endif
flywind 0:f90c3452d779 134 /*=========================================================================*/
flywind 0:f90c3452d779 135
flywind 0:f90c3452d779 136 #endif /* _PROJECTCONFIG_H_ */