Zephyr Project API  3.2.0
A Scalable Open Source RTOS
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
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
29
32
35};
36
38struct bt_ias_cb {
44 void (*no_alert)(void);
45
51 void (*mild_alert)(void);
52
58 void (*high_alert)(void);
59};
60
66
72#define BT_IAS_CB_DEFINE(_name) \
73 static const STRUCT_SECTION_ITERABLE(bt_ias_cb, _CONCAT(bt_ias_cb_, _name))
74
83 void (*discover)(struct bt_conn *conn, int err);
84};
85
93int bt_ias_client_alert_write(struct bt_conn *conn, enum bt_ias_alert_lvl);
94
101int bt_ias_discover(struct bt_conn *conn);
102
110
111#ifdef __cplusplus
112}
113#endif
114
119#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:26
int bt_ias_local_alert_stop(void)
Method for stopping alert locally.
@ BT_IAS_ALERT_LVL_MILD_ALERT
Definition: ias.h:31
@ BT_IAS_ALERT_LVL_NO_ALERT
Definition: ias.h:28
@ BT_IAS_ALERT_LVL_HIGH_ALERT
Definition: ias.h:34
Immediate Alert Service callback structure.
Definition: ias.h:38
void(* high_alert)(void)
Callback function for alert level value.
Definition: ias.h:58
void(* no_alert)(void)
Callback function to stop alert.
Definition: ias.h:44
void(* mild_alert)(void)
Callback function for alert level value.
Definition: ias.h:51
Definition: ias.h:75
void(* discover)(struct bt_conn *conn, int err)
Callback function for bt_ias_discover.
Definition: ias.h:83