Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update btc_gap_bt.c #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/bt/host/bluedroid/bta/include/bta/utl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

/** for utl_set_device_class() **/
typedef struct {
UINT8 reserved_2;
UINT8 minor;
UINT8 major;
UINT16 service;
Expand Down
2 changes: 2 additions & 0 deletions components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,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.reserved_2 = cod->reserved_2;
p_cod.minor = cod->minor << 2;
p_cod.major = cod->major;
p_cod.service = cod->service << 5;
Expand All @@ -605,6 +606,7 @@ esp_err_t btc_gap_bt_get_cod(esp_bt_cod_t *cod)
cod->minor = p_cod.minor >> 2;
cod->major = p_cod.major;
cod->service = p_cod.service >> 5;
cod->reserved_2 = p_cod.reserved_2;
return ESP_BT_STATUS_SUCCESS;
}

Expand Down