Cordio: Split get_buffer_pool_description() in pure virtual + default implementation to avoid allocating two memory pools in a static fashion

pull/9064/head
Donatien Garnier 2018-12-05 16:16:58 +00:00 committed by Cruz Monrreal II
parent a7c5523081
commit 4ece9023a2
2 changed files with 8 additions and 2 deletions

View File

@ -78,7 +78,7 @@ void CordioHCIDriver::terminate()
_transport_driver.terminate();
}
buf_pool_desc_t CordioHCIDriver::get_buffer_pool_description()
buf_pool_desc_t CordioHCIDriver::get_default_buffer_pool_description()
{
static union {
uint8_t buffer[2250];

View File

@ -77,7 +77,7 @@ public:
/**
* Return the set of memory pool which will be used by the Cordio stack
*/
virtual buf_pool_desc_t get_buffer_pool_description();
virtual buf_pool_desc_t get_buffer_pool_description() = 0;
/**
* Initialize the HCI driver.
@ -126,6 +126,12 @@ public:
*/
uint16_t write(uint8_t type, uint16_t len, uint8_t *pData);
protected:
/**
* Return a defai;t set of memory pool which will be used by the Cordio stack
*/
buf_pool_desc_t get_default_buffer_pool_description();
private:
/**
* Initialize the chip.