Skip to content

Commit 7a33fec

Browse files
author
Donatien Garnier
committed
Cordio: Split get_buffer_pool_description() in pure virtual + default implementation to avoid allocating two memory pools in a static fashion
1 parent b83c4fd commit 7a33fec

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void CordioHCIDriver::terminate()
7878
_transport_driver.terminate();
7979
}
8080

81-
buf_pool_desc_t CordioHCIDriver::get_buffer_pool_description()
81+
buf_pool_desc_t CordioHCIDriver::get_default_buffer_pool_description()
8282
{
8383
static union {
8484
uint8_t buffer[2250];

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class CordioHCIDriver {
7777
/**
7878
* Return the set of memory pool which will be used by the Cordio stack
7979
*/
80-
virtual buf_pool_desc_t get_buffer_pool_description();
80+
virtual buf_pool_desc_t get_buffer_pool_description() = 0;
8181

8282
/**
8383
* Initialize the HCI driver.
@@ -126,6 +126,12 @@ class CordioHCIDriver {
126126
*/
127127
uint16_t write(uint8_t type, uint16_t len, uint8_t *pData);
128128

129+
protected:
130+
/**
131+
* Return a defai;t set of memory pool which will be used by the Cordio stack
132+
*/
133+
buf_pool_desc_t get_default_buffer_pool_description();
134+
129135
private:
130136
/**
131137
* Initialize the chip.

0 commit comments

Comments
 (0)