Skip to content

Commit 4a67c38

Browse files
committed
added support for brd4350a
1 parent 203ae5b commit 4a67c38

File tree

75 files changed

+5609
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+5609
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// This file is autogenerated by Simplicity Configuration Tools.
2+
// The contents of this file will be replaced in their entirety upon regeneration.
3+
//
4+
// Source template file: RTE_Components.h.jinja
5+
6+
7+
#ifndef RTE_COMPONENTS_H
8+
#define RTE_COMPONENTS_H
9+
10+
/* standard device header from emlib */
11+
#define CMSIS_device_header "em_device.h"
12+
13+
/* components are auto-generated here */
14+
15+
#define RTE_RTOS_FreeRTOS_CORE
16+
17+
#define RTE_RTOS_FreeRTOS_CONFIG_RTOS2
18+
19+
#define RTE_RTOS_FreeRTOS_COROUTINE
20+
21+
#define RTE_RTOS_FreeRTOS_EVENTGROUPS
22+
23+
#define RTE_RTOS_FreeRTOS_TIMERS
24+
25+
#define RTE_RTOS_FreeRTOS_HEAP_3
26+
27+
28+
#endif /* RTE_COMPONENTS_H */
29+
30+
/* This file is autogenerated by Simplicity Configuration Tools. */
31+
/* The contents of this file will be replaced in their entirety upon regeneration. */
32+
/* */
33+
/* Source template file: RTE_Components.h.jinja */
34+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/********************************************************************
2+
* Autogenerated file, do not edit.
3+
*******************************************************************/
4+
5+
#include <stdint.h>
6+
#include "sli_bt_gattdb_def.h"
7+
8+
#define GATT_HEADER(F) F
9+
#define GATT_DATA(F) F
10+
GATT_DATA(const uint16_t gattdb_uuidtable_16_map[]) =
11+
{
12+
0x2800,
13+
0x2801,
14+
0x2803,
15+
0x2a00,
16+
0x2a01,
17+
0x2a29,
18+
0x2a24,
19+
0x2a23,
20+
0x2a05,
21+
0x2b2a,
22+
0x2b29,
23+
0x2902,
24+
};
25+
26+
GATT_DATA(const uint8_t gattdb_uuidtable_128_map[]) =
27+
{
28+
0x11, 0x9d, 0x9f, 0x42, 0x9c, 0x4f, 0x9f, 0x95, 0x59, 0x45, 0x3d, 0x26, 0xf5, 0x2e, 0xee, 0x18,
29+
0x12, 0x9d, 0x9f, 0x42, 0x9c, 0x4f, 0x9f, 0x95, 0x59, 0x45, 0x3d, 0x26, 0xf5, 0x2e, 0xee, 0x18,
30+
0x04, 0x8f, 0x21, 0x83, 0x8a, 0x74, 0x7d, 0xb8, 0xf2, 0x45, 0x72, 0x87, 0x38, 0x02, 0x63, 0x64,
31+
};
32+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_27) = {
33+
.properties = 0x2e,
34+
.max_len = 512,
35+
.len = 1,
36+
.data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }
37+
};
38+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_24) = {
39+
.properties = 0x2e,
40+
.max_len = 247,
41+
.len = 1,
42+
.data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }
43+
};
44+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_22) = {
45+
.properties = 0x0a,
46+
.max_len = 247,
47+
.len = 1,
48+
.data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }
49+
};
50+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_20) = {
51+
.len = 2,
52+
.data = { 0xf6, 0xff, }
53+
};
54+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_19) = {
55+
.len = 6,
56+
.data = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, }
57+
};
58+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_17) = {
59+
.len = 10,
60+
.data = { 0x42, 0x6c, 0x75, 0x65, 0x20, 0x47, 0x65, 0x63, 0x6b, 0x6f, }
61+
};
62+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_15) = {
63+
.len = 12,
64+
.data = { 0x53, 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x20, 0x4c, 0x61, 0x62, 0x73, }
65+
};
66+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_13) = {
67+
.len = 2,
68+
.data = { 0x0a, 0x18, }
69+
};
70+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_12) = {
71+
.len = 2,
72+
.data = { 0x00, 0x00, }
73+
};
74+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_10) = {
75+
.properties = 0x0a,
76+
.max_len = 13,
77+
.data = { 0x45, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, },
78+
};
79+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_8) = {
80+
.len = 2,
81+
.data = { 0x00, 0x18, }
82+
};
83+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_7) = {
84+
.properties = 0x0a,
85+
.max_len = 1,
86+
.data = { 0x00, },
87+
};
88+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_5) = {
89+
.properties = 0x02,
90+
.max_len = 16,
91+
.data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
92+
};
93+
GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_2) = {
94+
.properties = 0x20,
95+
.max_len = 4,
96+
.data = { 0x00, 0x00, 0x00, 0x00, },
97+
};
98+
GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_0) = {
99+
.len = 2,
100+
.data = { 0x01, 0x18, }
101+
};
102+
103+
GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = {
104+
{ .handle = 0x01, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_0 },
105+
{ .handle = 0x02, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x20, .char_uuid = 0x0008 } },
106+
{ .handle = 0x03, .uuid = 0x0008, .permissions = 0x800, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_2 },
107+
{ .handle = 0x04, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x00 } },
108+
{ .handle = 0x05, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0009 } },
109+
{ .handle = 0x06, .uuid = 0x0009, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_5 },
110+
{ .handle = 0x07, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x000a } },
111+
{ .handle = 0x08, .uuid = 0x000a, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_7 },
112+
{ .handle = 0x09, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_8 },
113+
{ .handle = 0x0a, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x0003 } },
114+
{ .handle = 0x0b, .uuid = 0x0003, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_10 },
115+
{ .handle = 0x0c, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0004 } },
116+
{ .handle = 0x0d, .uuid = 0x0004, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_12 },
117+
{ .handle = 0x0e, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_13 },
118+
{ .handle = 0x0f, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0005 } },
119+
{ .handle = 0x10, .uuid = 0x0005, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_15 },
120+
{ .handle = 0x11, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0006 } },
121+
{ .handle = 0x12, .uuid = 0x0006, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_17 },
122+
{ .handle = 0x13, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0007 } },
123+
{ .handle = 0x14, .uuid = 0x0007, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_19 },
124+
{ .handle = 0x15, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_20 },
125+
{ .handle = 0x16, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x8000 } },
126+
{ .handle = 0x17, .uuid = 0x8000, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_22 },
127+
{ .handle = 0x18, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x2e, .char_uuid = 0x8001 } },
128+
{ .handle = 0x19, .uuid = 0x8001, .permissions = 0x807, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_24 },
129+
{ .handle = 0x1a, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x01 } },
130+
{ .handle = 0x1b, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x2e, .char_uuid = 0x8002 } },
131+
{ .handle = 0x1c, .uuid = 0x8002, .permissions = 0x807, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_27 },
132+
{ .handle = 0x1d, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x02 } },
133+
};
134+
135+
GATT_HEADER(const sli_bt_gattdb_t gattdb) = {
136+
.attributes = gattdb_attributes_map,
137+
.attribute_table_size = 29,
138+
.attribute_num = 29,
139+
.uuid16 = gattdb_uuidtable_16_map,
140+
.uuid16_table_size = 12,
141+
.uuid16_num = 12,
142+
.uuid128 = gattdb_uuidtable_128_map,
143+
.uuid128_table_size = 3,
144+
.uuid128_num = 3,
145+
.num_ccfg = 3,
146+
.caps_mask = 0xffff,
147+
.enabled_caps = 0xffff,
148+
};
149+
const sli_bt_gattdb_t *static_gattdb = &gattdb;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/********************************************************************
2+
* Autogenerated file, do not edit.
3+
*******************************************************************/
4+
5+
#ifndef __GATT_DB_H
6+
#define __GATT_DB_H
7+
8+
#if __cplusplus
9+
extern "C" {
10+
#endif
11+
12+
#include "sli_bt_gattdb_def.h"
13+
14+
extern const sli_bt_gattdb_t gattdb;
15+
16+
#define gattdb_generic_attribute 1
17+
#define gattdb_service_changed_char 3
18+
#define gattdb_database_hash 6
19+
#define gattdb_client_support_features 8
20+
#define gattdb_device_name 11
21+
#define gattdb_CHIPoBLEChar_Rx 23
22+
#define gattdb_CHIPoBLEChar_Tx 25
23+
#define gattdb_CHIPoBLEChar_C3 28
24+
25+
#if __cplusplus
26+
}
27+
#endif
28+
29+
#endif // __GATT_DB_H
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/***************************************************************************//**
2+
* @file
3+
* @brief Bluetooth initialization and event processing
4+
*******************************************************************************
5+
* # License
6+
* <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b>
7+
*******************************************************************************
8+
*
9+
* SPDX-License-Identifier: Zlib
10+
*
11+
* The licensor of this software is Silicon Laboratories Inc.
12+
*
13+
* This software is provided 'as-is', without any express or implied warranty.
14+
* In no event will the authors be held liable for any damages arising from the
15+
* use of this software.
16+
*
17+
* Permission is granted to anyone to use this software for any purpose,
18+
* including commercial applications, and to alter it and redistribute it
19+
* freely, subject to the following restrictions:
20+
*
21+
* 1. The origin of this software must not be misrepresented; you must not
22+
* claim that you wrote the original software. If you use this software in a
23+
* product, an acknowledgment in the product documentation would be
24+
* appreciated but is not required.
25+
* 2. Altered source versions must be plainly marked as such, and must not be
26+
* misrepresented as being the original software.
27+
* 3. This notice may not be removed or altered from any source distribution.
28+
*
29+
******************************************************************************/
30+
31+
#include <sl_common.h>
32+
#include "sl_bluetooth.h"
33+
#include "sl_assert.h"
34+
#include "sl_bt_stack_init.h"
35+
#include "sl_component_catalog.h"
36+
/**
37+
* Internal stack function to start the Bluetooth stack.
38+
*
39+
* @return SL_STATUS_OK if the stack was successfully started
40+
*/
41+
extern sl_status_t sli_bt_system_start_bluetooth();
42+
43+
void sl_bt_init(void)
44+
{
45+
// Stack initialization could fail, e.g., due to out of memory.
46+
// The failure could not be returned to user as the system initialization
47+
// does not return an error code. Use the EFM_ASSERT to catch the failure,
48+
// which requires either DEBUG_EFM or DEBUG_EFM_USER is defined.
49+
sl_status_t err = sl_bt_stack_init();
50+
EFM_ASSERT(err == SL_STATUS_OK);
51+
52+
// When neither Bluetooth on-demand start feature nor an RTOS is present, the
53+
// Bluetooth stack is always started already at init-time.
54+
#if !defined(SL_CATALOG_BLUETOOTH_ON_DEMAND_START_PRESENT) && !defined(SL_CATALOG_KERNEL_PRESENT)
55+
err = sli_bt_system_start_bluetooth();
56+
EFM_ASSERT(err == SL_STATUS_OK);
57+
#endif
58+
}
59+
60+
SL_WEAK void sl_bt_on_event(sl_bt_msg_t* evt)
61+
{
62+
(void)(evt);
63+
}
64+
65+
void sl_bt_process_event(sl_bt_msg_t *evt)
66+
{
67+
sl_bt_on_event(evt);
68+
}
69+
70+
#if !defined(SL_CATALOG_KERNEL_PRESENT)
71+
// When running in an RTOS, the stack events are processed in a dedicated
72+
// event processing task, and these functions are not used at all.
73+
74+
SL_WEAK bool sl_bt_can_process_event(uint32_t len)
75+
{
76+
(void)(len);
77+
return true;
78+
}
79+
80+
void sl_bt_step(void)
81+
{
82+
sl_bt_msg_t evt;
83+
84+
sl_bt_run();
85+
uint32_t event_len = sl_bt_event_pending_len();
86+
// For preventing from data loss, the event will be kept in the stack's queue
87+
// if application cannot process it at the moment.
88+
if ((event_len == 0) || (!sl_bt_can_process_event(event_len))) {
89+
return;
90+
}
91+
92+
// Pop (non-blocking) a Bluetooth stack event from event queue.
93+
sl_status_t status = sl_bt_pop_event(&evt);
94+
if(status != SL_STATUS_OK){
95+
return;
96+
}
97+
sl_bt_process_event(&evt);
98+
}
99+
#endif // !defined(SL_CATALOG_KERNEL_PRESENT)

0 commit comments

Comments
 (0)