BLE - Add CordioHCIDriver::on_host_stack_inactivity

This callback should be called by the host stack when it has no pending activities. It allows a driver to put its controller to sleep.
pull/10162/head
Vincent Coubard 2019-03-19 16:08:04 +00:00
parent 54602f55ba
commit 7ee811141b
2 changed files with 14 additions and 0 deletions

View File

@ -283,6 +283,10 @@ uint16_t CordioHCIDriver::write(uint8_t type, uint16_t len, uint8_t *pData)
return _transport_driver.write(type, len, pData); return _transport_driver.write(type, len, pData);
} }
void CordioHCIDriver::on_host_stack_inactivity()
{
}
} // namespace cordio } // namespace cordio
} // namespace vendor } // namespace vendor
} // namespace ble } // namespace ble

View File

@ -134,6 +134,16 @@ public:
*/ */
uint16_t write(uint8_t type, uint16_t len, uint8_t *pData); uint16_t write(uint8_t type, uint16_t len, uint8_t *pData);
/**
* React to host stack inactivity.
*
* The host stack invoke this function when it is inactive. It allows a
* driver to put its controller to sleep if all the conditions are met.
*
* Any call to write signals to the driver that the host stack is active.
*/
virtual void on_host_stack_inactivity();
protected: protected:
/** /**
* Return a default set of memory pool that the Cordio stack can use. * Return a default set of memory pool that the Cordio stack can use.