Skip to content

Commit 0222a28

Browse files
committed
Bluetooth: Host: Update configuration macros and comment out unused shell commands
bug: v/77156 Fix the definition conflict caused by the macro `CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC`. Remove the `static` declaration in macro `shell_static_entry` to ensure that the shell command definitions can be referenced by `_shell_root_cmds_list` in defines.c. Modify `defines.c` to comment out unused commands in `_shell_root_cmds_list` and manage the `net_buf_pool` segments of each shell command in `_net_buf_pool_list` using the macro `CONFIG_BT_MC_SHELL`. Also, comment out the `net_buf_pool` for unused commands. Fix the incorrect parameter passing in the `adv-create` command. Comment out invalid header file includes in `mible_test.c`. Signed-off-by: chejinxian1 <[email protected]>
1 parent 908fc94 commit 0222a28

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

include/zephyr/sys/time_units.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static inline int z_impl_sys_clock_hw_cycles_per_sec_runtime_get(void)
7373
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
7474
#define sys_clock_hw_cycles_per_sec() sys_clock_hw_cycles_per_sec_runtime_get()
7575
#else
76-
#define sys_clock_hw_cycles_per_sec() CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
76+
#define sys_clock_hw_cycles_per_sec() CONFIG_ZBLUE_SYS_CLOCK_HW_CYCLES_PER_SEC
7777
#endif
7878

7979
/** @internal

port/include/zephyr/shell/shell.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct shell_static_entry {
225225
*/
226226
#define SHELL_CMD_ARG_REGISTER(syntax, subcmd, help, handler, \
227227
mandatory, optional) \
228-
static const struct shell_static_entry UTIL_CAT(_shell_, syntax) = \
228+
const struct shell_static_entry UTIL_CAT(_shell_, syntax) = \
229229
SHELL_CMD_ARG(syntax, subcmd, help, handler, mandatory, optional); \
230230
const TYPE_SECTION_ITERABLE(union shell_cmd_entry, \
231231
UTIL_CAT(shell_cmd_, syntax), shell_root_cmds, \

port/sections/defines.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ struct net_buf_pool *_net_buf_pool_list[] = {
244244
#endif /* CONFIG_BT_MESH_FRIEND */
245245
#endif /* CONFIG_BT_MESH */
246246

247-
#if defined(CONFIG_BT_SHELL)
247+
#if defined(CONFIG_BT_MC_SHELL)
248248
#if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL)
249249
&data_rx_pool,
250250
&data_tx_pool,
@@ -255,23 +255,23 @@ struct net_buf_pool *_net_buf_pool_list[] = {
255255
#if defined(CONFIG_BT_A2DP)
256256
// &a2dp_tx_pool,
257257
#endif /* CONFIG_BT_A2DP */
258-
#if defined(CONFIG_BT_RFCOMM)
259-
&pool,
260-
#endif /* CONFIG_BT_RFCOMM */
258+
// #if defined(CONFIG_BT_RFCOMM)
259+
// &pool,
260+
// #endif /* CONFIG_BT_RFCOMM */
261261
#endif /* CONFIG_BT_CLASSIC */
262-
#if defined(CONFIG_BT_ISO)
263-
&bis_tx_pool,
264-
&tx_pool,
265-
#endif /* CONFIG_BT_ISO */
266-
#if defined(CONFIG_BT_BAP_STREAM)
267-
&sine_tx_pool,
268-
#endif /* CONFIG_BT_BAP_STREAM */
269-
#if defined(CONFIG_BT_AUDIO_TX)
270-
&tx_pool,
271-
#endif /* CONFIG_BT_AUDIO_TX */
272-
#if defined(CONFIG_USB_DEVICE_AUDIO)
273-
&usb_out_buf_pool,
274-
#endif /* CONFIG_USB_DEVICE_AUDIO */
262+
// #if defined(CONFIG_BT_ISO)
263+
// &bis_tx_pool,
264+
// &tx_pool,
265+
// #endif /* CONFIG_BT_ISO */
266+
// #if defined(CONFIG_BT_BAP_STREAM)
267+
// &sine_tx_pool,
268+
// #endif /* CONFIG_BT_BAP_STREAM */
269+
// #if defined(CONFIG_BT_AUDIO_TX)
270+
// &tx_pool,
271+
// #endif /* CONFIG_BT_AUDIO_TX */
272+
// #if defined(CONFIG_USB_DEVICE_AUDIO)
273+
// &usb_out_buf_pool,
274+
// #endif /* CONFIG_USB_DEVICE_AUDIO */
275275
#endif /* CONFIG_BT_SHELL */
276276
NULL,
277277
};
@@ -321,7 +321,7 @@ const union shell_cmd_entry *_shell_root_cmds_list[] = {
321321
#if defined(CONFIG_BT_CLASSIC)
322322
&shell_cmd_br,
323323
#if defined(CONFIG_BT_RFCOMM)
324-
&shell_cmd_rfcomm,
324+
// &shell_cmd_rfcomm,
325325
#endif /* CONFIG_BT_RFCOMM */
326326
#if defined(CONFIG_BT_A2DP)
327327
// &shell_cmd_a2dp,
@@ -331,7 +331,7 @@ const union shell_cmd_entry *_shell_root_cmds_list[] = {
331331
#endif /* CONFIG_BT_AVRCP */
332332
#endif /* CONFIG_BT_CLASSIC */
333333
#if defined(CONFIG_BT_CONN)
334-
&shell_cmd_gatt,
334+
// &shell_cmd_gatt,
335335
#if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL)
336336
&shell_cmd_l2cap,
337337
#endif /* CONFIG_BT_L2CAP_DYNAMIC_CHANNEL */

port/subsys/bluetooth/host/shell/bt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,7 @@ static int cmd_adv_create(const struct shell *sh, size_t argc, char *argv[])
23022302

23032303
dev_id = strtoul(argv[1], NULL, 10);
23042304

2305-
if (!adv_param_parse(argc-1, argv+1, &param)) {
2305+
if (!adv_param_parse(argc-1, argv, &param)) {
23062306
shell_help(sh);
23072307
return -ENOEXEC;
23082308
}

port/subsys/bluetooth/host/shell/mible_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <stdlib.h>
1717
#include <string.h>
1818
#include <sys/byteorder.h>
19-
#include <zephyr.h>
19+
// #include <zephyr.h>
2020

2121
#include <settings/settings.h>
2222

0 commit comments

Comments
 (0)