Skip to content

Commit 4485531

Browse files
author
Donatien Garnier
committed
Update Porting Guide with memory pool changes
1 parent 7e6efc2 commit 4485531

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/doc/PortingGuide.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,26 @@ The functions `do_initialize` and `do_terminate` handle initialization and termi
149149

150150
##### Memory pool
151151

152-
The function `get_buffer_pool_description` in the base class returns a buffer of 1040 bytes divided into different memory pools:
152+
Porters must override the `get_buffer_pool_description` function which should return a buffer pool to use by the Cordio stack.
153+
154+
The function `get_default_buffer_pool_description` in the base class returns a buffer of 2250 bytes divided into different memory pools and can be used with most implementations:
153155

154156
| Chunk size (bytes) | Number of chunks |
155157
|--------------------|------------------|
156-
| 16 | 8 |
157-
| 32 | 4 |
158-
| 64 | 2 |
159-
| 128 | 2 |
158+
| 16 | 16 |
159+
| 32 | 16 |
160+
| 64 | 8 |
161+
| 128 | 4 |
160162
| 272 | 1 |
161163

162-
Porting overrides this function if the memory provided by the base class doesn't match what is required by the Bluetooth controller driver.
164+
**Example:**
165+
```
166+
buf_pool_desc_t CordioHCIDriver::get_buffer_pool_description() {
167+
return get_default_buffer_pool_description();
168+
}
169+
```
170+
171+
If the memory provided by the base class doesn't match what is required by the Bluetooth controller driver, a custom pool can be returned.
163172

164173
**Example:**
165174

0 commit comments

Comments
 (0)