mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-21 21:41:13 +00:00
atwilc3000: support custom bd_addr
This commit is contained in:
parent
a1b34469cd
commit
6ca9a99a26
@ -94,14 +94,12 @@ static void atwilc3000_set_baudrate_command(uint32_t baudrate, uint8_t *hci_cmd_
|
|||||||
hci_cmd_buffer[7] = 0; // No flow control
|
hci_cmd_buffer[7] = 0; // No flow control
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void atwilc3000_set_bd_addr_command(bd_addr_t addr, uint8_t *hci_cmd_buffer){
|
static void atwilc3000_set_bd_addr_command(bd_addr_t addr, uint8_t *hci_cmd_buffer){
|
||||||
hci_cmd_buffer[0] = 0x06;
|
hci_cmd_buffer[0] = 0x54;
|
||||||
hci_cmd_buffer[1] = 0xFC;
|
hci_cmd_buffer[1] = 0xFC;
|
||||||
hci_cmd_buffer[2] = 0x06;
|
hci_cmd_buffer[2] = 0x06;
|
||||||
reverse_bd_addr(addr, &hci_cmd_buffer[3]);
|
reverse_bd_addr(addr, &hci_cmd_buffer[3]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void atwilc3000_send_command(const uint8_t * data, uint16_t len){
|
static void atwilc3000_send_command(const uint8_t * data, uint16_t len){
|
||||||
hci_dump_packet(HCI_COMMAND_DATA_PACKET, 0, (uint8_t *) &data[1], len - 1);
|
hci_dump_packet(HCI_COMMAND_DATA_PACKET, 0, (uint8_t *) &data[1], len - 1);
|
||||||
@ -252,7 +250,7 @@ static const btstack_chipset_t btstack_chipset_atwilc3000 = {
|
|||||||
NULL, // chipset_init not used
|
NULL, // chipset_init not used
|
||||||
NULL, // chipset_next_command not used
|
NULL, // chipset_next_command not used
|
||||||
atwilc3000_set_baudrate_command,
|
atwilc3000_set_baudrate_command,
|
||||||
NULL, // atwilc3000_set_bd_addr_command,
|
atwilc3000_set_bd_addr_command,
|
||||||
};
|
};
|
||||||
|
|
||||||
// MARK: public API
|
// MARK: public API
|
||||||
|
@ -1518,8 +1518,9 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
|||||||
hci_stack->substate = HCI_INIT_READ_BD_ADDR;
|
hci_stack->substate = HCI_INIT_READ_BD_ADDR;
|
||||||
return;
|
return;
|
||||||
case HCI_INIT_W4_SET_BD_ADDR:
|
case HCI_INIT_W4_SET_BD_ADDR:
|
||||||
// for STLC2500D, bd addr change only gets active after sending reset command
|
// for STLC2500D + ATWILC3000, bd addr change only gets active after sending reset command
|
||||||
if (hci_stack->manufacturer == BLUETOOTH_COMPANY_ID_ST_MICROELECTRONICS){
|
if ((hci_stack->manufacturer == BLUETOOTH_COMPANY_ID_ST_MICROELECTRONICS)
|
||||||
|
|| (hci_stack->manufacturer == BLUETOOTH_COMPANY_ID_ATMEL_CORPORATION)){
|
||||||
hci_stack->substate = HCI_INIT_SEND_RESET_ST_WARM_BOOT;
|
hci_stack->substate = HCI_INIT_SEND_RESET_ST_WARM_BOOT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user