Nordic stack and drivers for the mbed BLE API. Version to work around build bug.

Dependents:   microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter

Fork of nRF51822 by Nordic Semiconductor

Committer:
vcoubard
Date:
Mon Jan 11 10:19:27 2016 +0000
Revision:
583:3e44f6eb3a42
Parent:
372:758e9a3a346a
Child:
584:c547c980452f
Synchronized with git rev eab13c8b
Author: Andres Amaya Garcia
Remove occurrence of deprecated appearance enum

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 583:3e44f6eb3a42 1 /* mbed Microcontroller Library
vcoubard 583:3e44f6eb3a42 2 * Copyright (c) 2006-2013 ARM Limited
vcoubard 583:3e44f6eb3a42 3 *
vcoubard 583:3e44f6eb3a42 4 * Licensed under the Apache License, Version 2.0 (the "License");
vcoubard 583:3e44f6eb3a42 5 * you may not use this file except in compliance with the License.
vcoubard 583:3e44f6eb3a42 6 * You may obtain a copy of the License at
vcoubard 583:3e44f6eb3a42 7 *
vcoubard 583:3e44f6eb3a42 8 * http://www.apache.org/licenses/LICENSE-2.0
vcoubard 583:3e44f6eb3a42 9 *
vcoubard 583:3e44f6eb3a42 10 * Unless required by applicable law or agreed to in writing, software
vcoubard 583:3e44f6eb3a42 11 * distributed under the License is distributed on an "AS IS" BASIS,
vcoubard 583:3e44f6eb3a42 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
vcoubard 583:3e44f6eb3a42 13 * See the License for the specific language governing permissions and
vcoubard 583:3e44f6eb3a42 14 * limitations under the License.
vcoubard 583:3e44f6eb3a42 15 */
vcoubard 583:3e44f6eb3a42 16
vcoubard 583:3e44f6eb3a42 17 #ifndef _PROJECTCONFIG_H_
vcoubard 583:3e44f6eb3a42 18 #define _PROJECTCONFIG_H_
vcoubard 583:3e44f6eb3a42 19
vcoubard 583:3e44f6eb3a42 20 #include "ble/blecommon.h"
vcoubard 583:3e44f6eb3a42 21 #include "ble/GapAdvertisingData.h"
vcoubard 583:3e44f6eb3a42 22
vcoubard 583:3e44f6eb3a42 23 /*=========================================================================
vcoubard 583:3e44f6eb3a42 24 MCU & BOARD SELCTION
vcoubard 583:3e44f6eb3a42 25
vcoubard 583:3e44f6eb3a42 26 CFG_BOARD is one of the value defined in board.h
vcoubard 583:3e44f6eb3a42 27 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 28 #define CFG_BOARD BOARD_PCA10001
vcoubard 583:3e44f6eb3a42 29 #define CFG_MCU_STRING "nRF51822"
vcoubard 583:3e44f6eb3a42 30 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 31
vcoubard 583:3e44f6eb3a42 32
vcoubard 583:3e44f6eb3a42 33 /*=========================================================================
vcoubard 583:3e44f6eb3a42 34 CODE BASE VERSION SETTINGS
vcoubard 583:3e44f6eb3a42 35
vcoubard 583:3e44f6eb3a42 36 Please do not modify this version number. To set a version number
vcoubard 583:3e44f6eb3a42 37 for your project or firmware, change the values in your 'boards/'
vcoubard 583:3e44f6eb3a42 38 config file.
vcoubard 583:3e44f6eb3a42 39 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 40 #define CFG_CODEBASE_VERSION_MAJOR 0
vcoubard 583:3e44f6eb3a42 41 #define CFG_CODEBASE_VERSION_MINOR 1
vcoubard 583:3e44f6eb3a42 42 #define CFG_CODEBASE_VERSION_REVISION 0
vcoubard 583:3e44f6eb3a42 43 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 44
vcoubard 583:3e44f6eb3a42 45
vcoubard 583:3e44f6eb3a42 46 /*=========================================================================
vcoubard 583:3e44f6eb3a42 47 FIRMWARE VERSION SETTINGS
vcoubard 583:3e44f6eb3a42 48 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 49 #define CFG_FIRMWARE_VERSION_MAJOR 0
vcoubard 583:3e44f6eb3a42 50 #define CFG_FIRMWARE_VERSION_MINOR 0
vcoubard 583:3e44f6eb3a42 51 #define CFG_FIRMWARE_VERSION_REVISION 0
vcoubard 583:3e44f6eb3a42 52 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 53
vcoubard 583:3e44f6eb3a42 54
vcoubard 583:3e44f6eb3a42 55 /*=========================================================================
vcoubard 583:3e44f6eb3a42 56 DEBUG LEVEL
vcoubard 583:3e44f6eb3a42 57 -----------------------------------------------------------------------
vcoubard 583:3e44f6eb3a42 58
vcoubard 583:3e44f6eb3a42 59 CFG_DEBUG Level 3: Full debug output, any failed assert
vcoubard 583:3e44f6eb3a42 60 will produce a breakpoint for the
vcoubard 583:3e44f6eb3a42 61 debugger
vcoubard 583:3e44f6eb3a42 62 Level 2: ATTR_ALWAYS_INLINE is null, ASSERT
vcoubard 583:3e44f6eb3a42 63 has text
vcoubard 583:3e44f6eb3a42 64 Level 1: ATTR_ALWAYS_INLINE is an attribute,
vcoubard 583:3e44f6eb3a42 65 ASSERT has no text
vcoubard 583:3e44f6eb3a42 66 Level 0: No debug information generated
vcoubard 583:3e44f6eb3a42 67
vcoubard 583:3e44f6eb3a42 68 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 69 #define CFG_DEBUG (1)
vcoubard 583:3e44f6eb3a42 70
vcoubard 583:3e44f6eb3a42 71 #if (CFG_DEBUG > 3) || (CFG_DEBUG < 0)
vcoubard 583:3e44f6eb3a42 72 #error "CFG_DEBUG must be a value between 0 (no debug) and 3"
vcoubard 583:3e44f6eb3a42 73 #endif
vcoubard 583:3e44f6eb3a42 74 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 75
vcoubard 583:3e44f6eb3a42 76
vcoubard 583:3e44f6eb3a42 77 /*=========================================================================
vcoubard 583:3e44f6eb3a42 78 GENERAL NRF51 PERIPHERAL SETTINGS
vcoubard 583:3e44f6eb3a42 79 -----------------------------------------------------------------------
vcoubard 583:3e44f6eb3a42 80
vcoubard 583:3e44f6eb3a42 81 CFG_SCHEDULER_ENABLE Set this to 'true' or 'false' depending on
vcoubard 583:3e44f6eb3a42 82 if you use the event scheduler or not
vcoubard 583:3e44f6eb3a42 83
vcoubard 583:3e44f6eb3a42 84 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 85 #define CFG_SCHEDULER_ENABLE false
vcoubard 583:3e44f6eb3a42 86
vcoubard 583:3e44f6eb3a42 87 /*------------------------------- GPIOTE ------------------------------*/
vcoubard 583:3e44f6eb3a42 88 #define CFG_GPIOTE_MAX_USERS 1 /**< Maximum number of users of the GPIOTE handler. */
vcoubard 583:3e44f6eb3a42 89
vcoubard 583:3e44f6eb3a42 90 /*-------------------------------- TIMER ------------------------------*/
vcoubard 583:3e44f6eb3a42 91 #define CFG_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. freq = (32768/(PRESCALER+1)) */
vcoubard 583:3e44f6eb3a42 92 #define CFG_TIMER_MAX_INSTANCE 1 /**< Maximum number of simultaneously created timers. */
vcoubard 583:3e44f6eb3a42 93 #define CFG_TIMER_OPERATION_QUEUE_SIZE 2 /**< Size of timer operation queues. */
vcoubard 583:3e44f6eb3a42 94 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 95
vcoubard 583:3e44f6eb3a42 96
vcoubard 583:3e44f6eb3a42 97 /*=========================================================================
vcoubard 583:3e44f6eb3a42 98 BTLE SETTINGS
vcoubard 583:3e44f6eb3a42 99 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 100
vcoubard 583:3e44f6eb3a42 101 #define CFG_BLE_TX_POWER_LEVEL 0 /**< in dBm (Valid values are -40, -20, -16, -12, -8, -4, 0, 4) */
vcoubard 583:3e44f6eb3a42 102
vcoubard 583:3e44f6eb3a42 103 /*---------------------------- BOND MANAGER ---------------------------*/
vcoubard 583:3e44f6eb3a42 104 #define CFG_BLE_BOND_FLASH_PAGE_BOND (BLE_FLASH_PAGE_END-1) /**< Flash page used for bond manager bonding information.*/
vcoubard 583:3e44f6eb3a42 105 #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*/
vcoubard 583:3e44f6eb3a42 106 #define CFG_BLE_BOND_DELETE_BUTTON_NUM 0 /**< Button to press to delete bond details during init */
vcoubard 583:3e44f6eb3a42 107
vcoubard 583:3e44f6eb3a42 108 /*------------------------------ SECURITY -----------------------------*/
vcoubard 583:3e44f6eb3a42 109 #define CFG_BLE_SEC_PARAM_MITM 0 /**< Man In The Middle protection not required. */
vcoubard 583:3e44f6eb3a42 110 #define CFG_BLE_SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O capabilities. */
vcoubard 583:3e44f6eb3a42 111 #define CFG_BLE_SEC_PARAM_OOB 0 /**< Out Of Band data not available. */
vcoubard 583:3e44f6eb3a42 112 #define CFG_BLE_SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */
vcoubard 583:3e44f6eb3a42 113 #define CFG_BLE_SEC_PARAM_MAX_KEY_SIZE 16
vcoubard 583:3e44f6eb3a42 114
vcoubard 583:3e44f6eb3a42 115 /*--------------------------------- GAP -------------------------------*/
vcoubard 583:3e44f6eb3a42 116 #define CFG_GAP_APPEARANCE GapAdvertisingData::GENERIC_TAG
vcoubard 583:3e44f6eb3a42 117 #define CFG_GAP_LOCAL_NAME "nRF5x"
vcoubard 583:3e44f6eb3a42 118
vcoubard 583:3e44f6eb3a42 119 #define CFG_GAP_CONNECTION_MIN_INTERVAL_MS 50 /**< Minimum acceptable connection interval */
vcoubard 583:3e44f6eb3a42 120 #define CFG_GAP_CONNECTION_MAX_INTERVAL_MS 500 /**< Maximum acceptable connection interval */
vcoubard 583:3e44f6eb3a42 121 #define CFG_GAP_CONNECTION_SUPERVISION_TIMEOUT_MS 4000 /**< Connection supervisory timeout */
vcoubard 583:3e44f6eb3a42 122 #define CFG_GAP_CONNECTION_SLAVE_LATENCY 0 /**< Slave Latency in number of connection events. */
vcoubard 583:3e44f6eb3a42 123
vcoubard 583:3e44f6eb3a42 124 #define CFG_GAP_ADV_INTERVAL_MS 25 /**< The advertising interval in miliseconds, should be multiply of 0.625 */
vcoubard 583:3e44f6eb3a42 125 #define CFG_GAP_ADV_TIMEOUT_S 180 /**< The advertising timeout in units of seconds. */
vcoubard 583:3e44f6eb3a42 126 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 127
vcoubard 583:3e44f6eb3a42 128
vcoubard 583:3e44f6eb3a42 129 /*=========================================================================
vcoubard 583:3e44f6eb3a42 130 VALIDATION
vcoubard 583:3e44f6eb3a42 131 -----------------------------------------------------------------------*/
vcoubard 583:3e44f6eb3a42 132 #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
vcoubard 583:3e44f6eb3a42 133 #error "CFG_BLE_TX_POWER_LEVEL must be -40, -20, -16, -12, -8, -4, 0 or 4"
vcoubard 583:3e44f6eb3a42 134 #endif
vcoubard 583:3e44f6eb3a42 135 /*=========================================================================*/
vcoubard 583:3e44f6eb3a42 136
rgrover1 372:758e9a3a346a 137 #endif /* _PROJECTCONFIG_H_ */