zephyr/include/net/bt.h
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00

55 lines
1.2 KiB
C

/*
* Copyright (c) 2017 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Bluetooth L2 stack public header
*/
#ifndef __BT_H__
#define __BT_H__
#include <net/net_mgmt.h>
/* Management part definitions */
#define _NET_BT_LAYER NET_MGMT_LAYER_L2
#define _NET_BT_CODE 0x155
#define _NET_BT_BASE (NET_MGMT_IFACE_BIT | \
NET_MGMT_LAYER(_NET_BT_LAYER) | \
NET_MGMT_LAYER_CODE(_NET_BT_CODE))
#define _NET_BT_EVENT (_NET_BT_BASE | NET_MGMT_EVENT_BIT)
enum net_request_bt_cmd {
NET_REQUEST_BT_CMD_CONNECT = 1,
NET_REQUEST_BT_CMD_SCAN,
NET_REQUEST_BT_CMD_DISCONNECT,
};
#define NET_REQUEST_BT_CONNECT \
(_NET_BT_BASE | NET_REQUEST_BT_CMD_CONNECT)
NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_BT_CONNECT);
#define NET_REQUEST_BT_SCAN \
(_NET_BT_BASE | NET_REQUEST_BT_CMD_SCAN)
NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_BT_SCAN);
enum net_event_bt_cmd {
NET_EVENT_BT_CMD_SCAN_RESULT = 1,
};
#define NET_EVENT_BT_SCAN_RESULT \
(_NET_BT_EVENT | NET_EVENT_BT_CMD_SCAN_RESULT)
#define NET_REQUEST_BT_DISCONNECT \
(_NET_BT_BASE | NET_REQUEST_BT_CMD_DISCONNECT)
NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_BT_DISCONNECT);
#endif /* __BT_H__ */