Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
bt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef ZEPHYR_INCLUDE_NET_BT_H_
13#define ZEPHYR_INCLUDE_NET_BT_H_
14
15#include <net/net_mgmt.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/* Management part definitions */
22
23#define _NET_BT_LAYER NET_MGMT_LAYER_L2
24#define _NET_BT_CODE 0x155
25#define _NET_BT_BASE (NET_MGMT_IFACE_BIT | \
26 NET_MGMT_LAYER(_NET_BT_LAYER) | \
27 NET_MGMT_LAYER_CODE(_NET_BT_CODE))
28#define _NET_BT_EVENT (_NET_BT_BASE | NET_MGMT_EVENT_BIT)
29
35};
36
37#define NET_REQUEST_BT_ADVERTISE \
38 (_NET_BT_BASE | NET_REQUEST_BT_CMD_ADVERTISE)
39
41
42#define NET_REQUEST_BT_CONNECT \
43 (_NET_BT_BASE | NET_REQUEST_BT_CMD_CONNECT)
44
46
47#define NET_REQUEST_BT_SCAN \
48 (_NET_BT_BASE | NET_REQUEST_BT_CMD_SCAN)
49
51
54};
55
56#define NET_EVENT_BT_SCAN_RESULT \
57 (_NET_BT_EVENT | NET_EVENT_BT_CMD_SCAN_RESULT)
58
59#define NET_REQUEST_BT_DISCONNECT \
60 (_NET_BT_BASE | NET_REQUEST_BT_CMD_DISCONNECT)
61
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif /* ZEPHYR_INCLUDE_NET_BT_H_ */
net_event_bt_cmd
Definition: bt.h:52
@ NET_EVENT_BT_CMD_SCAN_RESULT
Definition: bt.h:53
#define NET_REQUEST_BT_ADVERTISE
Definition: bt.h:37
#define NET_REQUEST_BT_DISCONNECT
Definition: bt.h:59
#define NET_REQUEST_BT_SCAN
Definition: bt.h:47
#define NET_REQUEST_BT_CONNECT
Definition: bt.h:42
net_request_bt_cmd
Definition: bt.h:30
@ NET_REQUEST_BT_CMD_ADVERTISE
Definition: bt.h:31
@ NET_REQUEST_BT_CMD_CONNECT
Definition: bt.h:32
@ NET_REQUEST_BT_CMD_DISCONNECT
Definition: bt.h:34
@ NET_REQUEST_BT_CMD_SCAN
Definition: bt.h:33
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Definition: net_mgmt.h:95
Network Management API public header.