bta_hl_co.h revision cc914cffd521b2e6e1be804c82aea2388b843ebf
1/***************************************************************************** 2** 3** Name: bta_hl_co.h 4** 5** Description: This is the interface file for the HL (HeaLth device profile) 6** subsystem call-out functions. 7** 8** Copyright (c) 2009, Broadcom Corp., All Rights Reserved. 9** Broadcom Bluetooth Core. Proprietary and confidential. 10** 11*****************************************************************************/ 12#ifndef BTA_HL_CO_H 13#define BTA_HL_CO_H 14 15#include "bta_api.h" 16#include "bta_hl_api.h" 17 18/***************************************************************************** 19** Constants and Data Types 20*****************************************************************************/ 21/************************** 22** Common Definitions 23***************************/ 24 25 26/******************************************************************************* 27** 28** Function bta_hl_co_get_num_of_mdep 29** 30** Description This function is called to get the number of MDEPs for this 31** application ID 32** 33** Parameters app_id - application ID 34** p_num_of_mdep (output) - number of MDEP configurations supported 35** by the application 36** 37** Returns Bloolean - TRUE success 38** 39*******************************************************************************/ 40BTA_API extern BOOLEAN bta_hl_co_get_num_of_mdep(UINT8 app_id, UINT8 *p_num_of_mdep); 41/******************************************************************************* 42** 43** Function bta_hl_co_advrtise_source_sdp 44** 45** Description This function is called to find out whether the SOURCE MDEP 46** configuration information should be advertize in the SDP or nopt 47** 48** Parameters app_id - application ID 49** 50** Returns Bloolean - TRUE advertise the SOURCE MDEP configuration 51** information 52** 53*******************************************************************************/ 54BTA_API extern BOOLEAN bta_hl_co_advrtise_source_sdp(UINT8 app_id); 55/******************************************************************************* 56** 57** Function bta_hl_co_get_mdep_config 58** 59** Description This function is called to get the supported feature 60** configuration for the specified mdep index and it also assigns 61** the MDEP ID for the specified mdep index 62** 63** Parameters app_id - HDP application ID 64** mdep_idx - the mdep index 65** mdep_id - the assigned MDEP ID for the specified medp_idx 66** p_mdl_cfg (output) - pointer to the MDEP configuration 67** 68** 69** Returns Bloolean - TRUE success 70*******************************************************************************/ 71BTA_API extern BOOLEAN bta_hl_co_get_mdep_config(UINT8 app_id, 72 UINT8 mdep_idx, 73 tBTA_HL_MDEP_ID mdep_id, 74 tBTA_HL_MDEP_CFG *p_mdep_cfg); 75 76 77/******************************************************************************* 78** 79** Function bta_hl_co_get_echo_config 80** 81** Description This function is called to get the echo test 82** maximum APDU size configuration 83** 84** Parameters app_id - HDP application ID 85** p_echo_cfg (output) - pointer to the Echo test maximum APDU size 86** configuration 87** 88** Returns Bloolean - TRUE success 89*******************************************************************************/ 90BTA_API extern BOOLEAN bta_hl_co_get_echo_config(UINT8 app_id, 91 tBTA_HL_ECHO_CFG *p_echo_cfg); 92 93 94/******************************************************************************* 95** 96** Function bta_hl_co_save_mdl 97** 98** Description This function is called to save a MDL configuration item in persistent 99** storage 100** 101** Parameters app_id - HDP application ID 102** item_idx - the MDL configuration storage index 103** p_mdl_cfg - pointer to the MDL configuration data 104** 105** Returns void 106** 107*******************************************************************************/ 108BTA_API extern void bta_hl_co_save_mdl(UINT8 app_id, UINT8 item_idx, tBTA_HL_MDL_CFG *p_mdl_cfg ); 109/******************************************************************************* 110** 111** Function bta_hl_co_delete_mdl 112** 113** Description This function is called to delete a MDL configuration item in persistent 114** storage 115** 116** Parameters app_id - HDP application ID 117** item_idx - the MDL configuration storage index 118** 119** Returns void 120** 121*******************************************************************************/ 122BTA_API extern void bta_hl_co_delete_mdl(UINT8 app_id, UINT8 item_idx); 123/******************************************************************************* 124** 125** Function bta_hl_co_get_mdl_config 126** 127** Description This function is called to get the MDL configuration 128** from teh persistent memory. This function shall only be called 129*8 once after the device is powered up 130** 131** Parameters app_id - HDP application ID 132** buffer_size - the unit of the buffer size is sizeof(tBTA_HL_MDL_CFG) 133** p_mdl_buf - Point to the starting location of the buffer 134** 135** Returns BOOLEAN 136** 137** 138*******************************************************************************/ 139BTA_API extern BOOLEAN bta_hl_co_load_mdl_config (UINT8 app_id, UINT8 buffer_size, 140 tBTA_HL_MDL_CFG *p_mdl_buf ); 141 142 143/******************************************************************************* 144** 145** Function bta_hl_co_get_tx_data 146** 147** Description Get the data to be sent 148** 149** Parameters app_id - HDP application ID 150** mdl_handle - MDL handle 151** buf_size - the size of the buffer 152** p_buf - the buffer pointer 153** evt - the evt to be passed back to the HL in the 154** bta_hl_ci_get_tx_data call-in function 155** 156** Returns Void 157** 158*******************************************************************************/ 159BTA_API extern void bta_hl_co_get_tx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_handle, 160 UINT16 buf_size, UINT8 *p_buf, UINT16 evt); 161 162 163/******************************************************************************* 164** 165** Function bta_hl_co_put_rx_data 166** 167** Description Put the received data 168** 169** Parameters app_id - HDP application ID 170** mdl_handle - MDL handle 171** data_size - the size of the data 172** p_data - the data pointer 173** evt - the evt to be passed back to the HL in the 174** bta_hl_ci_put_rx_data call-in function 175** 176** Returns Void 177** 178*******************************************************************************/ 179BTA_API extern void bta_hl_co_put_rx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_handle, 180 UINT16 data_size, UINT8 *p_data, UINT16 evt); 181/******************************************************************************* 182** 183** Function bta_hl_co_get_tx_data 184** 185** Description Get the Echo data to be sent 186** 187** Parameters app_id - HDP application ID 188** mcl_handle - MCL handle 189** buf_size - the size of the buffer 190** p_buf - the buffer pointer 191** evt - the evt to be passed back to the HL in the 192** bta_hl_ci_get_tx_data call-in function 193** 194** Returns Void 195** 196*******************************************************************************/ 197BTA_API extern void bta_hl_co_get_echo_data (UINT8 app_id, tBTA_HL_MCL_HANDLE mcl_handle, 198 UINT16 buf_size, UINT8 *p_buf, UINT16 evt); 199 200/******************************************************************************* 201** 202** Function bta_hl_co_put_echo_data 203** 204** Description Put the received loopback echo data 205** 206** Parameters app_id - HDP application ID 207** mcl_handle - MCL handle 208** data_size - the size of the data 209** p_data - the data pointer 210** evt - the evt to be passed back to the HL in the 211** bta_hl_ci_put_echo_data call-in function 212** 213** Returns Void 214** 215*******************************************************************************/ 216BTA_API extern void bta_hl_co_put_echo_data (UINT8 app_id, tBTA_HL_MCL_HANDLE mcl_handle, 217 UINT16 data_size, UINT8 *p_data, UINT16 evt); 218 219#endif /* BTA_HL_CO_H */ 220