Zephyr Project API  3.1.0
A Scalable Open Source RTOS
csis.h File Reference
#include <zephyr/types.h>
#include <stdbool.h>
#include <zephyr/bluetooth/conn.h>

Go to the source code of this file.

Data Structures

struct  bt_csis_cb
 
struct  bt_csis_register_param
 
struct  bt_csis_client_set_info
 
struct  bt_csis_client_csis_inst
 Struct representing a coordinated set instance on a remote device. More...
 
struct  bt_csis_client_set_member
 
struct  bt_csis_client_cb
 

Macros

#define CSIS_CLIENT_DISCOVER_TIMER_VALUE   K_SECONDS(10)
 
#define BT_CSIS_CLIENT_MAX_CSIS_INSTANCES   0
 
#define BT_CSIS_MINIMUM_SET_SIZE   2
 
#define BT_CSIS_READ_SIRK_REQ_RSP_ACCEPT   0x00
 
#define BT_CSIS_READ_SIRK_REQ_RSP_ACCEPT_ENC   0x01
 
#define BT_CSIS_READ_SIRK_REQ_RSP_REJECT   0x02
 
#define BT_CSIS_READ_SIRK_REQ_RSP_OOB_ONLY   0x03
 
#define BT_CSIS_SET_SIRK_SIZE   16
 
#define BT_CSIS_ERROR_LOCK_DENIED   0x80
 
#define BT_CSIS_ERROR_LOCK_RELEASE_DENIED   0x81
 
#define BT_CSIS_ERROR_LOCK_INVAL_VALUE   0x82
 
#define BT_CSIS_ERROR_SIRK_OOB_ONLY   0x83
 
#define BT_CSIS_ERROR_LOCK_ALREADY_GRANTED   0x84
 

Typedefs

typedef void(* bt_csis_client_discover_cb) (struct bt_csis_client_set_member *member, int err, uint8_t set_count)
 Callback for discovering Coordinated Set Identification Services. More...
 
typedef void(* bt_csis_client_lock_set_cb) (int err)
 Callback for locking a set across one or more devices. More...
 
typedef void(* bt_csis_client_lock_changed_cb) (struct bt_csis_client_csis_inst *inst, bool locked)
 Callback when the lock value on a set of a connected device changes. More...
 
typedef void(* bt_csis_client_lock_state_read_cb) (const struct bt_csis_client_set_info *set_info, int err, bool locked)
 Callback for bt_csis_client_get_lock_state() More...
 

Functions

void * bt_csis_svc_decl_get (const struct bt_csis *csis)
 Get the service declaration attribute. More...
 
int bt_csis_register (const struct bt_csis_register_param *param, struct bt_csis **csis)
 Register a Coordinated Set Identification Service instance. More...
 
void bt_csis_print_sirk (const struct bt_csis *csis)
 Print the SIRK to the debug output. More...
 
int bt_csis_advertise (struct bt_csis *csis, bool enable)
 Starts advertising the Resolvable Set Identifier value. More...
 
int bt_csis_lock (struct bt_csis *csis, bool lock, bool force)
 Locks a specific Coordinated Set Identification Service instance on the server. More...
 
int bt_csis_client_discover (struct bt_csis_client_set_member *member)
 Initialise the csis_client instance for a connection. This will do a discovery on the device and prepare the instance for following commands. More...
 
bool bt_csis_client_is_set_member (uint8_t set_sirk[16], struct bt_data *data)
 Check if advertising data indicates a set member. More...
 
void bt_csis_client_register_cb (struct bt_csis_client_cb *cb)
 Registers callbacks for csis_client. More...
 
int bt_csis_client_get_lock_state (const struct bt_csis_client_set_member **members, uint8_t count, const struct bt_csis_client_set_info *set_info)
 Check if an array of set members are unlocked. More...
 
int bt_csis_client_lock (const struct bt_csis_client_set_member **members, uint8_t count, const struct bt_csis_client_set_info *set_info)
 Lock an array of set members. More...
 
int bt_csis_client_release (const struct bt_csis_client_set_member **members, uint8_t count, const struct bt_csis_client_set_info *set_info)
 Release an array of set members. More...