Bluetooth: Add stubs for directed advertising API
Add API definition and stubs for directed advertising. Change-Id: Ib22d3acb6d2e76b0c638b26b8e07860cd189f640 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
bc073cdb59
commit
f190371781
3 changed files with 39 additions and 0 deletions
|
@ -74,6 +74,12 @@ int bt_le_set_auto_conn(bt_addr_le_t *addr,
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer,
|
||||||
|
const struct bt_le_adv_param *param)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
int bt_conn_auth_cb_register(const struct bt_conn_auth_cb *cb)
|
int bt_conn_auth_cb_register(const struct bt_conn_auth_cb *cb)
|
||||||
{
|
{
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
|
@ -184,6 +184,31 @@ int bt_le_set_auto_conn(bt_addr_le_t *addr,
|
||||||
const struct bt_le_conn_param *param);
|
const struct bt_le_conn_param *param);
|
||||||
#endif /* CONFIG_BLUETOOTH_CENTRAL */
|
#endif /* CONFIG_BLUETOOTH_CENTRAL */
|
||||||
|
|
||||||
|
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
|
||||||
|
/** @brief Initiate directed advertising to a remote device
|
||||||
|
*
|
||||||
|
* Allows initiating a new LE connection to remote peer with the remote
|
||||||
|
* acting in central role and the local device in peripheral role.
|
||||||
|
*
|
||||||
|
* The advertising type must be either BT_LE_ADV_DIRECT_IND or
|
||||||
|
* BT_LE_ADV_DIRECT_IND_LOW_DUTY.
|
||||||
|
*
|
||||||
|
* In case of high duty cycle this will result in a callback with
|
||||||
|
* connected() with a new connection or with an error.
|
||||||
|
*
|
||||||
|
* The advertising may be cancelled with bt_conn_disconnect().
|
||||||
|
*
|
||||||
|
* Returns a new reference that the the caller is responsible for managing.
|
||||||
|
*
|
||||||
|
* @param peer Remote address.
|
||||||
|
* @param param Directed advertising parameters.
|
||||||
|
*
|
||||||
|
* @return Valid connection object on success or NULL otherwise.
|
||||||
|
*/
|
||||||
|
struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer,
|
||||||
|
const struct bt_le_adv_param *param);
|
||||||
|
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
|
||||||
|
|
||||||
/** Security level. */
|
/** Security level. */
|
||||||
typedef enum __packed {
|
typedef enum __packed {
|
||||||
BT_SECURITY_LOW, /** No encryption and no authentication. */
|
BT_SECURITY_LOW, /** No encryption and no authentication. */
|
||||||
|
|
|
@ -981,6 +981,14 @@ int bt_le_set_auto_conn(bt_addr_le_t *addr,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BLUETOOTH_CENTRAL */
|
#endif /* CONFIG_BLUETOOTH_CENTRAL */
|
||||||
|
|
||||||
|
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
|
||||||
|
struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer,
|
||||||
|
const struct bt_le_adv_param *param)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
|
||||||
|
|
||||||
int bt_conn_le_conn_update(struct bt_conn *conn, uint16_t min, uint16_t max,
|
int bt_conn_le_conn_update(struct bt_conn *conn, uint16_t min, uint16_t max,
|
||||||
uint16_t latency, uint16_t timeout)
|
uint16_t latency, uint16_t timeout)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue