Skip to content

Commit 9329328

Browse files
committed
increase attr table size for 840 to from 0xC00 to 0x1000
1 parent fe724dd commit 9329328

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

libraries/Bluefruit52Lib/src/bluefruit.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ static void nrf_error_cb(uint32_t id, uint32_t pc, uint32_t info)
122122
LOG_LV1("SD Err", "assert at %s : %d", assert_info->p_file_name, assert_info->line_num);
123123
}
124124

125-
while(1)
126-
{
127-
yield();
128-
}
125+
while(1) yield();
129126
#endif
130127
}
131128

@@ -189,11 +186,6 @@ AdafruitBluefruit::AdafruitBluefruit(void)
189186
.kdist_own = { .enc = 1, .id = 1},
190187
.kdist_peer = { .enc = 1, .id = 1},
191188
});
192-
193-
COMMENT_OUT(
194-
_auth_type = BLE_GAP_AUTH_KEY_TYPE_NONE;
195-
varclr(_pin);
196-
)
197189
}
198190

199191
void AdafruitBluefruit::configServiceChanged(bool changed)

libraries/Bluefruit52Lib/src/bluefruit.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@
3636
#define BLE_GATT_ATT_MTU_MAX 247
3737
#define BLE_MAX_CONNECTION 20 // SD support up to 20 connections
3838

39-
#define CFG_SD_ATTR_TABLE_SIZE 0xC00
39+
// Allocate more memory for GATT table for 840
40+
#ifdef NRF52840_XXAA
41+
#define CFG_SD_ATTR_TABLE_SIZE 0x1000
42+
#else
43+
#define CFG_SD_ATTR_TABLE_SIZE 0xC00
44+
#endif
4045

4146
#include "BLEUuid.h"
4247
#include "BLEAdvertising.h"

0 commit comments

Comments
 (0)