-
Notifications
You must be signed in to change notification settings - Fork 972
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure BT device address is set. (#1284)
* Make sure BT device address is set. * Change cyw43_hal_generate_laa_mac to match MicroPython
- Loading branch information
1 parent
b1d4ba5
commit d9c88c6
Showing
6 changed files
with
65 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2023 Raspberry Pi (Trading) Ltd. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include "pico/btstack_chipset_cyw43.h" | ||
|
||
static void chipset_set_bd_addr_command(bd_addr_t addr, uint8_t *hci_cmd_buffer) { | ||
hci_cmd_buffer[0] = 0x01; | ||
hci_cmd_buffer[1] = 0xfc; | ||
hci_cmd_buffer[2] = 0x06; | ||
reverse_bd_addr(addr, &hci_cmd_buffer[3]); | ||
} | ||
|
||
static const btstack_chipset_t btstack_chipset_cyw43 = { | ||
.name = "CYW43", | ||
.init = NULL, | ||
.next_command = NULL, | ||
.set_baudrate_command = NULL, | ||
.set_bd_addr_command = chipset_set_bd_addr_command, | ||
}; | ||
|
||
const btstack_chipset_t * btstack_chipset_cyw43_instance(void) { | ||
return &btstack_chipset_cyw43; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/rp2_common/pico_cyw43_driver/include/pico/btstack_chipset_cyw43.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2023 Raspberry Pi (Trading) Ltd. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#ifndef _PICO_BTSTACK_CHIPSET_CYW43_H | ||
#define _PICO_BTSTACK_CHIPSET_CYW43_H | ||
|
||
#include "btstack_chipset.h" | ||
|
||
/** | ||
* \brief Return the singleton BTstack chipset CY43 API instance | ||
* \ingroup pico_btstack | ||
*/ | ||
const btstack_chipset_t * btstack_chipset_cyw43_instance(void); | ||
|
||
#endif |