-
Notifications
You must be signed in to change notification settings - Fork 33
Bugfix/fix bluetooth bt tool storage tool moudle cb change to const #450
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
base: dev
Are you sure you want to change the base?
Changes from all commits
2fb1278
17c25a0
2e4f8c5
d336bd4
19129f2
a32d4b5
09c2a75
d4c652a
52a1184
66a35aa
9fd2be3
a729b92
bfb7fcf
70000ee
de903e3
0756115
08f66e4
34752da
76e6d21
6fc9939
bf2a772
e8a1693
77701d6
3e0cc82
967cef6
be55be5
53562ec
b6c4dcf
7a977c2
3700404
a865fae
2334ef7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -299,7 +299,7 @@ static void on_advertising_stopped_cb(bt_advertiser_t* adv, uint8_t adv_id) | |
| adv_info->busy = false; | ||
| } | ||
|
|
||
| static advertiser_callback_t adv_callback = { | ||
| static const advertiser_callback_t adv_callback = { | ||
| sizeof(adv_callback), | ||
| on_advertising_start_cb, | ||
| on_advertising_stopped_cb | ||
|
|
@@ -595,7 +595,7 @@ void system_bluetooth_ble_Advertiser_interface_adv_startAdvertising(FeatureInter | |
| adv_info->start_userdata = (void*)data; | ||
|
|
||
| status = bt_le_start_advertising_async(adv_info->ins, &adv_params, | ||
| p_adv_data, adv_len, p_scan_rsp_data, scan_rsp_len, &adv_callback, | ||
| p_adv_data, adv_len, p_scan_rsp_data, scan_rsp_len, (advertiser_callback_t*)&adv_callback, | ||
| start_adv_cb, (void*)data); | ||
|
|
||
| if (status != BT_STATUS_SUCCESS) { | ||
|
|
@@ -1563,7 +1563,7 @@ static void mtu_updated_callback(gattc_handle_t conn_handle, gatt_status_t statu | |
| bt_list_remove(gattc_info->userdata_list, data); | ||
| } | ||
|
|
||
| static bt_gattc_feature_callbacks_t gattc_cbs = { | ||
| static const bt_gattc_feature_callbacks_t gattc_cbs = { | ||
| sizeof(gattc_cbs), | ||
| .on_connected = connect_callback, | ||
| .on_disconnected = disconnect_callback, | ||
|
|
@@ -1761,7 +1761,7 @@ void system_bluetooth_ble_GattClient_interface_gattc_connect(FeatureInterfaceHan | |
| gattc_info->gattc->addr_type, gattc_connect_cb, (void*)data); | ||
| } else { | ||
| status = bt_gattc_feature_create_client_async(gattc_info->ins, &gattc_info->gattc->remote_address, gattc_create_cb, | ||
| &gattc_cbs, (void*)data); | ||
| (bt_gattc_feature_callbacks_t*)&gattc_cbs, (void*)data); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dito |
||
| } | ||
|
|
||
| if (status != BT_STATUS_SUCCESS) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,7 +107,10 @@ static enum bt_security_err zblue_on_pairing_accept(struct bt_conn* conn, const | |
| static void zblue_register_callback(void); | ||
| static void zblue_unregister_callback(void); | ||
|
|
||
| static struct bt_conn_cb g_conn_cbs = { | ||
| static le_conn_info_t* le_conn_add(const bt_address_t* addr); | ||
| static le_conn_info_t* le_conn_find(const bt_address_t* addr); | ||
|
|
||
| static const struct bt_conn_cb g_conn_cbs = { | ||
| .connected = zblue_on_connected, | ||
| .disconnected = zblue_on_disconnected, | ||
| #ifdef CONFIG_BT_SMP | ||
|
|
@@ -119,15 +122,15 @@ static struct bt_conn_cb g_conn_cbs = { | |
| #endif | ||
| }; | ||
|
|
||
| static struct bt_conn_auth_info_cb g_conn_auth_info_cbs = { | ||
| static const struct bt_conn_auth_info_cb g_conn_auth_info_cbs = { | ||
| .pairing_complete_ctkd = zblue_on_pairing_complete_ctkd, | ||
| .pairing_complete = zblue_on_pairing_complete, | ||
| .pairing_failed = zblue_on_pairing_failed, | ||
| .bond_deleted = zblue_on_bond_deleted, | ||
| }; | ||
|
|
||
| #if defined(CONFIG_SETTINGS_ZBLUE) | ||
| static struct bt_settings_zblue_cb g_setting_cbs = { | ||
| static const struct bt_settings_zblue_cb g_setting_cbs = { | ||
| .irk_notify = zblue_on_irk_notify, | ||
| .irk_load = zblue_on_irk_load, | ||
| .ltk_notify = zblue_on_ltk_notify, | ||
|
|
@@ -758,22 +761,22 @@ static void zblue_on_bond_deleted(uint8_t id, const bt_addr_le_t* peer) | |
|
|
||
| static void zblue_register_callback(void) | ||
| { | ||
| bt_conn_cb_register(&g_conn_cbs); | ||
| bt_conn_cb_register((struct bt_conn_cb*)&g_conn_cbs); | ||
|
||
| #ifdef CONFIG_BT_SMP | ||
| bt_conn_le_auth_cb_register(&g_conn_auth_cbs); | ||
| bt_conn_auth_info_cb_register(&g_conn_auth_info_cbs); | ||
| bt_conn_le_auth_cb_register((struct bt_conn_auth_cb*)&g_conn_auth_cbs); | ||
| bt_conn_auth_info_cb_register((struct bt_conn_auth_info_cb*)&g_conn_auth_info_cbs); | ||
| #endif | ||
| #ifdef CONFIG_SETTINGS_ZBLUE | ||
| bt_setting_cb_register(&g_setting_cbs); | ||
| bt_setting_cb_register((struct bt_settings_zblue_cb*)&g_setting_cbs); | ||
| #endif | ||
| } | ||
|
|
||
| static void zblue_unregister_callback(void) | ||
| { | ||
| bt_conn_cb_unregister(&g_conn_cbs); | ||
| bt_conn_cb_unregister((struct bt_conn_cb*)&g_conn_cbs); | ||
| #ifdef CONFIG_BT_SMP | ||
| bt_conn_le_auth_cb_register(NULL); | ||
| bt_conn_auth_info_cb_unregister(&g_conn_auth_info_cbs); | ||
| bt_conn_auth_info_cb_unregister((struct bt_conn_auth_info_cb*)&g_conn_auth_info_cbs); | ||
| #endif | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do const cast?