Bluetooth: CSIS: Remove unused functions and callbacks from csis.h
Remove the lock and release sets functions, as well as the discover member function as they have been removed from the implementation a while ago. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
2bf89990ee
commit
728f390f65
3 changed files with 0 additions and 94 deletions
|
@ -238,18 +238,6 @@ typedef void (*bt_csis_client_discover_sets_cb)(struct bt_conn *conn,
|
|||
*/
|
||||
int bt_csis_client_discover_sets(struct bt_conn *conn);
|
||||
|
||||
typedef void (*bt_csis_client_discover_members_cb)(int err, uint8_t set_size,
|
||||
uint8_t members_found);
|
||||
|
||||
/**
|
||||
* @brief Start scanning for all devices that are part of a set.
|
||||
*
|
||||
* @param set The set to find devices for
|
||||
*
|
||||
* @return int Return 0 on success, or an errno value on error.
|
||||
*/
|
||||
int bt_csis_client_discover_members(struct bt_csis_client_set *set);
|
||||
|
||||
typedef void (*bt_csis_client_lock_set_cb)(int err);
|
||||
|
||||
/**
|
||||
|
@ -276,39 +264,16 @@ typedef void (*bt_csis_client_lock_changed_cb)(struct bt_conn *conn,
|
|||
typedef void (*bt_csis_client_lock_read_cb)(struct bt_conn *conn, int err,
|
||||
uint8_t inst_idx, bool locked);
|
||||
|
||||
/**
|
||||
* @brief Callback when the lock value is written to a device.
|
||||
*
|
||||
* @param conn Connection of the CSIS server.
|
||||
* @param err Error value. 0 on success, GATT error or errno on fail.
|
||||
* @param inst_idx The index of the CSIS service.
|
||||
*/
|
||||
typedef void (*bt_csis_client_lock_cb)(struct bt_conn *conn, int err,
|
||||
uint8_t inst_idx);
|
||||
|
||||
/**
|
||||
* @brief Callback when the release value is written to a device.
|
||||
*
|
||||
* @param conn Connection of the CSIS server.
|
||||
* @param err Error value. 0 on success, GATT error or errno on fail.
|
||||
* @param inst_idx The index of the CSIS service.
|
||||
*/
|
||||
typedef void (*bt_csis_client_release_cb)(struct bt_conn *conn, int err,
|
||||
uint8_t inst_idx);
|
||||
|
||||
struct bt_csis_client_cb {
|
||||
/* Set callbacks */
|
||||
bt_csis_client_lock_set_cb lock_set;
|
||||
bt_csis_client_lock_set_cb release_set;
|
||||
bt_csis_client_discover_members_cb members;
|
||||
bt_csis_client_discover_sets_cb sets;
|
||||
bt_csis_client_lock_changed_cb lock_changed;
|
||||
|
||||
/* Device specific callbacks */
|
||||
bt_csis_client_discover_cb discover;
|
||||
bt_csis_client_lock_read_cb lock_read;
|
||||
bt_csis_client_lock_cb lock;
|
||||
bt_csis_client_release_cb release;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -322,22 +287,6 @@ struct bt_csis_client_cb {
|
|||
bool bt_csis_client_is_set_member(uint8_t set_sirk[BT_CSIS_SET_SIRK_SIZE],
|
||||
struct bt_data *data);
|
||||
|
||||
/**
|
||||
* @brief Lock the set
|
||||
*
|
||||
* Connect to and set the lock for all devices in a set.
|
||||
*
|
||||
* @return Return 0 on success, or an errno value on error.
|
||||
*/
|
||||
int bt_csis_client_lock_set(void);
|
||||
|
||||
/**
|
||||
* @brief Connect to and release the lock for all devices in a set
|
||||
*
|
||||
* @return int Return 0 on success, or an errno value on error.
|
||||
*/
|
||||
int bt_csis_client_release_set(void);
|
||||
|
||||
/**
|
||||
* @brief Registers callbacks for csis_client.
|
||||
*
|
||||
|
|
|
@ -148,27 +148,6 @@ static void csis_client_release_set_cb(int err)
|
|||
shell_print(ctx_shell, "Set released");
|
||||
}
|
||||
|
||||
static void csis_client_lock_cb(struct bt_conn *conn, int err, uint8_t inst_idx)
|
||||
{
|
||||
if (err != 0) {
|
||||
shell_error(ctx_shell, "Device (index 0x%02x) lock failed (%d)",
|
||||
inst_idx, err);
|
||||
}
|
||||
|
||||
shell_print(ctx_shell, "Device (index 0x%02x) locked", inst_idx);
|
||||
}
|
||||
|
||||
static void csis_client_release_cb(struct bt_conn *conn, int err,
|
||||
uint8_t inst_idx)
|
||||
{
|
||||
if (err != 0) {
|
||||
shell_error(ctx_shell, "Device (index 0x%02x) release "
|
||||
"failed (%d)", inst_idx, err);
|
||||
}
|
||||
|
||||
shell_print(ctx_shell, "Device (index 0x%02x) released", inst_idx);
|
||||
}
|
||||
|
||||
static void csis_client_lock_get_cb(struct bt_conn *conn, int err,
|
||||
uint8_t inst_idx, bool locked)
|
||||
{
|
||||
|
@ -186,8 +165,6 @@ static struct bt_csis_client_cb cbs = {
|
|||
.release_set = csis_client_release_set_cb,
|
||||
.sets = csis_client_discover_sets_cb,
|
||||
.discover = csis_discover_cb,
|
||||
.lock = csis_client_lock_cb,
|
||||
.release = csis_client_release_cb,
|
||||
.lock_read = csis_client_lock_get_cb
|
||||
};
|
||||
|
||||
|
|
|
@ -47,25 +47,6 @@ static void csis_client_lock_set_cb(int err)
|
|||
set_locked = true;
|
||||
}
|
||||
|
||||
static void csis_client_discover_members_cb(int err, uint8_t set_size,
|
||||
uint8_t members_found)
|
||||
{
|
||||
printk("Discovered %u/%u set members\n", members_found, set_size);
|
||||
|
||||
if (err != 0) {
|
||||
FAIL("Discover members failed (%d)\n", err);
|
||||
return;
|
||||
}
|
||||
|
||||
if (set_size != members_found) {
|
||||
FAIL("Discover members only found %u/%u devices\n",
|
||||
members_found, set_size);
|
||||
return;
|
||||
}
|
||||
|
||||
members_discovered = true;
|
||||
}
|
||||
|
||||
static void csis_client_discover_sets_cb(struct bt_conn *conn, int err,
|
||||
uint8_t set_count,
|
||||
struct bt_csis_client_set *sets)
|
||||
|
@ -133,7 +114,6 @@ static struct bt_conn_cb conn_callbacks = {
|
|||
static struct bt_csis_client_cb cbs = {
|
||||
.lock_set = csis_client_lock_set_cb,
|
||||
.release_set = csis_client_lock_release_cb,
|
||||
.members = csis_client_discover_members_cb,
|
||||
.sets = csis_client_discover_sets_cb,
|
||||
.discover = csis_discover_cb,
|
||||
.lock_changed = csis_lock_changed_cb,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue