Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
projectconfig.h
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2006-2013 ARM Limited 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _PROJECTCONFIG_H_ 00018 #define _PROJECTCONFIG_H_ 00019 00020 #include "blecommon.h" 00021 00022 /*========================================================================= 00023 MCU & BOARD SELCTION 00024 00025 CFG_BOARD is one of the value defined in board.h 00026 -----------------------------------------------------------------------*/ 00027 #define CFG_BOARD BOARD_PCA10001 00028 #define CFG_MCU_STRING "nRF51822" 00029 /*=========================================================================*/ 00030 00031 #define TARGET_HRM1017 1 00032 00033 /*========================================================================= 00034 CODE BASE VERSION SETTINGS 00035 00036 Please do not modify this version number. To set a version number 00037 for your project or firmware, change the values in your 'boards/' 00038 config file. 00039 -----------------------------------------------------------------------*/ 00040 #define CFG_CODEBASE_VERSION_MAJOR 0 00041 #define CFG_CODEBASE_VERSION_MINOR 1 00042 #define CFG_CODEBASE_VERSION_REVISION 0 00043 /*=========================================================================*/ 00044 00045 00046 /*========================================================================= 00047 FIRMWARE VERSION SETTINGS 00048 -----------------------------------------------------------------------*/ 00049 #define CFG_FIRMWARE_VERSION_MAJOR 0 00050 #define CFG_FIRMWARE_VERSION_MINOR 0 00051 #define CFG_FIRMWARE_VERSION_REVISION 0 00052 /*=========================================================================*/ 00053 00054 00055 /*========================================================================= 00056 DEBUG LEVEL 00057 ----------------------------------------------------------------------- 00058 00059 CFG_DEBUG Level 3: Full debug output, any failed assert 00060 will produce a breakpoint for the 00061 debugger 00062 Level 2: ATTR_ALWAYS_INLINE is null, ASSERT 00063 has text 00064 Level 1: ATTR_ALWAYS_INLINE is an attribute, 00065 ASSERT has no text 00066 Level 0: No debug information generated 00067 00068 -----------------------------------------------------------------------*/ 00069 #define CFG_DEBUG (1) 00070 00071 #if (CFG_DEBUG > 3) || (CFG_DEBUG < 0) 00072 #error "CFG_DEBUG must be a value between 0 (no debug) and 3" 00073 #endif 00074 /*=========================================================================*/ 00075 00076 00077 /*========================================================================= 00078 GENERAL NRF51 PERIPHERAL SETTINGS 00079 ----------------------------------------------------------------------- 00080 00081 CFG_SCHEDULER_ENABLE Set this to 'true' or 'false' depending on 00082 if you use the event scheduler or not 00083 00084 -----------------------------------------------------------------------*/ 00085 #define CFG_SCHEDULER_ENABLE false 00086 00087 /*------------------------------- GPIOTE ------------------------------*/ 00088 #define CFG_GPIOTE_MAX_USERS 1 /**< Maximum number of users of the GPIOTE handler. */ 00089 00090 /*-------------------------------- TIMER ------------------------------*/ 00091 #define CFG_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. freq = (32768/(PRESCALER+1)) */ 00092 #define CFG_TIMER_MAX_INSTANCE 1 /**< Maximum number of simultaneously created timers. */ 00093 #define CFG_TIMER_OPERATION_QUEUE_SIZE 1 /**< Size of timer operation queues. */ 00094 /*=========================================================================*/ 00095 00096 00097 /*========================================================================= 00098 BTLE SETTINGS 00099 -----------------------------------------------------------------------*/ 00100 00101 #define CFG_BLE_TX_POWER_LEVEL 0 /**< in dBm (Valid values are -40, -20, -16, -12, -8, -4, 0, 4) */ 00102 00103 /*---------------------------- BOND MANAGER ---------------------------*/ 00104 #define CFG_BLE_BOND_FLASH_PAGE_BOND (BLE_FLASH_PAGE_END-1) /**< Flash page used for bond manager bonding information.*/ 00105 #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*/ 00106 #define CFG_BLE_BOND_DELETE_BUTTON_NUM 0 /**< Button to press to delete bond details during init */ 00107 00108 /*------------------------------ SECURITY -----------------------------*/ 00109 #define CFG_BLE_SEC_PARAM_MITM 0 /**< Man In The Middle protection not required. */ 00110 #define CFG_BLE_SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O capabilities. */ 00111 #define CFG_BLE_SEC_PARAM_OOB 0 /**< Out Of Band data not available. */ 00112 #define CFG_BLE_SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */ 00113 #define CFG_BLE_SEC_PARAM_MAX_KEY_SIZE 16 00114 00115 /*--------------------------------- GAP -------------------------------*/ 00116 #define CFG_GAP_APPEARANCE BLE_APPEARANCE_GENERIC_TAG 00117 #define CFG_GAP_LOCAL_NAME "nRF5x" 00118 00119 #define CFG_GAP_CONNECTION_MIN_INTERVAL_MS 50 /**< Minimum acceptable connection interval */ 00120 #define CFG_GAP_CONNECTION_MAX_INTERVAL_MS 500 /**< Maximum acceptable connection interval */ 00121 #define CFG_GAP_CONNECTION_SUPERVISION_TIMEOUT_MS 4000 /**< Connection supervisory timeout */ 00122 #define CFG_GAP_CONNECTION_SLAVE_LATENCY 0 /**< Slave Latency in number of connection events. */ 00123 00124 #define CFG_GAP_ADV_INTERVAL_MS 25 /**< The advertising interval in miliseconds, should be multiply of 0.625 */ 00125 #define CFG_GAP_ADV_TIMEOUT_S 180 /**< The advertising timeout in units of seconds. */ 00126 /*=========================================================================*/ 00127 00128 00129 /*========================================================================= 00130 VALIDATION 00131 -----------------------------------------------------------------------*/ 00132 #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 00133 #error "CFG_BLE_TX_POWER_LEVEL must be -40, -20, -16, -12, -8, -4, 0 or 4" 00134 #endif 00135 /*=========================================================================*/ 00136 00137 #endif /* _PROJECTCONFIG_H_ */
Generated on Tue Jul 12 2022 18:47:33 by
