detect CSR Warm Boot Command

This commit is contained in:
matthias.ringwald@gmail.com 2014-07-30 20:34:31 +00:00
parent a827874ef0
commit 504353102e

View File

@ -48,6 +48,7 @@
#include <string.h> /* memcpy */
#include "bt_control.h"
#include <btstack/utils.h>
// minimal CSR 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;
// 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;
}