Skip to content

Commit 4043623

Browse files
author
Cruz Monrreal
authored
Merge pull request #9864 from paul-szczepanek-arm/cordio-host-upgrade
BLE: Cordio host upgrade
2 parents c9192b9 + 61b0631 commit 4043623

File tree

454 files changed

+69633
-5884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+69633
-5884
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
"max-prepared-writes": {
5454
"help": "Number of queued prepare writes supported by server.",
5555
"value": 4
56+
},
57+
"cmac-calculation": {
58+
"help": "Where the CBC MAC calculatio is performed. Valid values are 0 (host) and 1 (controller through HCI).",
59+
"value": 1,
60+
"macro_name": "SEC_CCM_CFG"
5661
}
5762
}
5863
}

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
/*! WSF handler ID */
4242
wsfHandlerId_t stack_handler_id;
4343

44+
/* WSF heap allocation */
45+
uint8_t *SystemHeapStart;
46+
uint32_t SystemHeapSize;
47+
4448
/**
4549
* Weak definition of ble_cordio_get_hci_driver.
4650
* A runtime error is generated if the user does not define any
@@ -369,15 +373,19 @@ void BLE::stack_setup()
369373

370374
buf_pool_desc_t buf_pool_desc = _hci_driver->get_buffer_pool_description();
371375

376+
// use the buffer for the WSF heap
377+
SystemHeapStart = buf_pool_desc.buffer_memory;
378+
SystemHeapSize = buf_pool_desc.buffer_size;
379+
372380
// Initialize buffers with the ones provided by the HCI driver
373-
uint16_t bytes_used = WsfBufInit(
374-
buf_pool_desc.buffer_size, buf_pool_desc.buffer_memory,
375-
buf_pool_desc.pool_count, buf_pool_desc.pool_description
376-
);
381+
uint16_t bytes_used = WsfBufInit(buf_pool_desc.pool_count, (wsfBufPoolDesc_t*)buf_pool_desc.pool_description);
377382

378383
// Raise assert if not enough memory was allocated
379384
MBED_ASSERT(bytes_used != 0);
380385

386+
SystemHeapStart += bytes_used;
387+
SystemHeapSize -= bytes_used;
388+
381389
// This warning will be raised if we've allocated too much memory
382390
if(bytes_used < buf_pool_desc.buffer_size)
383391
{

0 commit comments

Comments
 (0)