mbed HRM11017を使ってkonashi.jsでナイトライダー
Dependencies: BLE_API_Native_IRC mbed
Fork of BLE_RCBController 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 /*========================================================================= 00021 MCU & BOARD SELCTION 00022 00023 CFG_BOARD is one of the value defined in board.h 00024 -----------------------------------------------------------------------*/ 00025 #define CFG_BOARD BOARD_PCA10001 00026 #define CFG_MCU_STRING "nRF51822" 00027 /*=========================================================================*/ 00028 00029 00030 /*========================================================================= 00031 CODE BASE VERSION SETTINGS 00032 00033 Please do not modify this version number. To set a version number 00034 for your project or firmware, change the values in your 'boards/' 00035 config file. 00036 -----------------------------------------------------------------------*/ 00037 #define CFG_CODEBASE_VERSION_MAJOR 0 00038 #define CFG_CODEBASE_VERSION_MINOR 1 00039 #define CFG_CODEBASE_VERSION_REVISION 0 00040 /*=========================================================================*/ 00041 00042 00043 /*========================================================================= 00044 FIRMWARE VERSION SETTINGS 00045 -----------------------------------------------------------------------*/ 00046 #define CFG_FIRMWARE_VERSION_MAJOR 0 00047 #define CFG_FIRMWARE_VERSION_MINOR 0 00048 #define CFG_FIRMWARE_VERSION_REVISION 0 00049 /*=========================================================================*/ 00050 00051 00052 /*========================================================================= 00053 DEBUG LEVEL 00054 ----------------------------------------------------------------------- 00055 00056 CFG_DEBUG Level 3: Full debug output, any failed assert 00057 will produce a breakpoint for the 00058 debugger 00059 Level 2: ATTR_ALWAYS_INLINE is null, ASSERT 00060 has text 00061 Level 1: ATTR_ALWAYS_INLINE is an attribute, 00062 ASSERT has no text 00063 Level 0: No debug information generated 00064 00065 -----------------------------------------------------------------------*/ 00066 #define CFG_DEBUG (2) 00067 00068 #if (CFG_DEBUG > 3) || (CFG_DEBUG < 0) 00069 #error "CFG_DEBUG must be a value between 0 (no debug) and 3" 00070 #endif 00071 /*=========================================================================*/ 00072 00073 00074 /*========================================================================= 00075 GENERAL NRF51 PERIPHERAL SETTINGS 00076 ----------------------------------------------------------------------- 00077 00078 CFG_SCHEDULER_ENABLE Set this to 'true' or 'false' depending on 00079 if you use the event scheduler or not 00080 00081 -----------------------------------------------------------------------*/ 00082 #define CFG_SCHEDULER_ENABLE false 00083 00084 /*------------------------------- GPIOTE ------------------------------*/ 00085 #define CFG_GPIOTE_MAX_USERS 1 /**< Maximum number of users of the GPIOTE handler. */ 00086 00087 /*-------------------------------- TIMER ------------------------------*/ 00088 #define CFG_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. freq = (32768/(PRESCALER+1)) */ 00089 #define CFG_TIMER_MAX_INSTANCE 8 /**< Maximum number of simultaneously created timers. */ 00090 #define CFG_TIMER_OPERATION_QUEUE_SIZE 5 /**< Size of timer operation queues. */ 00091 /*=========================================================================*/ 00092 00093 00094 /*========================================================================= 00095 BTLE SETTINGS 00096 -----------------------------------------------------------------------*/ 00097 00098 #define CFG_BLE_TX_POWER_LEVEL 4 /**< in dBm (Valid values are -40, -20, -16, -12, -8, -4, 0, 4) */ 00099 00100 /*---------------------------- BOND MANAGER ---------------------------*/ 00101 #define CFG_BLE_BOND_FLASH_PAGE_BOND (BLE_FLASH_PAGE_END-1) /**< Flash page used for bond manager bonding information.*/ 00102 #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*/ 00103 #define CFG_BLE_BOND_DELETE_BUTTON_NUM 0 /**< Button to press to delete bond details during init */ 00104 00105 /*------------------------------ SECURITY -----------------------------*/ 00106 #define CFG_BLE_SEC_PARAM_MITM 0 /**< Man In The Middle protection not required. */ 00107 #define CFG_BLE_SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O capabilities. */ 00108 #define CFG_BLE_SEC_PARAM_OOB 0 /**< Out Of Band data not available. */ 00109 #define CFG_BLE_SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */ 00110 #define CFG_BLE_SEC_PARAM_MAX_KEY_SIZE 16 00111 00112 /*--------------------------------- GAP -------------------------------*/ 00113 #define CFG_GAP_APPEARANCE BLE_APPEARANCE_GENERIC_TAG 00114 #define CFG_GAP_LOCAL_NAME "mbed HRM1017" 00115 00116 #define CFG_GAP_CONNECTION_MIN_INTERVAL_MS 50/*500*/ /**< Minimum acceptable connection interval */ 00117 #define CFG_GAP_CONNECTION_MAX_INTERVAL_MS 100/*1000*/ /**< Maximum acceptable connection interval */ 00118 #define CFG_GAP_CONNECTION_SUPERVISION_TIMEOUT_MS 4000 /**< Connection supervisory timeout */ 00119 #define CFG_GAP_CONNECTION_SLAVE_LATENCY 0 /**< Slave Latency in number of connection events. */ 00120 00121 #define CFG_GAP_ADV_INTERVAL_MS 25 /**< The advertising interval in miliseconds, should be multiply of 0.625 */ 00122 #define CFG_GAP_ADV_TIMEOUT_S 180 /**< The advertising timeout in units of seconds. */ 00123 /*=========================================================================*/ 00124 00125 00126 /*========================================================================= 00127 VALIDATION 00128 -----------------------------------------------------------------------*/ 00129 #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 00130 #error "CFG_BLE_TX_POWER_LEVEL must be -40, -20, -16, -12, -8, -4, 0 or 4" 00131 #endif 00132 /*=========================================================================*/ 00133 00134 #endif /* _PROJECTCONFIG_H_ */
Generated on Tue Jul 12 2022 18:49:54 by 1.7.2