mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(bt): Enable use of RESERVED bits in COD (GitHub PR)
This commit is contained in:
parent
25668990ad
commit
592e743dad
@ -586,6 +586,7 @@ static void btc_gap_bt_set_cod(btc_gap_bt_args_t *arg)
|
||||
tBTA_UTL_COD p_cod;
|
||||
esp_bt_cod_t *cod = &(arg->set_cod.cod);
|
||||
p_cod.minor = cod->minor << 2;
|
||||
p_cod.minor |= cod->reserved_2;
|
||||
p_cod.major = cod->major;
|
||||
p_cod.service = cod->service << 5;
|
||||
bool ret = utl_set_device_class(&p_cod, arg->set_cod.mode);
|
||||
@ -603,6 +604,7 @@ esp_err_t btc_gap_bt_get_cod(esp_bt_cod_t *cod)
|
||||
return ESP_BT_STATUS_FAIL;
|
||||
}
|
||||
cod->minor = p_cod.minor >> 2;
|
||||
cod->reserved_2 = p_cod.minor & 0x03;
|
||||
cod->major = p_cod.major;
|
||||
cod->service = p_cod.service >> 5;
|
||||
return ESP_BT_STATUS_SUCCESS;
|
||||
|
@ -447,7 +447,7 @@ typedef void (tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK) (UINT8 status);
|
||||
|
||||
/* the COD masks */
|
||||
#define BTM_COD_FORMAT_TYPE_MASK 0x03
|
||||
#define BTM_COD_MINOR_CLASS_MASK 0xFC
|
||||
#define BTM_COD_MINOR_CLASS_MASK 0xFF
|
||||
#define BTM_COD_MAJOR_CLASS_MASK 0x1F
|
||||
#define BTM_COD_SERVICE_CLASS_LO_B 0x00E0
|
||||
#define BTM_COD_SERVICE_CLASS_MASK 0xFFE0
|
||||
|
Loading…
Reference in New Issue
Block a user