Instead of having global command completion handler we can keep the code more concise by letting bt_hci_cmd_send_sync() give back the return parameters straight to the caller. This patch extends the buf->hci.sync variable to not just contain the initial semaphore, but to have the return parameter bt_buf once the semaphore is given back. The bt_hci_cmd_send_sync() function receives an extra parameter which may be NULL if the caller isn't interested in the return parameters. Change-Id: I41e3e4b1189c4a19d0159947a03fd7052cc98fa9 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> |
||
|---|---|---|
| .. | ||
| bluetooth.h | ||
| buf.h | ||
| hci.h | ||