nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
lbs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef BT_LBS_H_
8#define BT_LBS_H_
9
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <zephyr/types.h>
21
23#define BT_UUID_LBS_VAL \
24 BT_UUID_128_ENCODE(0x00001523, 0x1212, 0xefde, 0x1523, 0x785feabcd123)
25
27#define BT_UUID_LBS_BUTTON_VAL \
28 BT_UUID_128_ENCODE(0x00001524, 0x1212, 0xefde, 0x1523, 0x785feabcd123)
29
31#define BT_UUID_LBS_LED_VAL \
32 BT_UUID_128_ENCODE(0x00001525, 0x1212, 0xefde, 0x1523, 0x785feabcd123)
33
34
35#define BT_UUID_LBS BT_UUID_DECLARE_128(BT_UUID_LBS_VAL)
36#define BT_UUID_LBS_BUTTON BT_UUID_DECLARE_128(BT_UUID_LBS_BUTTON_VAL)
37#define BT_UUID_LBS_LED BT_UUID_DECLARE_128(BT_UUID_LBS_LED_VAL)
38
40typedef void (*led_cb_t)(const bool led_state);
41
43typedef bool (*button_cb_t)(void);
44
46struct bt_lbs_cb {
51};
52
70int bt_lbs_init(struct bt_lbs_cb *callbacks);
71
82int bt_lbs_send_button_state(bool button_state);
83
84#ifdef __cplusplus
85}
86#endif
87
92#endif /* BT_LBS_H_ */
led_state
Asset Tracker led states in the application.
Definition: led_state_event.h:21
int bt_lbs_send_button_state(bool button_state)
Send the button state.
bool(* button_cb_t)(void)
Callback type for when the button state is pulled.
Definition: lbs.h:43
void(* led_cb_t)(const bool led_state)
Callback type for when an LED state change is received.
Definition: lbs.h:40
int bt_lbs_init(struct bt_lbs_cb *callbacks)
Initialize the LBS Service.
button_cb_t button_cb
Definition: lbs.h:50
led_cb_t led_cb
Definition: lbs.h:48
Callback struct used by the LBS Service.
Definition: lbs.h:46