Merge pull request #673 from andrzej-kaczmarek/nimble-fixing

nimble: Various fixes

X-Original-Commit: 8d65a27b9e147100b6bb35747de456640b130570
This commit is contained in:
Andrzej Kaczmarek
2017-11-23 09:17:03 +01:00
committed by GitHub
9 changed files with 15 additions and 20 deletions
-1
View File
@@ -49,7 +49,6 @@
#define u64_t uint64_t
#define s64_t int64_t
#define s32_t int32_t
typedef size_t ssize_t;
/** @brief Helper to declare elements of bt_data arrays
*
+1 -1
View File
@@ -16,7 +16,7 @@
#include "host/ble_hs_log.h"
#include "adv.h"
#include <mesh_priv.h>
#include "mesh_priv.h"
#include "net.h"
#include "prov.h"
#include "crypto.h"
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_ans_init: 300
ble_svc_ans_init: 303
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_gap_init: 300
ble_svc_gap_init: 301
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_gatt_init: 300
ble_svc_gatt_init: 302
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_ias_init: 300
ble_svc_ias_init: 303
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_lls_init: 300
ble_svc_lls_init: 303
+1 -1
View File
@@ -31,4 +31,4 @@ pkg.deps:
- net/nimble/host
pkg.init:
ble_svc_tps_init: 300
ble_svc_tps_init: 303
+8 -12
View File
@@ -22,7 +22,6 @@
#include <errno.h>
#include "bsp/bsp.h"
#include "os/os.h"
#include "mem/mem.h"
#include "nimble/nimble_opt.h"
#include "host/ble_hs_adv.h"
#include "host/ble_hs_hci.h"
@@ -172,7 +171,9 @@ struct ble_gap_snapshot {
void *cb_arg;
};
static void *ble_gap_update_entry_mem;
static os_membuf_t ble_gap_update_entry_mem[
OS_MEMPOOL_SIZE(BLE_GAP_MAX_UPDATE_ENTRIES,
sizeof (struct ble_gap_update_entry))];
static struct os_mempool ble_gap_update_entry_pool;
static struct ble_gap_update_entry_list ble_gap_update_entries;
@@ -4413,18 +4414,16 @@ ble_gap_init(void)
{
int rc;
free(ble_gap_update_entry_mem);
memset(&ble_gap_master, 0, sizeof ble_gap_master);
memset(ble_gap_slave, 0, sizeof ble_gap_slave);
SLIST_INIT(&ble_gap_update_entries);
rc = mem_malloc_mempool(&ble_gap_update_entry_pool,
BLE_GAP_MAX_UPDATE_ENTRIES,
sizeof (struct ble_gap_update_entry),
"ble_gap_update",
&ble_gap_update_entry_mem);
rc = os_mempool_init(&ble_gap_update_entry_pool,
BLE_GAP_MAX_UPDATE_ENTRIES,
sizeof (struct ble_gap_update_entry),
ble_gap_update_entry_mem,
"ble_gap_update");
switch (rc) {
case 0:
break;
@@ -4446,8 +4445,5 @@ ble_gap_init(void)
return 0;
err:
free(ble_gap_update_entry_mem);
ble_gap_update_entry_mem = NULL;
return rc;
}