ble_mesh: Clean up included header files

This commit is contained in:
lly
2020-01-08 13:58:36 +08:00
committed by baohongde
parent db3fa3a100
commit 787ee04a5d
108 changed files with 128 additions and 535 deletions

View File

@@ -17,9 +17,7 @@
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "osi/alarm.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -13,9 +13,7 @@
// limitations under the License. // limitations under the License.
#include <stdint.h> #include <stdint.h>
#include <errno.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -14,7 +14,7 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h" #include "btc/btc_manage.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -13,9 +13,8 @@
// limitations under the License. // limitations under the License.
#include <stdint.h> #include <stdint.h>
#include <errno.h> #include <string.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -13,8 +13,8 @@
// limitations under the License. // limitations under the License.
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -13,8 +13,8 @@
// limitations under the License. // limitations under the License.
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "esp_err.h" #include "esp_err.h"

View File

@@ -17,17 +17,9 @@
#include <stdint.h> #include <stdint.h>
#include "mesh_proxy.h"
#include "mesh_access.h"
#include "mesh_main.h"
#include "mesh.h"
#include "proxy_server.h"
#include "foundation.h"
#include "provisioner_main.h"
#include "model_opcode.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "proxy_server.h"
#include "provisioner_main.h"
#ifdef CONFIG_BLUEDROID_ENABLED #ifdef CONFIG_BLUEDROID_ENABLED
#include "esp_bt_defs.h" #include "esp_bt_defs.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_config_model.h" #include "btc_ble_mesh_config_model.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_generic_model.h" #include "btc_ble_mesh_generic_model.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_health_model.h" #include "btc_ble_mesh_health_model.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_lighting_model.h" #include "btc_ble_mesh_lighting_model.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_sensor_model.h" #include "btc_ble_mesh_sensor_model.h"

View File

@@ -14,7 +14,6 @@
#include <stdint.h> #include <stdint.h>
#include "btc/btc_task.h"
#include "btc/btc_manage.h" #include "btc/btc_manage.h"
#include "btc_ble_mesh_time_scene_model.h" #include "btc_ble_mesh_time_scene_model.h"

View File

@@ -15,11 +15,10 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "foundation.h"
#include "osi/allocator.h"
#include "cfg_cli.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "cfg_cli.h"
#include "btc_ble_mesh_config_model.h" #include "btc_ble_mesh_config_model.h"
#include "esp_ble_mesh_config_model_api.h" #include "esp_ble_mesh_config_model_api.h"

View File

@@ -15,10 +15,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "mesh_common.h"
#include "osi/allocator.h"
#include "generic_client.h" #include "generic_client.h"
#include "btc_ble_mesh_generic_model.h" #include "btc_ble_mesh_generic_model.h"
#include "esp_ble_mesh_generic_model_api.h" #include "esp_ble_mesh_generic_model_api.h"

View File

@@ -15,13 +15,10 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "foundation.h"
#include "btc/btc_task.h" #include "mesh_common.h"
#include "osi/allocator.h"
#include "health_srv.h" #include "health_srv.h"
#include "health_cli.h" #include "health_cli.h"
#include "mesh_common.h"
#include "btc_ble_mesh_health_model.h" #include "btc_ble_mesh_health_model.h"
#include "esp_ble_mesh_defs.h" #include "esp_ble_mesh_defs.h"

View File

@@ -15,10 +15,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "mesh_common.h"
#include "osi/allocator.h"
#include "lighting_client.h" #include "lighting_client.h"
#include "btc_ble_mesh_lighting_model.h" #include "btc_ble_mesh_lighting_model.h"
#include "esp_ble_mesh_lighting_model_api.h" #include "esp_ble_mesh_lighting_model_api.h"

View File

@@ -16,33 +16,21 @@
#include <errno.h> #include <errno.h>
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "btc/btc_manage.h"
#include "osi/allocator.h"
#include "sdkconfig.h"
#include "mesh_util.h"
#include "mesh_main.h"
#include "mesh_access.h"
#include "mesh_proxy.h" #include "mesh_proxy.h"
#include "cfg_cli.h"
#include "health_cli.h"
#include "cfg_srv.h"
#include "health_srv.h"
#include "mesh.h" #include "mesh.h"
#include "access.h" #include "access.h"
#include "transport.h"
#include "proxy_server.h"
#include "prov.h" #include "prov.h"
#include "proxy_server.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#include "cfg_cli.h"
#include "health_cli.h"
#include "cfg_srv.h"
#include "health_srv.h"
#include "generic_client.h" #include "generic_client.h"
#include "lighting_client.h" #include "lighting_client.h"
#include "sensor_client.h" #include "sensor_client.h"

View File

@@ -15,10 +15,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "mesh_common.h"
#include "osi/allocator.h"
#include "sensor_client.h" #include "sensor_client.h"
#include "btc_ble_mesh_sensor_model.h" #include "btc_ble_mesh_sensor_model.h"
#include "esp_ble_mesh_sensor_model_api.h" #include "esp_ble_mesh_sensor_model_api.h"

View File

@@ -15,10 +15,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "btc/btc_manage.h" #include "mesh_common.h"
#include "osi/allocator.h"
#include "time_scene_client.h" #include "time_scene_client.h"
#include "btc_ble_mesh_time_scene_model.h" #include "btc_ble_mesh_time_scene_model.h"
#include "esp_ble_mesh_time_scene_model_api.h" #include "esp_ble_mesh_time_scene_model_api.h"

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_CONFIG_MODEL_H_ #ifndef _BTC_BLE_MESH_CONFIG_MODEL_H_
#define _BTC_BLE_MESH_CONFIG_MODEL_H_ #define _BTC_BLE_MESH_CONFIG_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_config_model_api.h" #include "esp_ble_mesh_config_model_api.h"
typedef enum { typedef enum {

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_GENERIC_MODEL_H_ #ifndef _BTC_BLE_MESH_GENERIC_MODEL_H_
#define _BTC_BLE_MESH_GENERIC_MODEL_H_ #define _BTC_BLE_MESH_GENERIC_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_generic_model_api.h" #include "esp_ble_mesh_generic_model_api.h"
typedef enum { typedef enum {

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_HEALTH_MODEL_H_ #ifndef _BTC_BLE_MESH_HEALTH_MODEL_H_
#define _BTC_BLE_MESH_HEALTH_MODEL_H_ #define _BTC_BLE_MESH_HEALTH_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_health_model_api.h" #include "esp_ble_mesh_health_model_api.h"
typedef enum { typedef enum {

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_LIGHTING_MODEL_H_ #ifndef _BTC_BLE_MESH_LIGHTING_MODEL_H_
#define _BTC_BLE_MESH_LIGHTING_MODEL_H_ #define _BTC_BLE_MESH_LIGHTING_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_lighting_model_api.h" #include "esp_ble_mesh_lighting_model_api.h"
typedef enum { typedef enum {

View File

@@ -15,15 +15,7 @@
#ifndef _BTC_BLE_MESH_PROV_H_ #ifndef _BTC_BLE_MESH_PROV_H_
#define _BTC_BLE_MESH_PROV_H_ #define _BTC_BLE_MESH_PROV_H_
#include "freertos/FreeRTOS.h" #include "btc/btc_manage.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
#include "btc/btc_task.h"
#include "mesh_access.h"
#include "mesh_buf.h"
#include "mesh_main.h" #include "mesh_main.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "esp_ble_mesh_defs.h" #include "esp_ble_mesh_defs.h"

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_SENSOR_MODEL_H_ #ifndef _BTC_BLE_MESH_SENSOR_MODEL_H_
#define _BTC_BLE_MESH_SENSOR_MODEL_H_ #define _BTC_BLE_MESH_SENSOR_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_sensor_model_api.h" #include "esp_ble_mesh_sensor_model_api.h"
typedef enum { typedef enum {

View File

@@ -15,8 +15,7 @@
#ifndef _BTC_BLE_MESH_TIME_SCENE_MODEL_H_ #ifndef _BTC_BLE_MESH_TIME_SCENE_MODEL_H_
#define _BTC_BLE_MESH_TIME_SCENE_MODEL_H_ #define _BTC_BLE_MESH_TIME_SCENE_MODEL_H_
#include <stdint.h> #include "btc/btc_manage.h"
#include "btc/btc_task.h"
#include "esp_ble_mesh_time_scene_model_api.h" #include "esp_ble_mesh_time_scene_model_api.h"
typedef enum { typedef enum {

View File

@@ -11,12 +11,7 @@
#ifndef _BLE_MESH_BUF_H_ #ifndef _BLE_MESH_BUF_H_
#define _BLE_MESH_BUF_H_ #define _BLE_MESH_BUF_H_
#include <stddef.h>
#include "sys/cdefs.h"
#include "mesh_types.h"
#include "mesh_slist.h" #include "mesh_slist.h"
#include "mesh_kernel.h"
#include "mesh_util.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -16,14 +16,10 @@
* @brief Bluetooth Mesh Model Common APIs. * @brief Bluetooth Mesh Model Common APIs.
*/ */
#ifndef _MESH_COMMON_H_ #ifndef _BLE_MESH_COMMON_H_
#define _MESH_COMMON_H_ #define _BLE_MESH_COMMON_H_
#include "osi/allocator.h" #include "osi/allocator.h"
#include "mesh_types.h"
#include "mesh_buf.h"
#include "mesh_trace.h"
#include "mesh_access.h" #include "mesh_access.h"
/** /**
@@ -58,4 +54,4 @@ void bt_mesh_free_buf(struct net_buf_simple *buf);
*/ */
u8_t bt_mesh_get_device_role(struct bt_mesh_model *model, bool srv_send); u8_t bt_mesh_get_device_role(struct bt_mesh_model *model, bool srv_send);
#endif /* _MESH_COMMON_H_ */ #endif /* _BLE_MESH_COMMON_H_ */

View File

@@ -12,7 +12,6 @@
#include "mesh_types.h" #include "mesh_types.h"
#include "mesh_slist.h" #include "mesh_slist.h"
#include "mesh_atomic.h" #include "mesh_atomic.h"
#include "mesh_dlist.h"
/* number of nsec per usec */ /* number of nsec per usec */
#define NSEC_PER_USEC 1000 #define NSEC_PER_USEC 1000
@@ -47,8 +46,6 @@ struct k_work;
*/ */
typedef void (*k_work_handler_t)(struct k_work *work); typedef void (*k_work_handler_t)(struct k_work *work);
typedef sys_dlist_t _wait_q_t;
struct k_work { struct k_work {
void *_reserved; void *_reserved;
k_work_handler_t handler; k_work_handler_t handler;

View File

@@ -10,7 +10,6 @@
#define _BLE_MESH_TRACE_H_ #define _BLE_MESH_TRACE_H_
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h"
/* Define common tracing for all */ /* Define common tracing for all */
#ifndef LOG_LEVEL_ERROR #ifndef LOG_LEVEL_ERROR

View File

@@ -15,9 +15,9 @@
#define _BLE_MESH_UTIL_H_ #define _BLE_MESH_UTIL_H_
#include <stddef.h> #include <stddef.h>
#include "soc/soc.h"
#include "mesh_types.h" #include "mesh_types.h"
#include "mesh_trace.h" #include "mesh_trace.h"
#include "soc/soc.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -30,9 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "mesh_aes_encrypt.h"
#include "mesh_util.h" #include "mesh_util.h"
#include "sdkconfig.h" #include "mesh_aes_encrypt.h"
/* max number of calls until change the key (2^48).*/ /* max number of calls until change the key (2^48).*/
const static uint64_t MAX_CALLS = ((uint64_t)1 << 48); const static uint64_t MAX_CALLS = ((uint64_t)1 << 48);

View File

@@ -20,7 +20,6 @@
#include "mesh_atomic.h" #include "mesh_atomic.h"
#include "mesh_kernel.h" #include "mesh_kernel.h"
#include "sdkconfig.h"
#ifndef CONFIG_ATOMIC_OPERATIONS_BUILTIN #ifndef CONFIG_ATOMIC_OPERATIONS_BUILTIN

View File

@@ -7,10 +7,9 @@
#include <string.h> #include <string.h>
#include "sdkconfig.h"
#include "mesh_buf.h" #include "mesh_buf.h"
#include "mesh_trace.h" #include "mesh_trace.h"
#include "mesh_kernel.h"
int net_buf_id(struct net_buf *buf) int net_buf_id(struct net_buf *buf)
{ {

View File

@@ -8,17 +8,12 @@
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "osi/hash_map.h" #include "osi/hash_map.h"
#include "osi/alarm.h" #include "osi/alarm.h"
#include "osi/hash_functions.h" #include "osi/hash_functions.h"
#include "esp_timer.h"
#include "mesh_kernel.h" #include "mesh_kernel.h"
#include "mesh_trace.h" #include "mesh_trace.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
static osi_mutex_t bm_alarm_lock; static osi_mutex_t bm_alarm_lock;

View File

@@ -7,9 +7,9 @@
*/ */
#include <string.h> #include <string.h>
#include "sdkconfig.h"
#include "mesh_types.h"
#include "mesh_util.h" #include "mesh_util.h"
#include "mesh_kernel.h"
#include "mesh_aes_encrypt.h" #include "mesh_aes_encrypt.h"
#define MASK_TWENTY_SEVEN 0x1b #define MASK_TWENTY_SEVEN 0x1b

View File

@@ -10,23 +10,14 @@
#include <stdbool.h> #include <stdbool.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_ACCESS) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_ACCESS)
#include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_trace.h"
#include "mesh_kernel.h"
#include "mesh_access.h"
#include "mesh_main.h"
#include "mesh.h" #include "mesh.h"
#include "adv.h" #include "adv.h"
#include "net.h"
#include "lpn.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "mesh_main.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "provisioner_main.h" #include "provisioner_main.h"

View File

@@ -9,8 +9,6 @@
#ifndef _ACCESS_H_ #ifndef _ACCESS_H_
#define _ACCESS_H_ #define _ACCESS_H_
#include "mesh_access.h"
#include "mesh_buf.h"
#include "net.h" #include "net.h"
/* bt_mesh_model.flags */ /* bt_mesh_model.flags */

View File

@@ -8,6 +8,7 @@
*/ */
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include <errno.h> #include <errno.h>
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
@@ -15,24 +16,18 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "osi/thread.h" #include "osi/thread.h"
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_ADV)
#include "mesh_util.h" #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_ADV)
#include "mesh_buf.h"
#include "mesh_bearer_adapt.h"
#include "mesh_trace.h"
#include "mesh_hci.h"
#include "mesh.h" #include "mesh.h"
#include "adv.h" #include "adv.h"
#include "net.h"
#include "foundation.h"
#include "beacon.h" #include "beacon.h"
#include "prov.h" #include "prov.h"
#include "foundation.h"
#include "proxy_server.h" #include "proxy_server.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "mesh_bearer_adapt.h"
/* Convert from ms to 0.625ms units */ /* Convert from ms to 0.625ms units */
#define ADV_SCAN_UNIT(_ms) ((_ms) * 8 / 5) #define ADV_SCAN_UNIT(_ms) ((_ms) * 8 / 5)

View File

@@ -10,6 +10,7 @@
#ifndef _ADV_H_ #ifndef _ADV_H_
#define _ADV_H_ #define _ADV_H_
#include "mesh_access.h"
#include "mesh_bearer_adapt.h" #include "mesh_bearer_adapt.h"
/* Maximum advertising data payload for a single data type */ /* Maximum advertising data payload for a single data type */

View File

@@ -10,23 +10,17 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_BEACON) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_BEACON)
#include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "prov.h" #include "prov.h"
#include "crypto.h" #include "crypto.h"
#include "beacon.h" #include "beacon.h"
#include "access.h"
#include "foundation.h" #include "foundation.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "access.h" #include "mesh_main.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"

View File

@@ -9,6 +9,8 @@
#ifndef _BEACON_H_ #ifndef _BEACON_H_
#define _BEACON_H_ #define _BEACON_H_
#include "net.h"
void bt_mesh_beacon_enable(void); void bt_mesh_beacon_enable(void);
void bt_mesh_beacon_disable(void); void bt_mesh_beacon_disable(void);

View File

@@ -6,19 +6,16 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "bta/bta_api.h" #include "bta/bta_api.h"
#include "bta/bta_gatt_api.h" #include "bta/bta_gatt_api.h"
#include "bta/bta_gatt_common.h" #include "bta/bta_gatt_common.h"
#include "bta_gattc_int.h" #include "bta_gattc_int.h"
#include "stack/btm_ble_api.h" #include "stack/btm_ble_api.h"
#include "p_256_ecc_pp.h" #include "p_256_ecc_pp.h"
#include "stack/hcimsgs.h"
#include "osi/future.h" #include "osi/future.h"
#include "osi/allocator.h"
#include "device/controller.h" #include "device/controller.h"
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
@@ -26,12 +23,8 @@
#include "mesh_hci.h" #include "mesh_hci.h"
#include "mesh_aes_encrypt.h" #include "mesh_aes_encrypt.h"
#include "mesh_bearer_adapt.h" #include "mesh_bearer_adapt.h"
#include "mesh_trace.h"
#include "mesh_buf.h"
#include "mesh_atomic.h"
#include "provisioner_prov.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "provisioner_prov.h"
struct bt_mesh_dev bt_mesh_dev; struct bt_mesh_dev bt_mesh_dev;
@@ -104,14 +97,14 @@ static struct bt_mesh_prov_conn_cb *bt_mesh_gattc_conn_cb;
static tBTA_GATTC_IF bt_mesh_gattc_if; static tBTA_GATTC_IF bt_mesh_gattc_if;
#endif #endif
esp_err_t bt_mesh_host_init(void) int bt_mesh_host_init(void)
{ {
return ESP_OK; return 0;
} }
esp_err_t bt_mesh_host_deinit(void) int bt_mesh_host_deinit(void)
{ {
return ESP_OK; return 0;
} }
void bt_mesh_hci_init(void) void bt_mesh_hci_init(void)

View File

@@ -11,20 +11,13 @@
#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "cfg_cli.h"
#include "mesh.h" #include "mesh.h"
#include "foundation.h" #include "foundation.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "cfg_cli.h"
#include "btc_ble_mesh_config_model.h" #include "btc_ble_mesh_config_model.h"
#define CID_NVAL 0xffff #define CID_NVAL 0xffff

View File

@@ -11,30 +11,23 @@
#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "cfg_srv.h"
#include "settings.h"
#include "mesh.h" #include "mesh.h"
#include "adv.h" #include "adv.h"
#include "net.h"
#include "lpn.h" #include "lpn.h"
#include "transport.h" #include "transport.h"
#include "crypto.h" #include "crypto.h"
#include "access.h" #include "access.h"
#include "beacon.h" #include "beacon.h"
#include "proxy_server.h"
#include "foundation.h" #include "foundation.h"
#include "friend.h" #include "friend.h"
#include "settings.h" #include "settings.h"
#include "cfg_srv.h"
#include "proxy_server.h"
#include "mesh_main.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "btc_ble_mesh_config_model.h" #include "btc_ble_mesh_config_model.h"
#define DEFAULT_TTL 7 #define DEFAULT_TTL 7

View File

@@ -11,18 +11,11 @@
#include <stdbool.h> #include <stdbool.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_CRYPTO) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_CRYPTO)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_trace.h"
#include "mesh_bearer_adapt.h"
#include "mesh_aes_encrypt.h"
#include "mesh.h"
#include "crypto.h" #include "crypto.h"
#include "mesh_aes_encrypt.h"
#include "mesh_bearer_adapt.h"
#define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4) #define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4)
#define APP_MIC_LEN(aszmic) ((aszmic) ? 8 : 4) #define APP_MIC_LEN(aszmic) ((aszmic) ? 8 : 4)

View File

@@ -10,8 +10,8 @@
#ifndef _CRYPTO_H_ #ifndef _CRYPTO_H_
#define _CRYPTO_H_ #define _CRYPTO_H_
#include "mesh_types.h"
#include <string.h> #include <string.h>
#include "mesh_buf.h"
struct bt_mesh_sg { struct bt_mesh_sg {
const void *data; const void *data;

View File

@@ -8,7 +8,6 @@
#ifndef _FOUNDATION_H_ #ifndef _FOUNDATION_H_
#define _FOUNDATION_H_ #define _FOUNDATION_H_
#include "mesh_access.h"
#include "net.h" #include "net.h"
#define OP_APP_KEY_ADD BLE_MESH_MODEL_OP_1(0x00) #define OP_APP_KEY_ADD BLE_MESH_MODEL_OP_1(0x00)

View File

@@ -10,23 +10,16 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_FRIEND) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_FRIEND)
#include "mesh_buf.h"
#include "mesh_util.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h"
#include "friend.h" #include "friend.h"
#include "client_common.h" #include "foundation.h"
#include "mesh_main.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#ifdef CONFIG_BLE_MESH_FRIEND #ifdef CONFIG_BLE_MESH_FRIEND

View File

@@ -9,6 +9,8 @@
#ifndef _FRIEND_H_ #ifndef _FRIEND_H_
#define _FRIEND_H_ #define _FRIEND_H_
#include "net.h"
enum bt_mesh_friend_pdu_type { enum bt_mesh_friend_pdu_type {
BLE_MESH_FRIEND_PDU_SINGLE, BLE_MESH_FRIEND_PDU_SINGLE,
BLE_MESH_FRIEND_PDU_PARTIAL, BLE_MESH_FRIEND_PDU_PARTIAL,

View File

@@ -9,20 +9,13 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_trace.h"
#include "health_cli.h"
#include "foundation.h" #include "foundation.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "health_cli.h"
#include "btc_ble_mesh_health_model.h" #include "btc_ble_mesh_health_model.h"
s32_t health_msg_timeout; s32_t health_msg_timeout;

View File

@@ -9,23 +9,13 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_MODEL)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_trace.h"
#include "health_srv.h"
#include "mesh.h"
#include "adv.h"
#include "net.h"
#include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "health_srv.h"
#include "btc_ble_mesh_health_model.h" #include "btc_ble_mesh_health_model.h"

View File

@@ -11,8 +11,6 @@
#ifndef _BLE_MESH_CFG_CLI_H_ #ifndef _BLE_MESH_CFG_CLI_H_
#define _BLE_MESH_CFG_CLI_H_ #define _BLE_MESH_CFG_CLI_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/** /**

View File

@@ -11,7 +11,6 @@
#define _BLE_MESH_CFG_SRV_H_ #define _BLE_MESH_CFG_SRV_H_
#include "mesh_access.h" #include "mesh_access.h"
#include "mesh_kernel.h"
/** /**
* @brief Bluetooth Mesh * @brief Bluetooth Mesh

View File

@@ -11,8 +11,6 @@
#ifndef _BLE_MESH_HEALTH_CLI_H_ #ifndef _BLE_MESH_HEALTH_CLI_H_
#define _BLE_MESH_HEALTH_CLI_H_ #define _BLE_MESH_HEALTH_CLI_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/** /**

View File

@@ -11,7 +11,6 @@
#define _BLE_MESH_HEALTH_SRV_H_ #define _BLE_MESH_HEALTH_SRV_H_
#include "mesh_access.h" #include "mesh_access.h"
#include "mesh_kernel.h"
/** /**
* @brief Bluetooth Mesh Health Server Model * @brief Bluetooth Mesh Health Server Model

View File

@@ -11,11 +11,10 @@
#ifndef _BLE_MESH_ACCESS_H_ #ifndef _BLE_MESH_ACCESS_H_
#define _BLE_MESH_ACCESS_H_ #define _BLE_MESH_ACCESS_H_
#include <stddef.h>
#include "mesh_types.h" #include "mesh_types.h"
#include "mesh_util.h" #include "mesh_util.h"
#include "mesh_buf.h" #include "mesh_buf.h"
#include "sdkconfig.h" #include "mesh_kernel.h"
/** /**
* @brief Bluetooth Mesh Access Layer * @brief Bluetooth Mesh Access Layer

View File

@@ -9,11 +9,11 @@
#ifndef _BLE_MESH_BEARER_ADRPT_H_ #ifndef _BLE_MESH_BEARER_ADRPT_H_
#define _BLE_MESH_BEARER_ADRPT_H_ #define _BLE_MESH_BEARER_ADRPT_H_
#include <string.h> #include <sys/types.h>
#include "mesh_types.h" #include "mesh_types.h"
#include "mesh_util.h" #include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_uuid.h" #include "mesh_uuid.h"
#include "mesh_buf.h"
/* BLE Mesh Max Connection Count */ /* BLE Mesh Max Connection Count */
#ifdef CONFIG_BLUEDROID_ENABLED #ifdef CONFIG_BLUEDROID_ENABLED
@@ -640,8 +640,8 @@ struct bt_mesh_gatt_attr {
.attr_count = ARRAY_SIZE(_attrs), \ .attr_count = ARRAY_SIZE(_attrs), \
} }
esp_err_t bt_mesh_host_init(void); int bt_mesh_host_init(void);
esp_err_t bt_mesh_host_deinit(void); int bt_mesh_host_deinit(void);
int bt_le_adv_start(const struct bt_mesh_adv_param *param, int bt_le_adv_start(const struct bt_mesh_adv_param *param,
const struct bt_mesh_adv_data *ad, size_t ad_len, const struct bt_mesh_adv_data *ad, size_t ad_len,

View File

@@ -7,9 +7,8 @@
#ifndef _BLE_MESH_HCI_H_ #ifndef _BLE_MESH_HCI_H_
#define _BLE_MESH_HCI_H_ #define _BLE_MESH_HCI_H_
#include "mesh_kernel.h"
#include "mesh_bearer_adapt.h"
#include "mesh_atomic.h" #include "mesh_atomic.h"
#include "mesh_bearer_adapt.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -11,7 +11,6 @@
#ifndef _BLE_MESH_MAIN_H_ #ifndef _BLE_MESH_MAIN_H_
#define _BLE_MESH_MAIN_H_ #define _BLE_MESH_MAIN_H_
#include "mesh_util.h"
#include "mesh_access.h" #include "mesh_access.h"
/** /**

View File

@@ -9,23 +9,17 @@
#include <stdint.h> #include <stdint.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_LOW_POWER) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_LOW_POWER)
#include "mesh_buf.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh_main.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "beacon.h" #include "beacon.h"
#include "foundation.h"
#include "lpn.h" #include "lpn.h"
#include "foundation.h"
#include "mesh_main.h"
#include "cfg_srv.h" #include "cfg_srv.h"
#ifdef CONFIG_BLE_MESH_LOW_POWER #ifdef CONFIG_BLE_MESH_LOW_POWER

View File

@@ -9,6 +9,8 @@
#ifndef _LPN_H_ #ifndef _LPN_H_
#define _LPN_H_ #define _LPN_H_
#include "net.h"
int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx, int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
struct net_buf_simple *buf); struct net_buf_simple *buf);
int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx, int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx,

View File

@@ -7,32 +7,25 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <stdbool.h>
#include <errno.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG)
#include "mesh_buf.h"
#include "mesh_trace.h"
#include "mesh_main.h"
#include "mesh_hci.h"
#include "adv.h" #include "adv.h"
#include "prov.h" #include "prov.h"
#include "net.h"
#include "beacon.h" #include "beacon.h"
#include "lpn.h" #include "lpn.h"
#include "friend.h" #include "friend.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "proxy_server.h"
#include "settings.h" #include "settings.h"
#include "mesh.h" #include "mesh.h"
#include "provisioner_prov.h" #include "mesh_hci.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "proxy_server.h"
#include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#define ACTION_ENTER 0x01 #define ACTION_ENTER 0x01

View File

@@ -9,6 +9,8 @@
#ifndef _MESH_H_ #ifndef _MESH_H_
#define _MESH_H_ #define _MESH_H_
#include "net.h"
#define BLE_MESH_KEY_PRIMARY 0x0000 #define BLE_MESH_KEY_PRIMARY 0x0000
#define BLE_MESH_KEY_ANY 0xffff #define BLE_MESH_KEY_ANY 0xffff

View File

@@ -11,30 +11,22 @@
#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_NET) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_NET)
#include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "mesh.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "lpn.h" #include "lpn.h"
#include "friend.h" #include "friend.h"
#include "proxy_server.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "beacon.h" #include "beacon.h"
#include "settings.h" #include "settings.h"
#include "prov.h" #include "prov.h"
#include "provisioner_main.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "proxy_server.h"
#include "provisioner_main.h"
/* Minimum valid Mesh Network PDU length. The Network headers /* Minimum valid Mesh Network PDU length. The Network headers
* themselves take up 9 bytes. After that there is a minumum of 1 byte * themselves take up 9 bytes. After that there is a minumum of 1 byte

View File

@@ -10,8 +10,6 @@
#ifndef _NET_H_ #ifndef _NET_H_
#define _NET_H_ #define _NET_H_
#include "mesh_util.h"
#include "mesh_kernel.h"
#include "mesh_access.h" #include "mesh_access.h"
#define BLE_MESH_NET_FLAG_KR BIT(0) #define BLE_MESH_NET_FLAG_KR BIT(0)

View File

@@ -8,11 +8,6 @@
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "btc/btc_task.h"
#include "osi/alarm.h"
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
#include "mbedtls/ecp.h" #include "mbedtls/ecp.h"
@@ -94,21 +89,21 @@ static BD_ADDR bt_mesh_gatts_addr;
#endif /* defined(CONFIG_BLE_MESH_NODE) && CONFIG_BLE_MESH_NODE */ #endif /* defined(CONFIG_BLE_MESH_NODE) && CONFIG_BLE_MESH_NODE */
esp_err_t bt_mesh_host_init(void) int bt_mesh_host_init(void)
{ {
int rc; int rc;
rc = btc_init(); rc = btc_init();
if (rc != 0) { if (rc != 0) {
return ESP_FAIL; return -1;
} }
rc = osi_alarm_create_mux(); rc = osi_alarm_create_mux();
if (rc != 0) { if (rc != 0) {
return ESP_FAIL; return -1;
} }
osi_alarm_init(); osi_alarm_init();
return ESP_OK; return 0;
} }
uint8_t ble_hs_hci_get_hci_version(void); uint8_t ble_hs_hci_get_hci_version(void);

View File

@@ -9,24 +9,15 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_PROV) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_PROV)
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "mesh_util.h"
#include "mesh_main.h"
#include "mesh_uuid.h"
#include "mesh_trace.h"
#include "mesh_proxy.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "mesh_common.h"
#include "mesh_proxy.h"
#include "proxy_server.h" #include "proxy_server.h"
#include "prov.h" #include "prov.h"

View File

@@ -10,7 +10,6 @@
#define _PROV_H_ #define _PROV_H_
#include "mesh_main.h" #include "mesh_main.h"
#include "mesh_buf.h"
#include "mesh_bearer_adapt.h" #include "mesh_bearer_adapt.h"
void bt_mesh_pb_adv_recv(struct net_buf_simple *buf); void bt_mesh_pb_adv_recv(struct net_buf_simple *buf);

View File

@@ -15,25 +15,15 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "mesh_util.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "mesh_bearer_adapt.h"
#include "mesh.h" #include "mesh.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "net.h"
#include "access.h" #include "access.h"
#include "settings.h" #include "settings.h"
#include "friend.h" #include "friend.h"
#include "mesh_common.h"
#include "provisioner_prov.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#if CONFIG_BLE_MESH_PROVISIONER #if CONFIG_BLE_MESH_PROVISIONER

View File

@@ -15,10 +15,8 @@
#ifndef _PROVISIONER_MAIN_H_ #ifndef _PROVISIONER_MAIN_H_
#define _PROVISIONER_MAIN_H_ #define _PROVISIONER_MAIN_H_
#include "mesh_util.h"
#include "mesh_kernel.h"
#include "mesh_access.h"
#include "net.h" #include "net.h"
#include "mesh_bearer_adapt.h"
#define BLE_MESH_INVALID_NODE_INDEX 0xFFFF #define BLE_MESH_INVALID_NODE_INDEX 0xFFFF
#define BLE_MESH_NODE_NAME_SIZE 31 #define BLE_MESH_NODE_NAME_SIZE 31

View File

@@ -15,19 +15,12 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "mesh_main.h"
#include "mesh_trace.h"
#include "mesh_bearer_adapt.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "access.h" #include "access.h"
#include "settings.h" #include "settings.h"
#include "mesh_common.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"

View File

@@ -15,8 +15,8 @@
#ifndef _PROVISIONER_PROV_H_ #ifndef _PROVISIONER_PROV_H_
#define _PROVISIONER_PROV_H_ #define _PROVISIONER_PROV_H_
#include "mesh_bearer_adapt.h"
#include "mesh_main.h" #include "mesh_main.h"
#include "mesh_bearer_adapt.h"
#if !CONFIG_BLE_MESH_PROVISIONER #if !CONFIG_BLE_MESH_PROVISIONER

View File

@@ -15,20 +15,15 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#include "mesh.h" #include "mesh.h"
#include "mesh_bearer_adapt.h"
#include "mesh_trace.h"
#include "mesh_common.h"
#include "net.h"
#include "access.h" #include "access.h"
#include "beacon.h" #include "beacon.h"
#include "mesh_common.h"
#include "foundation.h" #include "foundation.h"
#include "proxy_client.h" #include "proxy_client.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#include "mesh_bearer_adapt.h"
#define PDU_TYPE(data) (data[0] & BIT_MASK(6)) #define PDU_TYPE(data) (data[0] & BIT_MASK(6))
#define PDU_SAR(data) (data[0] >> 6) #define PDU_SAR(data) (data[0] >> 6)

View File

@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#ifndef _PROVISIONER_PROXY_H_ #ifndef _PROXY_CLIENT_H_
#define _PROVISIONER_PROXY_H_ #define _PROXY_CLIENT_H_
#include "mesh_buf.h"
#include "net.h" #include "net.h"
#include "mesh_bearer_adapt.h"
#define BLE_MESH_PROXY_ADV_NET_ID 0x00 #define BLE_MESH_PROXY_ADV_NET_ID 0x00
#define BLE_MESH_PROXY_ADV_NODE_ID 0x01 #define BLE_MESH_PROXY_ADV_NODE_ID 0x01
@@ -100,4 +100,4 @@ int bt_mesh_proxy_client_send_cfg(u8_t conn_handle, u16_t net_idx, struct bt_mes
int bt_mesh_proxy_prov_client_init(void); int bt_mesh_proxy_prov_client_init(void);
int bt_mesh_proxy_prov_client_deinit(void); int bt_mesh_proxy_prov_client_deinit(void);
#endif /* _PROVISIONER_PROXY_H_ */ #endif /* _PROXY_CLIENT_H_ */

View File

@@ -9,21 +9,14 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_PROXY) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_PROXY)
#include "mesh_buf.h"
#include "mesh_util.h"
#include "mesh_bearer_adapt.h"
#include "mesh_trace.h"
#include "mesh.h" #include "mesh.h"
#include "adv.h" #include "adv.h"
#include "net.h"
#include "prov.h" #include "prov.h"
#include "beacon.h" #include "beacon.h"
#include "foundation.h"
#include "access.h" #include "access.h"
#include "foundation.h"
#include "proxy_server.h" #include "proxy_server.h"
#if (CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_GATT) || \ #if (CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_GATT) || \

View File

@@ -11,7 +11,6 @@
#define _PROXY_H_ #define _PROXY_H_
#include "net.h" #include "net.h"
#include "mesh_buf.h"
#include "mesh_bearer_adapt.h" #include "mesh_bearer_adapt.h"
#define BLE_MESH_PROXY_NET_PDU 0x00 #define BLE_MESH_PROXY_NET_PDU 0x00

View File

@@ -6,30 +6,18 @@
*/ */
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_SETTINGS) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_SETTINGS)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_access.h"
#include "mesh_main.h"
#include "mesh_buf.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh_common.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "crypto.h" #include "crypto.h"
#include "transport.h" #include "transport.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "proxy_server.h" #include "proxy_server.h"
#include "cfg_srv.h" #include "cfg_srv.h"
#include "mesh_common.h"
#include "settings_nvs.h" #include "settings_nvs.h"
#include "provisioner_main.h" #include "provisioner_main.h"
#include "provisioner_prov.h" #include "provisioner_prov.h"

View File

@@ -7,11 +7,7 @@
#ifndef _SETTINGS_H_ #ifndef _SETTINGS_H_
#define _SETTINGS_H_ #define _SETTINGS_H_
#include "sdkconfig.h"
#include "net.h" #include "net.h"
#include "mesh_access.h"
#include "mesh_bearer_adapt.h"
#include "provisioner_main.h" #include "provisioner_main.h"
int settings_core_init(void); int settings_core_init(void);

View File

@@ -13,18 +13,12 @@
// limitations under the License. // limitations under the License.
#include <string.h> #include <string.h>
#include <stdio.h>
#include <stddef.h>
#include <errno.h> #include <errno.h>
#include "nvs.h" #include "nvs.h"
#include "nvs_flash.h" #include "nvs_flash.h"
#include "sdkconfig.h"
#include "mesh_util.h"
#include "mesh_types.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "settings_nvs.h" #include "settings_nvs.h"
#include "settings.h" #include "settings.h"

View File

@@ -15,8 +15,6 @@
#ifndef _BLE_MESH_SETTINGS_NVS_H_ #ifndef _BLE_MESH_SETTINGS_NVS_H_
#define _BLE_MESH_SETTINGS_NVS_H_ #define _BLE_MESH_SETTINGS_NVS_H_
#include <stdint.h>
#include "mesh_types.h"
#include "mesh_buf.h" #include "mesh_buf.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -10,16 +10,12 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "mesh_trace.h"
#include "mesh_main.h"
#include "mesh_access.h"
#include "mesh.h" #include "mesh.h"
#include "test.h" #include "test.h"
#include "crypto.h" #include "crypto.h"
#include "net.h"
#include "foundation.h"
#include "access.h" #include "access.h"
#include "foundation.h"
#include "mesh_main.h"
#if defined(CONFIG_BLE_MESH_SELF_TEST) #if defined(CONFIG_BLE_MESH_SELF_TEST)

View File

@@ -10,12 +10,7 @@
#ifndef _BLE_MESH_TEST_H_ #ifndef _BLE_MESH_TEST_H_
#define _BLE_MESH_TEST_H_ #define _BLE_MESH_TEST_H_
#include <stdbool.h> #include "mesh_types.h"
#include <errno.h>
#include <string.h>
#include "mesh_buf.h"
#include "sdkconfig.h"
#if defined(CONFIG_BLE_MESH_SELF_TEST) #if defined(CONFIG_BLE_MESH_SELF_TEST)
int bt_mesh_test(void); int bt_mesh_test(void);

View File

@@ -7,31 +7,22 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <errno.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include "sdkconfig.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_TRANS) #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLE_MESH_DEBUG_TRANS)
#include "mesh_types.h"
#include "mesh_util.h"
#include "mesh_buf.h"
#include "mesh_trace.h"
#include "mesh_main.h"
#include "settings.h"
#include "crypto.h" #include "crypto.h"
#include "adv.h" #include "adv.h"
#include "mesh.h" #include "mesh.h"
#include "net.h"
#include "lpn.h" #include "lpn.h"
#include "friend.h" #include "friend.h"
#include "access.h" #include "access.h"
#include "foundation.h" #include "foundation.h"
#include "settings.h" #include "settings.h"
#include "transport.h" #include "transport.h"
#include "mesh_main.h"
#include "mesh_common.h" #include "mesh_common.h"
#include "client_common.h"
#include "cfg_srv.h" #include "cfg_srv.h"
/* The transport layer needs at least three buffers for itself to avoid /* The transport layer needs at least three buffers for itself to avoid

View File

@@ -10,6 +10,8 @@
#ifndef _TRANSPORT_H_ #ifndef _TRANSPORT_H_
#define _TRANSPORT_H_ #define _TRANSPORT_H_
#include "net.h"
#define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff #define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff
#define BLE_MESH_TX_SDU_MAX (CONFIG_BLE_MESH_TX_SEG_MAX * 12) #define BLE_MESH_TX_SDU_MAX (CONFIG_BLE_MESH_TX_SEG_MAX * 12)

View File

@@ -15,16 +15,10 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "mesh_access.h"
#include "mesh_buf.h"
#include "mesh_slist.h"
#include "mesh_main.h"
#include "mesh.h" #include "mesh.h"
#include "mesh_main.h"
#include "client_common.h" #include "client_common.h"
#include "mesh_common.h"
static bt_mesh_client_node_t *bt_mesh_client_pick_node(sys_slist_t *list, u16_t tx_dst) static bt_mesh_client_node_t *bt_mesh_client_pick_node(sys_slist_t *list, u16_t tx_dst)
{ {

View File

@@ -14,19 +14,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#include "mesh_types.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh.h"
#include "model_opcode.h" #include "model_opcode.h"
#include "mesh_common.h"
#include "generic_client.h" #include "generic_client.h"
#include "btc_ble_mesh_generic_model.h" #include "btc_ble_mesh_generic_model.h"

View File

@@ -19,9 +19,6 @@
#ifndef _GENERIC_CLIENT_H_ #ifndef _GENERIC_CLIENT_H_
#define _GENERIC_CLIENT_H_ #define _GENERIC_CLIENT_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/* Generic client model common structure */ /* Generic client model common structure */

View File

@@ -19,9 +19,6 @@
#ifndef _LIGHTING_CLIENT_H_ #ifndef _LIGHTING_CLIENT_H_
#define _LIGHTING_CLIENT_H_ #define _LIGHTING_CLIENT_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/* Light client model common structure */ /* Light client model common structure */

View File

@@ -19,9 +19,6 @@
#ifndef _SENSOR_CLIENT_H_ #ifndef _SENSOR_CLIENT_H_
#define _SENSOR_CLIENT_H_ #define _SENSOR_CLIENT_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/* Sensor Client Model Context */ /* Sensor Client Model Context */

View File

@@ -19,9 +19,6 @@
#ifndef _TIME_SCENE_CLIENT_H_ #ifndef _TIME_SCENE_CLIENT_H_
#define _TIME_SCENE_CLIENT_H_ #define _TIME_SCENE_CLIENT_H_
#include "mesh_access.h"
#include "mesh_kernel.h"
#include "client_common.h" #include "client_common.h"
/* Time scene client model common structure */ /* Time scene client model common structure */

View File

@@ -14,19 +14,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#include "mesh_types.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh.h"
#include "model_opcode.h" #include "model_opcode.h"
#include "mesh_common.h"
#include "lighting_client.h" #include "lighting_client.h"
#include "btc_ble_mesh_lighting_model.h" #include "btc_ble_mesh_lighting_model.h"

View File

@@ -14,19 +14,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#include "mesh_types.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh.h"
#include "model_opcode.h" #include "model_opcode.h"
#include "mesh_common.h"
#include "sensor_client.h" #include "sensor_client.h"
#include "btc_ble_mesh_sensor_model.h" #include "btc_ble_mesh_sensor_model.h"

View File

@@ -14,19 +14,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "sdkconfig.h"
#include "mesh_types.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh.h"
#include "model_opcode.h" #include "model_opcode.h"
#include "mesh_common.h"
#include "time_scene_client.h" #include "time_scene_client.h"
#include "btc_ble_mesh_time_scene_model.h" #include "btc_ble_mesh_time_scene_model.h"

View File

@@ -15,7 +15,7 @@
#ifndef _MODEL_OPCODE_H_ #ifndef _MODEL_OPCODE_H_
#define _MODEL_OPCODE_H_ #define _MODEL_OPCODE_H_
#include "mesh_main.h" #include "mesh_access.h"
/* Generic OnOff Message Opcode */ /* Generic OnOff Message Opcode */
#define BLE_MESH_MODEL_OP_GEN_ONOFF_GET BLE_MESH_MODEL_OP_2(0x82, 0x01) #define BLE_MESH_MODEL_OP_GEN_ONOFF_GET BLE_MESH_MODEL_OP_2(0x82, 0x01)

View File

@@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include <string.h>
#include <stdint.h>
#include "mesh_types.h"
#include "server_common.h" #include "server_common.h"
#include "device_property.h" #include "device_property.h"

View File

@@ -6,24 +6,11 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h> #include <errno.h>
#include "osi/mutex.h"
#include "mesh_types.h"
#include "mesh_kernel.h"
#include "mesh_trace.h"
#include "mesh_common.h"
#include "mesh.h"
#include "access.h" #include "access.h"
#include "model_opcode.h"
#include "transport.h" #include "transport.h"
#include "model_opcode.h"
#include "server_common.h"
#include "state_binding.h"
#include "state_transition.h" #include "state_transition.h"
#include "device_property.h" #include "device_property.h"

View File

@@ -17,10 +17,7 @@
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include "mesh_buf.h"
#include "mesh_access.h" #include "mesh_access.h"
#include "mesh_kernel.h"
#define BLE_MESH_SERVER_RSP_MAX_LEN 384 #define BLE_MESH_SERVER_RSP_MAX_LEN 384

View File

@@ -9,6 +9,8 @@
#ifndef _STATE_BINDING_H_ #ifndef _STATE_BINDING_H_
#define _STATE_BINDING_H_ #define _STATE_BINDING_H_
#include "mesh_access.h"
typedef enum { typedef enum {
GENERIC_ONOFF_STATE, GENERIC_ONOFF_STATE,
GENERIC_LEVEL_STATE, GENERIC_LEVEL_STATE,

Some files were not shown because too many files have changed in this diff Show More