Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
8e961a56
Unverified
Commit
8e961a56
authored
May 27, 2023
by
Dominic Pearman
Committed by
GitHub
May 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added setup overload to pass name. (#1483)
Co-authored-by:
Dominic Pearman
<
dominic@phymorous.de
>
parent
64ad69c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
libraries/BTstackLib/src/BTstackLib.cpp
libraries/BTstackLib/src/BTstackLib.cpp
+4
-1
libraries/BTstackLib/src/BTstackLib.h
libraries/BTstackLib/src/BTstackLib.h
+1
-0
No files found.
libraries/BTstackLib/src/BTstackLib.cpp
View file @
8e961a56
...
...
@@ -778,6 +778,10 @@ static hci_transport_config_uart_t config = {
static
btstack_packet_callback_registration_t
hci_event_callback_registration
;
void
BTstackManager
::
setup
(
void
)
{
setup
(
"BTstack LE Shield"
);
}
void
BTstackManager
::
setup
(
const
char
*
name
)
{
//#ifdef PIN_LED
// pinMode(PIN_LED, OUTPUT);
...
...
@@ -826,7 +830,6 @@ void BTstackManager::setup(void) {
const
uint8_t
flags
[]
=
{
0x02
,
0x01
,
0x02
};
memcpy
(
&
adv_data
[
pos
],
flags
,
sizeof
(
flags
));
pos
+=
sizeof
(
flags
);
const
char
*
name
=
"BTstack LE Shield"
;
adv_data
[
pos
++
]
=
strlen
(
name
)
+
1
;
adv_data
[
pos
++
]
=
0x09
;
memcpy
(
&
adv_data
[
pos
],
name
,
strlen
(
name
));
...
...
libraries/BTstackLib/src/BTstackLib.h
View file @
8e961a56
...
...
@@ -135,6 +135,7 @@ extern "C" {
public:
BTstackManager
(
void
);
void
setup
(
void
);
void
setup
(
const
char
*
name
);
void
loop
(
void
);
void
setPublicBdAddr
(
bd_addr_t
addr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment