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