#endif // PAN
#endif // BNEP Included
-
//AVDT and its profiles
#if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE)
A2D_Init();
memset((void *)bta_dm_di_cb_ptr, 0, sizeof(tBTA_DM_DI_CB));
//memset((void *)bta_prm_cb_ptr, 0, sizeof(tBTA_PRM_CB));
//memset((void *)bta_ag_cb_ptr, 0, sizeof(tBTA_AG_CB));
+#if (defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE)
+ if ((bta_jv_cb_ptr = (tBTA_JV_CB *)osi_malloc(sizeof(tBTA_JV_CB))) == NULL) {
+ return;
+ }
+ memset((void *)bta_jv_cb_ptr, 0, sizeof(tBTA_JV_CB));
+#endif //JV
#if BTA_HS_INCLUDED == TRUE
memset((void *)bta_hs_cb_ptr, 0, sizeof(tBTA_HS_CB));
#endif
#if BTA_HH_INCLUDED==TRUE
if ((bta_hh_cb_ptr = (tBTA_HH_CB *)osi_malloc(sizeof(tBTA_HH_CB))) == NULL) {
return;
- }
+ }
memset((void *)bta_hh_cb_ptr, 0, sizeof(tBTA_HH_CB));
#endif
#if BTA_HL_INCLUDED==TRUE
#endif // BTA_INCLUDED == TRUE
}
+
+/*****************************************************************************
+**
+** Function BTE_DeinitStack
+**
+** Description Deinitialize control block memory for each component.
+**
+** Note: This API must be called
+** after freeing the BTU Task.
+**
+** Returns void
+**
+******************************************************************************/
+void BTE_DeinitStack(void)
+{
+ //BTA Modules
+#if (BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE)
+#if GATTS_INCLUDED == TRUE
+ osi_free(bta_gatts_cb_ptr);
+ bta_gatts_cb_ptr = NULL;
+#endif
+#if GATTC_INCLUDED==TRUE
+ osi_free(bta_gattc_cb_ptr);
+ bta_gattc_cb_ptr = NULL;
+#endif
+#if BTA_HH_INCLUDED==TRUE
+ osi_free(bta_hh_cb_ptr);
+ bta_hh_cb_ptr = NULL;
+#endif
+#if BTA_AV_INCLUDED==TRUE
+ osi_free(bta_av_cb_ptr);
+ bta_av_cb_ptr = NULL;
+#endif
+#if BTA_AR_INCLUDED==TRUE
+ osi_free(bta_ar_cb_ptr);
+ bta_ar_cb_ptr = NULL;
+#endif
+#if BTA_SDP_INCLUDED == TRUE
+ osi_free(bta_sdp_cb_ptr);
+ bta_sdp_cb_ptr = NULL;
+#endif
+#if (defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE)
+ osi_free(bta_jv_cb_ptr);
+ bta_jv_cb_ptr = NULL;
+#endif //JV
+ osi_free(bta_dm_di_cb_ptr);
+ bta_dm_di_cb_ptr = NULL;
+ osi_free(bta_dm_search_cb_ptr);
+ bta_dm_search_cb_ptr = NULL;
+ osi_free(bta_dm_cb_ptr);
+ bta_dm_cb_ptr = NULL;
+ osi_free(bta_sys_cb_ptr);
+ bta_sys_cb_ptr = NULL;
+#endif // BTA_INCLUDED == TRUE
+
+#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE && AVCT_DYNAMIC_MEMORY == TRUE)
+ osi_free(avct_cb_ptr);
+ avct_cb_ptr = NULL;
+#endif
+
+#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE && AVDT_DYNAMIC_MEMORY == TRUE)
+ osi_free(avdt_cb_ptr);
+ avdt_cb_ptr = NULL;
+#endif
+
+#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
+ AVRC_Deinit();
+#endif
+
+#if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE)
+ A2D_Deinit();
+#endif
+}
\ No newline at end of file
*******************************************************************************/
extern void AVRC_Init(void);
+/*******************************************************************************
+**
+** Function AVRC_Deinit
+**
+** Description This function is called at stack shotdown to free the
+** control block (if using dynamic memory), and deinitializes the
+** control block and tracing level.
+**
+** Returns void
+**
+*******************************************************************************/
+extern void AVRC_Deinit(void);
+
/*******************************************************************************
**
** Function AVRC_ParsCommand