Skip to content

Commit 7ee8111

Browse files
committed
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.
1 parent 54602f5 commit 7ee8111

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ uint16_t CordioHCIDriver::write(uint8_t type, uint16_t len, uint8_t *pData)
283283
return _transport_driver.write(type, len, pData);
284284
}
285285

286+
void CordioHCIDriver::on_host_stack_inactivity()
287+
{
288+
}
289+
286290
} // namespace cordio
287291
} // namespace vendor
288292
} // namespace ble

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ class CordioHCIDriver {
134134
*/
135135
uint16_t write(uint8_t type, uint16_t len, uint8_t *pData);
136136

137+
/**
138+
* React to host stack inactivity.
139+
*
140+
* The host stack invoke this function when it is inactive. It allows a
141+
* driver to put its controller to sleep if all the conditions are met.
142+
*
143+
* Any call to write signals to the driver that the host stack is active.
144+
*/
145+
virtual void on_host_stack_inactivity();
146+
137147
protected:
138148
/**
139149
* Return a default set of memory pool that the Cordio stack can use.

0 commit comments

Comments
 (0)