From: Wootak Jung Date: Thu, 13 Sep 2018 08:54:44 +0000 (+0900) Subject: Modify bt-oal initialize code readably X-Git-Tag: accepted/tizen/unified/20180918.062755~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F189089%2F1;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Modify bt-oal initialize code readably Change-Id: Ic35ea6d65139f41f63caccd185474ad598f0d2d4 --- diff --git a/bt-oal/bluez_hal/src/bt-hal-gatt-client.c b/bt-oal/bluez_hal/src/bt-hal-gatt-client.c index 61c4af9..633ec00 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gatt-client.c +++ b/bt-oal/bluez_hal/src/bt-hal-gatt-client.c @@ -2854,40 +2854,40 @@ bt_status_t batchscan_read_reports(int client_if, int scan_mode) } const btgatt_client_interface_t btgatt_client_interface = { - btif_gattc_register_client, - btif_gattc_unregister_client, - scan, - btif_gattc_client_connect, - btif_gattc_client_disconnect, - refresh, - btif_gattc_client_search_service, - get_included_service, - btif_gattc_get_characteristic, - btif_gattc_get_descriptor, - btif_read_characteristic, - btif_write_characteristic, - btif_get_acquire_write_fd, - btif_get_acquire_notify_fd, - btif_read_descriptor, - btif_write_descriptor, - execute_write, - btif_register_for_notification, - btif_deregister_for_notification, - read_remote_rssi, - ota_fw_update, - get_device_type, - btif_gattc_conn_parameter_update, - test_command, - configure_mtu, - scan_filter_param_setup, - scan_filter_add_remove, - scan_filter_clear, - scan_filter_enable, - set_scan_parameters, - batchscan_cfg_storage, - batchscan_enb_batch_scan, - batchscan_dis_batch_scan, - batchscan_read_reports + .register_client = btif_gattc_register_client, + .unregister_client = btif_gattc_unregister_client, + .scan = scan, + .connect = btif_gattc_client_connect, + .disconnect = btif_gattc_client_disconnect, + .refresh = refresh, + .search_service = btif_gattc_client_search_service, + .get_included_service = get_included_service, + .get_characteristic = btif_gattc_get_characteristic, + .get_descriptor = btif_gattc_get_descriptor, + .read_characteristic = btif_read_characteristic, + .write_characteristic = btif_write_characteristic, + .acquire_write = btif_get_acquire_write_fd, + .acquire_notify = btif_get_acquire_notify_fd, + .read_descriptor = btif_read_descriptor, + .write_descriptor = btif_write_descriptor, + .execute_write = execute_write, + .register_for_notification = btif_register_for_notification, + .deregister_for_notification = btif_deregister_for_notification, + .read_remote_rssi = read_remote_rssi, + .ota_fw_update = ota_fw_update, + .get_device_type = get_device_type, + .conn_parameter_update = btif_gattc_conn_parameter_update, + .test_command = test_command, + .configure_mtu = configure_mtu, + .scan_filter_param_setup = scan_filter_param_setup, + .scan_filter_add_remove = scan_filter_add_remove, + .scan_filter_clear = scan_filter_clear, + .scan_filter_enable = scan_filter_enable, + .set_scan_parameters = set_scan_parameters, + .batchscan_cfg_storage = batchscan_cfg_storage, + .batchscan_enb_batch_scan = batchscan_enb_batch_scan, + .batchscan_dis_batch_scan = batchscan_dis_batch_scan, + .batchscan_read_reports = batchscan_read_reports }; static hal_gattc_server_info_t *__bt_find_gatt_conn_info(bt_bdaddr_t *serv_addr) diff --git a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c index 913c7b8..c749f4d 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c +++ b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c @@ -3360,26 +3360,26 @@ static bt_status_t gatt_server_get_mtu_size(int conn_id, int *mtu_size) } const btgatt_server_interface_t btgatt_server_interface = { - gatt_server_register_app, - gatt_server_unregister_app, - gatt_server_open, - gatt_server_close, - gatt_server_add_service, - gatt_server_add_included_service, - gatt_server_add_characteristic, - gatt_server_add_descriptor, - gatt_server_start_service, - gatt_server_stop_service, - gatt_server_delete_service, - gatt_server_send_indication, - gatt_server_send_response, - gatt_server_update_att_value, - gatt_server_listen, - gatt_server_set_adv_data, - gatt_server_multi_adv_enable, - gatt_server_multi_adv_update, - gatt_server_multi_adv_set_inst_data, - gatt_server_multi_adv_disable, - gatt_server_get_mtu_size, - gatt_server_send_acquire_response + .register_server = gatt_server_register_app, + .unregister_server = gatt_server_unregister_app, + .connect = gatt_server_open, + .disconnect = gatt_server_close, + .add_service = gatt_server_add_service, + .add_included_service = gatt_server_add_included_service, + .add_characteristic = gatt_server_add_characteristic, + .add_descriptor = gatt_server_add_descriptor, + .start_service = gatt_server_start_service, + .stop_service = gatt_server_stop_service, + .delete_service = gatt_server_delete_service, + .send_indication = gatt_server_send_indication, + .send_response = gatt_server_send_response, + .update_att_value = gatt_server_update_att_value, + .listen = gatt_server_listen, + .set_adv_data = gatt_server_set_adv_data, + .multi_adv_enable = gatt_server_multi_adv_enable, + .multi_adv_update = gatt_server_multi_adv_update, + .multi_adv_set_inst_data = gatt_server_multi_adv_set_inst_data, + .multi_adv_disable = gatt_server_multi_adv_disable, + .get_att_mtu = gatt_server_get_mtu_size, + .send_response_acquire = gatt_server_send_acquire_response }; diff --git a/bt-oal/oal-a2dp-sink.c b/bt-oal/oal-a2dp-sink.c index 1a18369..a8e1268 100644 --- a/bt-oal/oal-a2dp-sink.c +++ b/bt-oal/oal-a2dp-sink.c @@ -51,9 +51,10 @@ const bt_interface_t * _bt_get_stack_interface(void); static const btav_interface_t *blued_a2dp_sink_interface = NULL; static btav_callbacks_t blued_a2dp_sink_cb = { - sizeof(blued_a2dp_sink_cb), - cb_a2dp_sink_connection_state, - cb_a2dp_sink_audio_state + .size = sizeof(blued_a2dp_sink_cb), + .connection_state_cb = cb_a2dp_sink_connection_state, + .audio_state_cb = cb_a2dp_sink_audio_state, + .audio_config_cb = NULL }; oal_status_t a2dp_sink_enable(char *service_name , char *provider_name) diff --git a/bt-oal/oal-adapter-mgr.c b/bt-oal/oal-adapter-mgr.c index 679906f..ac4b48e 100644 --- a/bt-oal/oal-adapter-mgr.c +++ b/bt-oal/oal-adapter-mgr.c @@ -82,30 +82,30 @@ extern void cb_raw_rssi_received(bt_bdaddr_t *bd_addr, int32_t link_type, int32_ #endif static bt_callbacks_t callbacks = { - sizeof(callbacks), - cb_adapter_state_change, - cb_adapter_properties, - cb_device_properties, - cb_adapter_device_found, - cb_adapter_discovery_state_changed, - cb_device_pin_request, - cb_device_ssp_request, - cb_device_bond_state_changed, - cb_device_acl_state_changed, - NULL, /* callback_thread_event */ - NULL, /* dut_mode_recv_callback */ - NULL, /* le_test_mode_callback*/ - NULL, /* energy_info_callback */ - cb_device_authorize_request, - cb_device_trust_state_changed, + .size = sizeof(callbacks), + .adapter_state_changed_cb = cb_adapter_state_change, + .adapter_properties_cb = cb_adapter_properties, + .remote_device_properties_cb = cb_device_properties, + .device_found_cb = cb_adapter_device_found, + .discovery_state_changed_cb = cb_adapter_discovery_state_changed, + .pin_request_cb = cb_device_pin_request, + .ssp_request_cb = cb_device_ssp_request, + .bond_state_changed_cb = cb_device_bond_state_changed, + .acl_state_changed_cb = cb_device_acl_state_changed, + .thread_evt_cb = NULL, + .dut_mode_recv_cb = NULL, + .le_test_mode_cb = NULL, + .energy_info_cb = NULL, + .authorize_request_cb = cb_device_authorize_request, + .device_trust_state_changed_cb = cb_device_trust_state_changed, #ifdef TIZEN_BT_HAL - cb_socket_conn_authorize_request, - cb_ble_state_change, - cb_device_le_conn_state_changed, - cb_device_trusted_profiles_changed, - cb_rssi_monitor_state_changed, - cb_rssi_alert, - cb_raw_rssi_received, + .socket_authorize_request_cb = cb_socket_conn_authorize_request, + .le_state_changed_cb = cb_ble_state_change, + .le_conn_state_changed_cb = cb_device_le_conn_state_changed, + .device_trusted_profiles_changed_cb = cb_device_trusted_profiles_changed, + .rssi_monitor_state_changed_cb = cb_rssi_monitor_state_changed, + .rssi_alert_cb = cb_rssi_alert, + .raw_rssi_received_cb = cb_raw_rssi_received, #endif }; diff --git a/bt-oal/oal-audio-src.c b/bt-oal/oal-audio-src.c index 3834fc1..989b2b9 100644 --- a/bt-oal/oal-audio-src.c +++ b/bt-oal/oal-audio-src.c @@ -49,10 +49,10 @@ const bt_interface_t * _bt_get_stack_interface(void); static const btav_interface_t *blued_a2dp_interface = NULL; static btav_callbacks_t blued_a2dp_cb = { - sizeof(blued_a2dp_cb), - cb_audio_connection_state, - cb_audio_state, - NULL /* Audio Config Callback */ + .size = sizeof(blued_a2dp_cb), + .connection_state_cb = cb_audio_connection_state, + .audio_state_cb = cb_audio_state, + .audio_config_cb = NULL }; oal_status_t audio_enable(char *service_name , char *provider_name) diff --git a/bt-oal/oal-avrcp-ctrl.c b/bt-oal/oal-avrcp-ctrl.c index 9a6d8d0..ce1586c 100644 --- a/bt-oal/oal-avrcp-ctrl.c +++ b/bt-oal/oal-avrcp-ctrl.c @@ -88,24 +88,23 @@ static void cb_avrcp_ct_btrc_setplayerapplicationsetting_rsp(bt_bdaddr_t *bd_add /** AVRCP Controller callback structure. */ static btrc_ctrl_callbacks_t avrcp_ct_cb = { - /** set to sizeof(BtRcCallbacks) */ - sizeof(avrcp_ct_cb), - cb_avrcp_ct_btrc_passthrough_rsp, - NULL, //cb_avrcp_ct_btrc_groupnavigation_rsp, - cb_avrcp_ct_connection_state, - NULL,/*btrc_ct_getrcfeatures_callback*/ - cb_avrcp_ct_btrc_setplayerapplicationsetting_rsp, - NULL, /*btrc_ct_playerapplicationsetting_callback*/ - cb_avrcp_ct_btrc_playerapplicationsetting_changed, - NULL, /*btrc_ct_setabsvol_cmd_callback*/ - NULL, /*btrc_ct_registernotification_abs_vol_callback*/ - cb_avrcp_ct_trak_info_chnaged, - cb_avrcp_ct_btrc_play_position_changed, - cb_avrcp_ct_btrc_play_status_changed, - NULL, /*btrc_ct_get_folder_items_callback*/ - NULL, /*btrc_ct_change_path_callback*/ - NULL, /*btrc_ct_set_browsed_player_callback*/ - NULL /*btrc_ct_set_addressed_player_callback*/ + .size = sizeof(avrcp_ct_cb), + .passthrough_rsp_cb = cb_avrcp_ct_btrc_passthrough_rsp, + .groupnavigation_rsp_cb = NULL, + .connection_state_cb = cb_avrcp_ct_connection_state, + .getrcfeatures_cb = NULL, + .setplayerappsetting_rsp_cb = cb_avrcp_ct_btrc_setplayerapplicationsetting_rsp, + .playerapplicationsetting_cb = NULL, + .playerapplicationsetting_changed_cb = cb_avrcp_ct_btrc_playerapplicationsetting_changed, + .setabsvol_cmd_cb = NULL, + .registernotification_absvol_cb = NULL, + .track_changed_cb = cb_avrcp_ct_trak_info_chnaged, + .play_position_changed_cb = cb_avrcp_ct_btrc_play_position_changed, + .play_status_changed_cb = cb_avrcp_ct_btrc_play_status_changed, + .get_folder_items_cb = NULL, + .change_folder_path_cb = NULL, + .set_browsed_player_cb = NULL, + .set_addressed_player_cb = NULL }; static void __add_device_to_avrcp_list(bt_address_t *address) diff --git a/bt-oal/oal-avrcp-tg.c b/bt-oal/oal-avrcp-tg.c index de9df0d..c7ac558 100644 --- a/bt-oal/oal-avrcp-tg.c +++ b/bt-oal/oal-avrcp-tg.c @@ -105,32 +105,32 @@ static notif_t registered_notifications; static const btrc_interface_t *avrcp_api; static btrc_callbacks_t sBluetoothAvrcpCallbacks = { - sizeof(sBluetoothAvrcpCallbacks), + .size = sizeof(sBluetoothAvrcpCallbacks), #ifdef TIZEN_BT_HAL - cb_connection_state, + .connection_state_cb = cb_connection_state, #endif - cb_avrcp_remote_features, - cb_avrcp_get_play_status, - NULL, /* cb_avrcp_list_player_app_attr, */ - NULL, /* cb_avrcp_list_player_app_values, */ - NULL, /* cb_avrcp_get_player_app_value, */ - NULL, /* cb_avrcp_get_player_app_attrs_text, */ - NULL, /* cb_avrcp_get_player_app_values_text, */ - cb_avrcp_set_player_app_value, - cb_avrcp_get_element_attr, - cb_avrcp_register_notification, - cb_avrcp_volume_change, - cb_avrcp_delay_change, - cb_avrcp_passthrough_command, - NULL, /* cb_avrcp_set_addressed_player, */ - NULL, /* cb_avrcp_set_browsed_player, */ - NULL, /* cb_avrcp_get_folder_items, */ - NULL, /* cb_avrcp_change_path, */ - NULL, /* cb_avrcp_get_item_attr, */ - NULL, /* cb_avrcp_play_item, */ - NULL, /* cb_avrcp_get_total_num_of_items, */ - NULL, /* cb_avrcp_search, */ - NULL, /* cb_avrcp_add_to_now_playing, */ + .remote_features_cb = cb_avrcp_remote_features, + .get_play_status_cb = cb_avrcp_get_play_status, + .list_player_app_attr_cb = NULL, + .list_player_app_values_cb = NULL, + .get_player_app_value_cb = NULL, + .get_player_app_attrs_text_cb = NULL, + .get_player_app_values_text_cb = NULL, + .set_player_app_value_cb = cb_avrcp_set_player_app_value, + .get_element_attr_cb = cb_avrcp_get_element_attr, + .register_notification_cb = cb_avrcp_register_notification, + .volume_change_cb = cb_avrcp_volume_change, + .delay_change_cb = cb_avrcp_delay_change, + .passthrough_cmd_cb = cb_avrcp_passthrough_command, + .set_addressed_player_cb = NULL, + .set_browsed_player_cb = NULL, + .get_folder_items_cb = NULL, + .change_path_cb = NULL, + .get_item_attr_cb = NULL, + .play_item_cb = NULL, + .get_total_num_of_items_cb = NULL, + .search_cb = NULL, + .add_to_now_playing_cb = NULL, }; static void send_pos_changed(void) diff --git a/bt-oal/oal-gatt.c b/bt-oal/oal-gatt.c index 3731335..75bd825 100644 --- a/bt-oal/oal-gatt.c +++ b/bt-oal/oal-gatt.c @@ -168,31 +168,31 @@ static void cb_notifcation_changed(int conn_id, int trans_id, int attr_handle, b /*TODO GATT Server callbacks will be implemented in subsequent patches */ static const btgatt_server_callbacks_t btgatt_server_callbacks = { - cb_gatts_register_app, - cb_gatts_connection, - cb_gatts_service_added, - cb_gatts_included_service_added, - cb_gatts_characteristic_added, - cb_gatts_descriptor_added, - cb_gatts_service_started, - cb_gatts_service_stopped, - cb_gatts_service_deleted, - cb_indication_confirmation, - cb_gatts_request_read, - cb_gatts_request_write, - NULL, /*cb_gatts_request_exec_write,*/ - cb_gatts_response_confirmation, - cb_gatts_listen, - cb_gatts_multi_adv_enable, - cb_gatts_multi_adv_update, - cb_gatts_multi_adv_set_inst_data, - cb_gatts_multi_adv_disable, - cb_gatts_mtu_changed, + .register_server_cb = cb_gatts_register_app, + .connection_cb = cb_gatts_connection, + .service_added_cb = cb_gatts_service_added, + .included_service_added_cb = cb_gatts_included_service_added, + .characteristic_added_cb = cb_gatts_characteristic_added, + .descriptor_added_cb = cb_gatts_descriptor_added, + .service_started_cb = cb_gatts_service_started, + .service_stopped_cb = cb_gatts_service_stopped, + .service_deleted_cb = cb_gatts_service_deleted, + .indication_confirmation_cb = cb_indication_confirmation, + .request_read_cb = cb_gatts_request_read, + .request_write_cb = cb_gatts_request_write, + .request_exec_write_cb = NULL, + .response_confirmation_cb = cb_gatts_response_confirmation, + .listen_cb = cb_gatts_listen, + .multi_adv_enable_cb = cb_gatts_multi_adv_enable, + .multi_adv_update_cb = cb_gatts_multi_adv_update, + .multi_adv_data_cb = cb_gatts_multi_adv_set_inst_data, + .multi_adv_disable_cb = cb_gatts_multi_adv_disable, + .mtu_changed_cb = cb_gatts_mtu_changed, #ifdef TIZEN_BT_HAL - cb_notifcation_changed, + .notif_enabled_cb = cb_notifcation_changed, #endif - cb_gatts_acquire_write, - cb_gatts_acquire_notify + .request_acquire_write_cb = cb_gatts_acquire_write, + .request_acquire_notify_cb = cb_gatts_acquire_notify }; /* Forward declaration for GATT client callbacks */ @@ -216,34 +216,34 @@ static void cb_gattc_notify(int conn_id, btgatt_notify_params_t *p_data); /*TODO GATT CLient callbacks will be implemented in subsequent patches */ static const btgatt_client_callbacks_t btgatt_client_callbacks = { - cb_gattc_register_app, - cb_gattc_scan_result, - cb_gattc_connection, /*cb_gattc_connection*/ - cb_gattc_disconnect, /*cb_gattc_disconnect*/ - cb_gattc_search_complete, /*cb_gattc_search_complete*/ - cb_gattc_search_result, /*cb_gattc_search_result*/ - cb_gattc_get_characteristics, /*cb_gattc_get_characteristics*/ - cb_gattc_get_descriptor, /*cb_gattc_get_descriptor*/ - NULL, /*cb_gattc_get_included_service*/ - cb_gattc_register_for_notification, /*cb_gattc_register_for_notification*/ - cb_gattc_notify, /*cb_gattc_notify*/ - cb_gattc_read_characteristic, /*cb_gattc_read_characteristic*/ - cb_gattc_write_characteristic, /*cb_gattc_write_characteristic*/ - cb_gattc_read_descriptor, /*cb_gattc_read_descriptor*/ - cb_gattc_write_descriptor, /*cb_gattc_write_descriptor*/ - NULL, /*cb_gattc_execute_write*/ - NULL, /*cb_gattc_remote_rssi*/ - NULL, /*cb_gattc_configure_mtu_cmpl*/ + .register_client_cb = cb_gattc_register_app, + .scan_result_cb = cb_gattc_scan_result, + .open_cb = cb_gattc_connection, + .close_cb = cb_gattc_disconnect, + .search_complete_cb = cb_gattc_search_complete, + .search_result_cb = cb_gattc_search_result, + .get_characteristic_cb = cb_gattc_get_characteristics, + .get_descriptor_cb = cb_gattc_get_descriptor, + .get_included_service_cb = NULL, + .register_for_notification_cb = cb_gattc_register_for_notification, + .notify_cb = cb_gattc_notify, + .read_characteristic_cb = cb_gattc_read_characteristic, + .write_characteristic_cb = cb_gattc_write_characteristic, + .read_descriptor_cb = cb_gattc_read_descriptor, + .write_descriptor_cb = cb_gattc_write_descriptor, + .execute_write_cb = NULL, + .read_remote_rssi_cb = NULL, + .configure_mtu_cb = NULL, #ifdef PLATFORM_ANDROID_HAL - NULL, /*cb_scan_filter_cfg*/ - NULL, /*cb_scan_filter_param*/ - NULL, /*cb_scan_filter_status*/ - NULL, /*cb_congestion*/ - NULL, /*cb_batchscan_cfg_storag*/ - NULL, /*cb_batchscan_enb_disable*/ - NULL, /*cb_batchscan_reports*/ - NULL, /*cb_batchscan_threshold*/ - NULL, /*cb_track_adv_event*/ + .scan_filter_cfg_cb = NULL, + .scan_filter_param_cb = NULL, + .scan_filter_status_cb = NULL, + .congestion_cb = NULL, + .batchscan_cfg_storage_cb = NULL, + .batchscan_enb_disable_cb = NULL, + .batchscan_reports_cb = NULL, + .batchscan_threshold_cb = NULL, + .track_adv_event_cb = NULL, #endif }; diff --git a/bt-oal/oal-hfp.c b/bt-oal/oal-hfp.c index 6516245..7e1dee8 100644 --- a/bt-oal/oal-hfp.c +++ b/bt-oal/oal-hfp.c @@ -50,24 +50,24 @@ const bt_interface_t * _bt_get_stack_interface(void); static const bthf_interface_t *blued_hfp_interface = NULL; static bthf_callbacks_t blued_hf_cb = { - sizeof(blued_hf_cb), - cb_hfp_connection_state, - cb_hfp_audio_connection_state, - NULL, /* vr_cmd_cb */ - NULL, /* answer_call_cmd_cb */ - NULL, /* hangup_call_cmd_cb */ - NULL, /* volume_cmd_cb */ - NULL, /* dial_call_cmd_cb */ - NULL, /* dtmf_cmd_cb */ - NULL, /* nrec_cmd_cb */ - NULL, /* wbs_cb */ - NULL, /* chld_cmd_cb */ - NULL, /* cnum_cmd_cb */ - NULL, /* cind_cmd_cb */ - NULL, /* cops_cmd_cb */ - NULL, /* clcc_cmd_cb */ - NULL, /* unknown_at_cmd_cb */ - NULL /* key_pressed_cmd_cb */ + .size = sizeof(blued_hf_cb), + .connection_state_cb = cb_hfp_connection_state, + .audio_state_cb = cb_hfp_audio_connection_state, + .vr_cmd_cb = NULL, + .answer_call_cmd_cb = NULL, + .hangup_call_cmd_cb = NULL, + .volume_cmd_cb = NULL, + .dial_call_cmd_cb = NULL, + .dtmf_cmd_cb = NULL, + .nrec_cmd_cb = NULL, + .wbs_cb = NULL, + .chld_cmd_cb = NULL, + .cnum_cmd_cb = NULL, + .cind_cmd_cb = NULL, + .cops_cmd_cb = NULL, + .clcc_cmd_cb = NULL, + .unknown_at_cmd_cb = NULL, + .key_pressed_cmd_cb = NULL }; oal_status_t hfp_enable(int max_hf_clients_supported) diff --git a/bt-oal/oal-hid-host.c b/bt-oal/oal-hid-host.c index eb95e46..94a90ba 100755 --- a/bt-oal/oal-hid-host.c +++ b/bt-oal/oal-hid-host.c @@ -50,14 +50,14 @@ static void handshake_callback(bt_bdaddr_t *bd_addr, bthh_status_t hh_status); static const bthh_interface_t * hid_api; static bthh_callbacks_t sBluetoothHidCallbacks = { - sizeof(sBluetoothHidCallbacks), - connection_state_callback, - hid_info_callback, - get_protocol_mode_callback, - idle_time_callback, - get_report_callback, - virtual_unplug_callback, - handshake_callback, + .size = sizeof(sBluetoothHidCallbacks), + .connection_state_cb = connection_state_callback, + .hid_info_cb = hid_info_callback, + .protocol_mode_cb = get_protocol_mode_callback, + .idle_time_cb = idle_time_callback, + .get_report_cb = get_report_callback, + .virtual_unplug_cb = virtual_unplug_callback, + .handshake_cb = handshake_callback, }; oal_status_t hid_enable(void)