Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit787f3fa

Browse files
committed
chore: add support for customize app_conf_default.h
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent545cd73 commit787f3fa

File tree

1 file changed

+45
-13
lines changed

1 file changed

+45
-13
lines changed

‎src/utility/STM32_WPAN/app_conf_default.h

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
/**
5151
* Define Tx Power
5252
*/
53-
#defineCFG_TX_POWER (0x18)/* -0.15dBm */
53+
#ifndefCFG_TX_POWER
54+
#defineCFG_TX_POWER (0x18)/* -0.15dBm */
55+
#endif
5456

5557
#if0
5658
/**
@@ -135,13 +137,25 @@
135137
* Maximum number of simultaneous connections that the device will support.
136138
* Valid values are from 1 to 8
137139
*/
138-
#defineCFG_BLE_NUM_LINK 8
140+
#ifndefCFG_BLE_NUM_LINK
141+
#ifdefSTM32WB15xx
142+
#defineCFG_BLE_NUM_LINK 3
143+
#else
144+
#defineCFG_BLE_NUM_LINK 8
145+
#endif
146+
#endif
139147

140148
/**
141149
* Maximum number of Services that can be stored in the GATT database.
142150
* Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services
143151
*/
144-
#defineCFG_BLE_NUM_GATT_SERVICES 8
152+
#ifndefCFG_BLE_NUM_GATT_SERVICES
153+
#ifdefSTM32WB15xx
154+
#defineCFG_BLE_NUM_GATT_SERVICES 4
155+
#else
156+
#defineCFG_BLE_NUM_GATT_SERVICES 8
157+
#endif
158+
#endif
145159

146160
/**
147161
* Maximum number of Attributes
@@ -150,7 +164,13 @@
150164
* Note that certain characteristics and relative descriptors are added automatically during device initialization
151165
* so this parameters should be 9 plus the number of user Attributes
152166
*/
153-
#defineCFG_BLE_NUM_GATT_ATTRIBUTES 68
167+
#ifndefCFG_BLE_NUM_GATT_ATTRIBUTES
168+
#ifdefSTM32WB15xx
169+
#defineCFG_BLE_NUM_GATT_ATTRIBUTES 30
170+
#else
171+
#defineCFG_BLE_NUM_GATT_ATTRIBUTES 68
172+
#endif
173+
#endif
154174

155175
/**
156176
* Maximum supported ATT_MTU size
@@ -186,12 +206,16 @@
186206
/**
187207
* Enable or disable the Extended Packet length feature. Valid values are 0 or 1.
188208
*/
189-
#defineCFG_BLE_DATA_LENGTH_EXTENSION 1
209+
#ifndefCFG_BLE_DATA_LENGTH_EXTENSION
210+
#defineCFG_BLE_DATA_LENGTH_EXTENSION 1
211+
#endif
190212

191213
/**
192214
* Sleep clock accuracy in Peripheral mode (ppm value)
193215
*/
194-
#defineCFG_BLE_PERIPHERAL_SCA 500
216+
#ifndefCFG_BLE_PERIPHERAL_SCA
217+
#defineCFG_BLE_PERIPHERAL_SCA 500
218+
#endif
195219

196220
/**
197221
* Sleep clock accuracy in Central mode
@@ -204,7 +228,9 @@
204228
* 6 : 21 ppm to 30 ppm
205229
* 7 : 0 ppm to 20 ppm
206230
*/
207-
#defineCFG_BLE_CENTRAL_SCA 0
231+
#ifndefCFG_BLE_CENTRAL_SCA
232+
#defineCFG_BLE_CENTRAL_SCA 0
233+
#endif
208234

209235
/**
210236
* LsSource
@@ -213,21 +239,27 @@
213239
* - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
214240
* - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config
215241
*/
216-
#if defined(STM32WB5Mxx)
217-
#defineCFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
218-
#else
219-
#defineCFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
242+
#ifndefCFG_BLE_LS_SOURCE
243+
#if defined(STM32WB5Mxx)
244+
#defineCFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
245+
#else
246+
#defineCFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
247+
#endif
220248
#endif
221249

222250
/**
223251
* Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us)
224252
*/
225-
#defineCFG_BLE_HSE_STARTUP_TIME 0x148
253+
#ifndefCFG_BLE_HSE_STARTUP_TIME
254+
#defineCFG_BLE_HSE_STARTUP_TIME 0x148
255+
#endif
226256

227257
/**
228258
* Maximum duration of the connection event when the device is in Peripheral mode in units of 625/256 us (~2.44 us)
229259
*/
230-
#defineCFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF)
260+
#ifndefCFG_BLE_MAX_CONN_EVENT_LENGTH
261+
#defineCFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF)
262+
#endif
231263

232264
/**
233265
* Viterbi Mode

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp