nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
gen_battery.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_GEN_BATTERY_H__
15#define BT_MESH_GEN_BATTERY_H__
16
17#include <zephyr/bluetooth/mesh.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24#define BT_MESH_BATTERY_LVL_UNKNOWN 0xff
25
27#define BT_MESH_BATTERY_TIME_MAX 0xfffffe
29#define BT_MESH_BATTERY_TIME_UNKNOWN 0xffffff
30
41};
42
53};
54
65};
66
77};
78
84 uint8_t battery_lvl;
97};
98
100#define BT_MESH_BATTERY_OP_GET BT_MESH_MODEL_OP_2(0x82, 0x23)
101#define BT_MESH_BATTERY_OP_STATUS BT_MESH_MODEL_OP_2(0x82, 0x24)
102
103#define BT_MESH_BATTERY_MSG_LEN_GET 0
104#define BT_MESH_BATTERY_MSG_LEN_STATUS 8
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* BT_MESH_GEN_BATTERY_H__ */
112
bt_mesh_battery_presence
Definition: gen_battery.h:32
@ BT_MESH_BATTERY_PRESENCE_NOT_PRESENT
Definition: gen_battery.h:34
@ BT_MESH_BATTERY_PRESENCE_PRESENT_REMOVABLE
Definition: gen_battery.h:36
@ BT_MESH_BATTERY_PRESENCE_UNKNOWN
Definition: gen_battery.h:40
@ BT_MESH_BATTERY_PRESENCE_PRESENT_NOT_REMOVABLE
Definition: gen_battery.h:38
bt_mesh_battery_service
Definition: gen_battery.h:68
@ BT_MESH_BATTERY_SERVICE_INVALID
Definition: gen_battery.h:70
@ BT_MESH_BATTERY_SERVICE_REQUIRED
Definition: gen_battery.h:74
@ BT_MESH_BATTERY_SERVICE_UNKNOWN
Definition: gen_battery.h:76
@ BT_MESH_BATTERY_SERVICE_NOT_REQUIRED
Definition: gen_battery.h:72
bt_mesh_battery_indicator
Definition: gen_battery.h:44
@ BT_MESH_BATTERY_INDICATOR_CRITICALLY_LOW
Definition: gen_battery.h:46
@ BT_MESH_BATTERY_INDICATOR_GOOD
Definition: gen_battery.h:50
@ BT_MESH_BATTERY_INDICATOR_UNKNOWN
Definition: gen_battery.h:52
@ BT_MESH_BATTERY_INDICATOR_LOW
Definition: gen_battery.h:48
bt_mesh_battery_charging
Definition: gen_battery.h:56
@ BT_MESH_BATTERY_CHARGING_CHARGEABLE_NOT_CHARGING
Definition: gen_battery.h:60
@ BT_MESH_BATTERY_CHARGING_NOT_CHARGEABLE
Definition: gen_battery.h:58
@ BT_MESH_BATTERY_CHARGING_UNKNOWN
Definition: gen_battery.h:64
@ BT_MESH_BATTERY_CHARGING_CHARGEABLE_CHARGING
Definition: gen_battery.h:62
uint32_t charge_minutes
Definition: gen_battery.h:88
uint8_t battery_lvl
Definition: gen_battery.h:84
enum bt_mesh_battery_charging charging
Definition: gen_battery.h:94
enum bt_mesh_battery_presence presence
Definition: gen_battery.h:90
enum bt_mesh_battery_indicator indicator
Definition: gen_battery.h:92
enum bt_mesh_battery_service service
Definition: gen_battery.h:96
uint32_t discharge_minutes
Definition: gen_battery.h:86
Definition: gen_battery.h:79