SRAM enhancement
This commit is contained in:
1 parent
866c20ecf4
commit
f2e1aa7fe4
9 files changed
+59
-46
No files matched your search
@@ -1,5 +1,5 @@
|
||||
name=Adafruit BLE Libraries for Bluefruit52
|
||||
version=0.8.0
|
||||
version=0.9.0
|
||||
author=Adafruit
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules
|
||||
|
||||
@@ -187,16 +187,33 @@ err_t AdafruitBluefruit::begin(bool prph_enable, bool central_enable)
|
||||
#else
|
||||
ble_cfg_t blecfg;
|
||||
|
||||
// ATTR Table Size
|
||||
// Vendor UUID count
|
||||
varclr(&blecfg);
|
||||
blecfg.gatts_cfg.attr_tab_size.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT; // BLE_GATTS_ATTR_TABLE_SIZE
|
||||
VERIFY_STATUS ( sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &blecfg, ram_start) );
|
||||
blecfg.common_cfg.vs_uuid_cfg.vs_uuid_count = BLE_VENDOR_UUID_MAX;
|
||||
VERIFY_STATUS ( sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &blecfg, ram_start) );
|
||||
|
||||
// Roles
|
||||
varclr(&blecfg);
|
||||
blecfg.gap_cfg.role_count_cfg.periph_role_count = (_prph_enabled ? 1 : 0);
|
||||
blecfg.gap_cfg.role_count_cfg.central_role_count = (_central_enabled ? BLE_CENTRAL_MAX_CONN : 0);
|
||||
blecfg.gap_cfg.role_count_cfg.central_sec_count = (_central_enabled ? BLE_CENTRAL_MAX_SECURE_CONN : 0);
|
||||
VERIFY_STATUS( sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &blecfg, ram_start) );
|
||||
|
||||
// Device Name
|
||||
// varclr(&blecfg);
|
||||
// blecfg.gap_cfg.device_name_cfg =
|
||||
// VERIFY_STATUS( sd_ble_cfg_set(BLE_GAP_CFG_DEVICE_NAME, &blecfg, ram_start) );
|
||||
|
||||
// TODO Service Changed
|
||||
// varclr(&blecfg);
|
||||
// blecfg.gatts_cfg.service_changed.service_changed = 1;
|
||||
// VERIFY_STATUS ( sd_ble_cfg_set(BLE_GATTS_CFG_SERVICE_CHANGED, &blecfg, ram_start) );
|
||||
|
||||
// ATTR Table Size
|
||||
varclr(&blecfg);
|
||||
blecfg.gatts_cfg.attr_tab_size.attr_tab_size = BLE_GATTS_ATTR_TABLE_SIZE;
|
||||
VERIFY_STATUS ( sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &blecfg, ram_start) );
|
||||
|
||||
#if 0
|
||||
// TODO ATT MTU
|
||||
varclr(&blecfg);
|
||||
@@ -232,9 +249,10 @@ err_t AdafruitBluefruit::begin(bool prph_enable, bool central_enable)
|
||||
// between SoftDevices with the same major version number
|
||||
PRINT_HEX(ram_start);
|
||||
|
||||
VERIFY_STATUS( sd_ble_enable(&ram_start) );
|
||||
|
||||
uint32_t err = sd_ble_enable(&ram_start);
|
||||
PRINT_HEX(ram_start);
|
||||
|
||||
VERIFY_STATUS(err);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
#define CFG_MAX_DEVNAME_LEN 32
|
||||
|
||||
// Note changing these parameters will affect APP_RAM_BASE
|
||||
// --> need to update RAM in feather52_s132.ld linker
|
||||
#define BLE_GATTS_ATTR_TABLE_SIZE 0x0B00
|
||||
#define BLE_VENDOR_UUID_MAX 10
|
||||
// --> need to update RAM in linker file
|
||||
#define BLE_GATTS_ATTR_TABLE_SIZE 0x800 //0x0B00 default is 0x580
|
||||
#define BLE_VENDOR_UUID_MAX 20
|
||||
#define BLE_PRPH_MAX_CONN 1
|
||||
#define BLE_CENTRAL_MAX_CONN 4
|
||||
#define BLE_CENTRAL_MAX_SECURE_CONN 1 // should be enough
|
||||
|
||||
Reference in new issue
Block a user