mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
detect CSR Warm Boot Command
This commit is contained in:
parent
a827874ef0
commit
504353102e
@ -48,6 +48,7 @@
|
|||||||
#include <string.h> /* memcpy */
|
#include <string.h> /* memcpy */
|
||||||
|
|
||||||
#include "bt_control.h"
|
#include "bt_control.h"
|
||||||
|
#include <btstack/utils.h>
|
||||||
|
|
||||||
// minimal CSR init script
|
// minimal CSR init script
|
||||||
static const uint8_t init_script[] = {
|
static const uint8_t init_script[] = {
|
||||||
@ -102,6 +103,13 @@ static int bt_control_csr_next_cmd(void *config, uint8_t *hci_cmd_buffer){
|
|||||||
|
|
||||||
init_script_offset += payload_len;
|
init_script_offset += payload_len;
|
||||||
|
|
||||||
|
// support for warm boot command
|
||||||
|
uint16_t varid = READ_BT_16(hci_cmd_buffer, 10);
|
||||||
|
printf("csr: varid 0x%04x\n", varid);
|
||||||
|
if (varid == 0x4002){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user