btstack_chipset_bcm: add btstack_chipset_bcm_identify_controller

This commit is contained in:
Matthias Ringwald 2025-01-31 11:24:07 +01:00
parent b298729501
commit e36d5009ba
2 changed files with 35 additions and 0 deletions

View File

@ -285,3 +285,27 @@ void btstack_chipset_bcm_enable_init_script(int enabled){
btstack_chipset_bcm.next_command = NULL;
}
}
// Other lmp_subversion values:
// 0x220c - CYW20819
// 0x420e - CYW20719
const char * btstack_chipset_bcm_identify_controller(uint16_t lmp_subversion) {
const char * device_name = NULL;
switch (lmp_subversion){
case 0x220b:
// CYW20706
device_name = "BCM20703A2";
break;
case 0x2220:
// CYW5551x
device_name = "CYW55500A1";
break;
case 0x2257:
// CYW5557x
device_name = "CYW55560A1";
break;
default:
break;
}
return device_name;
}

View File

@ -79,6 +79,17 @@ void btstack_chipset_bcm_set_device_name(const char * path);
*/
void btstack_chipset_bcm_enable_init_script(int enabled);
/**
* @Brief Identify Broadcom/Cypress/Infineon chipset by lmp_subversion
* If identified, device name is returned and can be used for HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION
*
* @note Required for newer Controllers that require AIROC Download Mode for PatchRAM Upload
*
* @param lmp_subversion
* @returns device name if identified, otherwise NULL
*/
const char * btstack_chipset_bcm_identify_controller(uint16_t lmp_subversion);
#if defined __cplusplus
}
#endif