nrf52/nrf53/sdc: define BLE max connection if NET_BLUETOOTH=n
This commit is contained in:
parent
620c6cfd58
commit
bca927e203
@ -710,9 +710,16 @@ config NRF52_SDC_PERIPHERAL_COUNT
|
|||||||
determines the number of central roles from the following:
|
determines the number of central roles from the following:
|
||||||
|
|
||||||
CENTRAL_ROLES = CONFIG_BLUETOOTH_MAX_CONN - NRF52_SDC_PERIPHERAL_COUNT
|
CENTRAL_ROLES = CONFIG_BLUETOOTH_MAX_CONN - NRF52_SDC_PERIPHERAL_COUNT
|
||||||
|
or
|
||||||
|
CENTRAL_ROLES = NRF52_SDC_MAX_COUNT - NRF52_SDC_PERIPHERAL_COUNT
|
||||||
|
|
||||||
So by choosing these two variables you can control both capabilities.
|
So by choosing these two variables you can control both capabilities.
|
||||||
|
|
||||||
|
config NRF52_SDC_MAX_COUNT
|
||||||
|
int "Maximum number of roles to support"
|
||||||
|
default 1
|
||||||
|
depends on !NET_BLUETOOTH
|
||||||
|
|
||||||
config NRF52_SDC_ADVERTISING
|
config NRF52_SDC_ADVERTISING
|
||||||
bool "Support advertising"
|
bool "Support advertising"
|
||||||
default y
|
default y
|
||||||
|
@ -58,6 +58,12 @@
|
|||||||
|
|
||||||
/* Connections configuration ************************************************/
|
/* Connections configuration ************************************************/
|
||||||
|
|
||||||
|
/* If NET_BLUETOOTH not defined */
|
||||||
|
|
||||||
|
#ifndef CONFIG_BLUETOOTH_MAX_CONN
|
||||||
|
# define CONFIG_BLUETOOTH_MAX_CONN CONFIG_NRF52_SDC_MAX_COUNT
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_SDC_PERIPHERAL_COUNT) && \
|
#if defined(CONFIG_SDC_PERIPHERAL_COUNT) && \
|
||||||
CONFIG_SDC_PERIPHERAL_COUNT > CONFIG_BLUETOOTH_MAX_CONN
|
CONFIG_SDC_PERIPHERAL_COUNT > CONFIG_BLUETOOTH_MAX_CONN
|
||||||
# error "Cannot support more BLE peripheral roles than connections"
|
# error "Cannot support more BLE peripheral roles than connections"
|
||||||
@ -270,7 +276,7 @@ static int bt_open(struct bt_driver_s *btdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: bt_open
|
* Name: bt_hci_send
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int bt_hci_send(struct bt_driver_s *btdev,
|
static int bt_hci_send(struct bt_driver_s *btdev,
|
||||||
|
@ -435,9 +435,16 @@ config NRF53_SDC_PERIPHERAL_COUNT
|
|||||||
determines the number of central roles from the following:
|
determines the number of central roles from the following:
|
||||||
|
|
||||||
CENTRAL_ROLES = CONFIG_BLUETOOTH_MAX_CONN - NRF53_SDC_PERIPHERAL_COUNT
|
CENTRAL_ROLES = CONFIG_BLUETOOTH_MAX_CONN - NRF53_SDC_PERIPHERAL_COUNT
|
||||||
|
or
|
||||||
|
CENTRAL_ROLES = NRF52_SDC_MAX_COUNT - NRF52_SDC_PERIPHERAL_COUNT
|
||||||
|
|
||||||
So by choosing these two variables you can control both capabilities.
|
So by choosing these two variables you can control both capabilities.
|
||||||
|
|
||||||
|
config NRF53_SDC_MAX_COUNT
|
||||||
|
int "Maximum number of roles to support"
|
||||||
|
default 1
|
||||||
|
depends on !NET_BLUETOOTH
|
||||||
|
|
||||||
config NRF53_SDC_ADVERTISING
|
config NRF53_SDC_ADVERTISING
|
||||||
bool "Support advertising"
|
bool "Support advertising"
|
||||||
default y
|
default y
|
||||||
|
@ -62,6 +62,12 @@
|
|||||||
|
|
||||||
/* Connections configuration ************************************************/
|
/* Connections configuration ************************************************/
|
||||||
|
|
||||||
|
/* If NET_BLUETOOTH not defined */
|
||||||
|
|
||||||
|
#ifndef CONFIG_NET_BLUETOOTH
|
||||||
|
# define CONFIG_BLUETOOTH_MAX_CONN CONFIG_NRF53_SDC_MAX_COUNT
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_SDC_PERIPHERAL_COUNT) && \
|
#if defined(CONFIG_SDC_PERIPHERAL_COUNT) && \
|
||||||
CONFIG_SDC_PERIPHERAL_COUNT > CONFIG_BLUETOOTH_MAX_CONN
|
CONFIG_SDC_PERIPHERAL_COUNT > CONFIG_BLUETOOTH_MAX_CONN
|
||||||
# error "Cannot support more BLE peripheral roles than connections"
|
# error "Cannot support more BLE peripheral roles than connections"
|
||||||
@ -261,7 +267,7 @@ static int bt_open(struct bt_driver_s *btdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: bt_open
|
* Name: bt_hci_send
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int bt_hci_send(struct bt_driver_s *btdev,
|
static int bt_hci_send(struct bt_driver_s *btdev,
|
||||||
|
Loading…
Reference in New Issue
Block a user