Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit fca27c0

Browse files
Jimmy Huanggrgustaf
authored andcommitted
[zephyr] Updated Zephyr to v1.11.0 (#1862)
Signed-off-by: Jimmy Huang <[email protected]>
1 parent 3d4a43c commit fca27c0

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

deps/zephyr

Submodule zephyr updated 3225 files

scripts/checkheaders

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ touch $SRCDIR/syscalls/sensor.h
3333
PASSCOUNT=0
3434
TOTAL=0
3535

36-
CFLAGS="-m32 -DCONFIG_X86 -DCONFIG_PREEMPT_ENABLED -DCONFIG_LOAPIC_BASE_ADDRESS=0xFEE00000 -DCONFIG_NET_RAW_MODE -I. -I$SRCDIR -I../deps/jerryscript/jerry-core -I../deps/jerryscript/jerry-core/include -I../deps/jerryscript/jerry-ext/include -I../deps/zephyr/include -I../deps/zephyr/arch/x86/include -I../deps/iotivity-constrained/include -I../deps/iotivity-constrained -include../deps/iotivity-constrained/port/zephyr/src/config.h -I../deps/zephyr/tests/ztest/include"
36+
CFLAGS="-m32 -DCONFIG_X86 -DCONFIG_PREEMPT_ENABLED -DCONFIG_LOAPIC_BASE_ADDRESS=0xFEE00000 -DCONFIG_NET_RAW_MODE -DCONFIG_NET_BUF_USER_DATA_SIZE=4 -I. -I$SRCDIR -I../deps/jerryscript/jerry-core -I../deps/jerryscript/jerry-core/include -I../deps/jerryscript/jerry-ext/include -I../deps/zephyr/include -I../deps/zephyr/arch/x86/include -I../deps/iotivity-constrained/include -I../deps/iotivity-constrained -include../deps/iotivity-constrained/port/zephyr/src/config.h -I../deps/zephyr/tests/ztest/include"
3737

3838
FAILURES=
3939

src/zjs_ble.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ typedef struct zjs_ble_handle {
8484
ble_connection_t *connections;
8585
} ble_handle_t;
8686

87-
static struct bt_uuid *gatt_primary_service_uuid =
88-
BT_UUID_DECLARE_16(BT_UUID_GATT_PRIMARY_VAL);
89-
static struct bt_uuid *gatt_characteristic_uuid =
90-
BT_UUID_DECLARE_16(BT_UUID_GATT_CHRC_VAL);
91-
static struct bt_uuid *gatt_cud_uuid = BT_UUID_DECLARE_16(BT_UUID_GATT_CUD_VAL);
92-
static struct bt_uuid *gatt_ccc_uuid = BT_UUID_DECLARE_16(BT_UUID_GATT_CCC_VAL);
93-
9487
static struct k_sem ble_sem;
9588

9689
static ble_handle_t *ble_handle = NULL;
@@ -869,7 +862,8 @@ static bool zjs_ble_parse_characteristic(ble_characteristic_t *chrc)
869862
return false;
870863
}
871864

872-
if (strtoul(desc_uuid, NULL, 16) == BT_UUID_GATT_CUD_VAL) {
865+
unsigned long cud_uuid = (unsigned long)BT_UUID_16(BT_UUID_GATT_CUD)->val;
866+
if (strtoul(desc_uuid, NULL, 16) == cud_uuid) {
873867
// Support CUD only, ignore all other type of descriptors
874868
ZVAL v_value = zjs_get_property(v_desc, "value");
875869
if (jerry_value_is_string(v_value)) {
@@ -1038,7 +1032,7 @@ static bool zjs_ble_register_service(ble_service_t *service)
10381032
memset(bt_attrs, 0, sizeof(struct bt_gatt_attr) * num_of_entries);
10391033

10401034
// GATT Primary Service
1041-
bt_attrs[entry_index].uuid = gatt_primary_service_uuid;
1035+
bt_attrs[entry_index].uuid = BT_UUID_GATT_PRIMARY;
10421036
bt_attrs[entry_index].perm = BT_GATT_PERM_READ;
10431037
bt_attrs[entry_index].read = bt_gatt_attr_read_service;
10441038
bt_attrs[entry_index].user_data = service->uuid;
@@ -1058,7 +1052,7 @@ static bool zjs_ble_register_service(ble_service_t *service)
10581052

10591053
chrc_user_data->uuid = ch->uuid;
10601054
chrc_user_data->properties = ch->flags;
1061-
bt_attrs[entry_index].uuid = gatt_characteristic_uuid;
1055+
bt_attrs[entry_index].uuid = BT_UUID_GATT_CHRC;
10621056
bt_attrs[entry_index].perm = BT_GATT_PERM_READ;
10631057
bt_attrs[entry_index].read = bt_gatt_attr_read_chrc;
10641058
bt_attrs[entry_index].user_data = chrc_user_data;
@@ -1095,7 +1089,7 @@ static bool zjs_ble_register_service(ble_service_t *service)
10951089
// FIXME: cud_buffer should be freed later if no longer needed, but
10961090
// doesn't seem to be
10971091

1098-
bt_attrs[entry_index].uuid = gatt_cud_uuid;
1092+
bt_attrs[entry_index].uuid = BT_UUID_GATT_CUD;
10991093
bt_attrs[entry_index].perm = BT_GATT_PERM_READ;
11001094
bt_attrs[entry_index].read = bt_gatt_attr_read_cud;
11011095
bt_attrs[entry_index].user_data = cud_buffer;
@@ -1117,7 +1111,7 @@ static bool zjs_ble_register_service(ble_service_t *service)
11171111
ccc_user_data->cfg = ble_handle->blvl_ccc_cfg;
11181112
ccc_user_data->cfg_len = ARRAY_SIZE(ble_handle->blvl_ccc_cfg);
11191113
ccc_user_data->cfg_changed = zjs_ble_blvl_ccc_cfg_changed;
1120-
bt_attrs[entry_index].uuid = gatt_ccc_uuid;
1114+
bt_attrs[entry_index].uuid = BT_UUID_GATT_CCC;
11211115
bt_attrs[entry_index].perm = BT_GATT_PERM_READ | BT_GATT_PERM_WRITE;
11221116
bt_attrs[entry_index].read = bt_gatt_attr_read_ccc;
11231117
bt_attrs[entry_index].write = bt_gatt_attr_write_ccc;

src/zjs_ble.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"zephyr_conf": {
77
"all": [
88
"CONFIG_BT=y",
9-
"CONFIG_NBLE=y",
109
"CONFIG_BT_SMP=y",
1110
"CONFIG_BT_PERIPHERAL=y",
1211
"CONFIG_BT_MAX_CONN=4"

src/zjs_callbacks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#ifndef ZJS_LINUX_BUILD
1717
// Zephyr includes
18-
#include <misc/ring_buffer.h>
18+
#include <ring_buffer.h>
1919
#include <zephyr.h>
2020

2121
// ZJS includes

0 commit comments

Comments
 (0)