Merge branch 'optimize/bt_make_alarm_num_configurable_v4.4' into 'release/v4.4'

optimize(ble_mesh): Make alarm number configurable (v4.4)

See merge request espressif/esp-idf!30509
This commit is contained in:
Wang Meng Yang 2024-05-10 15:05:52 +08:00
commit 5510aabe91
4 changed files with 23 additions and 1 deletions

View File

@ -82,6 +82,12 @@ menu "Bluetooth"
This option is to configure the buffer size of the hci adv report cache in hci debug mode.
This is a ring buffer, the new data will overwrite the oldest data if the buffer is full.
menu "Common Options"
visible if (BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED)
source "$IDF_PATH/components/bt/common/Kconfig.in"
endmenu
endmenu
menuconfig BLE_MESH

View File

@ -0,0 +1,6 @@
config BT_ALARM_MAX_NUM
int "Maximum number of Bluetooth alarms"
default 50
help
This option decides the maximum number of alarms which
could be used by Bluetooth host.

View File

@ -52,6 +52,15 @@
#define UC_BTC_TASK_STACK_SIZE 4096
#endif
/**********************************************************
* Alarm reference
**********************************************************/
#ifdef CONFIG_BT_ALARM_MAX_NUM
#define UC_ALARM_MAX_NUM CONFIG_BT_ALARM_MAX_NUM
#else
#define UC_ALARM_MAX_NUM 50
#endif
/**********************************************************
* Trace reference
**********************************************************/

View File

@ -21,6 +21,7 @@
#include <stdint.h>
#include "esp_timer.h"
#include "bt_user_config.h"
typedef struct alarm_t osi_alarm_t;
typedef uint64_t period_ms_t;
@ -33,7 +34,7 @@ typedef enum {
OSI_ALARM_ERR_INVALID_STATE = -3,
} osi_alarm_err_t;
#define ALARM_CBS_NUM 50
#define ALARM_CBS_NUM UC_ALARM_MAX_NUM
#define ALARM_ID_BASE 1000
int osi_alarm_create_mux(void);