1 /* Bluetooth Mesh */ 2 3 /* 4 * Copyright (c) 2017 Intel Corporation 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 #ifndef __MESH_PRIV_H 9 #define __MESH_PRIV_H 10 11 #define BT_MESH_KEY_PRIMARY 0x0000 12 #define BT_MESH_KEY_ANY 0xffff 13 14 #define BT_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000) 15 #define BT_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) <= 0xff00) 16 #define BT_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000) 17 #define BT_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfffb) 18 struct bt_mesh_net; 19 20 #define OP_GEN_ONOFF_GET BT_MESH_MODEL_OP_2(0x82, 0x01) 21 #define OP_GEN_ONOFF_SET BT_MESH_MODEL_OP_2(0x82, 0x02) 22 #define OP_GEN_ONOFF_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x03) 23 #define OP_GEN_ONOFF_STATUS BT_MESH_MODEL_OP_2(0x82, 0x04) 24 #define OP_GEN_LEVEL_GET BT_MESH_MODEL_OP_2(0x82, 0x05) 25 #define OP_GEN_LEVEL_SET BT_MESH_MODEL_OP_2(0x82, 0x06) 26 #define OP_GEN_LEVEL_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x07) 27 #define OP_GEN_LEVEL_STATUS BT_MESH_MODEL_OP_2(0x82, 0x08) 28 #define OP_GEN_DELTA_SET BT_MESH_MODEL_OP_2(0x82, 0x09) 29 #define OP_GEN_DELTA_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0a) 30 #define OP_GEN_MOVE_SET BT_MESH_MODEL_OP_2(0x82, 0x0b) 31 #define OP_GEN_MOVE_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0c) 32 #define OP_LIGHT_LIGHTNESS_GET BT_MESH_MODEL_OP_2(0x82, 0x4b) 33 #define OP_LIGHT_LIGHTNESS_SET BT_MESH_MODEL_OP_2(0x82, 0x4c) 34 #define OP_LIGHT_LIGHTNESS_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x4d) 35 36 bool bt_mesh_is_provisioned(void); 37 38 #endif 39