Zephyr API 3.6.99
Loading...
Searching...
No Matches
ias.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Codecoup
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_IAS_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_IAS_H_
9
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
37
39struct bt_ias_cb {
45 void (*no_alert)(void);
46
52 void (*mild_alert)(void);
53
59 void (*high_alert)(void);
60};
61
67
73#define BT_IAS_CB_DEFINE(_name) \
74 static const STRUCT_SECTION_ITERABLE(bt_ias_cb, _CONCAT(bt_ias_cb_, _name))
75
84 void (*discover)(struct bt_conn *conn, int err);
85};
86
94int bt_ias_client_alert_write(struct bt_conn *conn, enum bt_ias_alert_lvl);
95
102int bt_ias_discover(struct bt_conn *conn);
103
111
112#ifdef __cplusplus
113}
114#endif
115
120#endif /* ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_IAS_H_ */
Bluetooth connection handling.
int bt_ias_client_alert_write(struct bt_conn *conn, enum bt_ias_alert_lvl)
Set alert level.
int bt_ias_discover(struct bt_conn *conn)
Discover Immediate Alert Service.
int bt_ias_client_cb_register(const struct bt_ias_client_cb *cb)
Register Immediate Alert Client callbacks.
bt_ias_alert_lvl
Definition ias.h:27
int bt_ias_local_alert_stop(void)
Method for stopping alert locally.
@ BT_IAS_ALERT_LVL_MILD_ALERT
Device shall alert.
Definition ias.h:32
@ BT_IAS_ALERT_LVL_NO_ALERT
No alerting should be done on device.
Definition ias.h:29
@ BT_IAS_ALERT_LVL_HIGH_ALERT
Device should alert in strongest possible way.
Definition ias.h:35
Immediate Alert Service callback structure.
Definition ias.h:39
void(* high_alert)(void)
Callback function for alert level value.
Definition ias.h:59
void(* no_alert)(void)
Callback function to stop alert.
Definition ias.h:45
void(* mild_alert)(void)
Callback function for alert level value.
Definition ias.h:52
Definition ias.h:76
void(* discover)(struct bt_conn *conn, int err)
Callback function for bt_ias_discover.
Definition ias.h:84