Unverified Commit 8e961a56 authored by Dominic Pearman's avatar Dominic Pearman Committed by GitHub

Added setup overload to pass name. (#1483)

Co-authored-by: default avatarDominic Pearman <dominic@phymorous.de>
parent 64ad69c2
......@@ -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));
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment