llcp_api.h revision 5c65c3a0f42e174e47fecd4e569606003217ff4e
1/****************************************************************************** 2 * 3 * Copyright (C) 2010-2013 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 20/****************************************************************************** 21 * 22 * This file contains the LLCP API definitions 23 * 24 ******************************************************************************/ 25#ifndef LLCP_API_H 26#define LLCP_API_H 27 28#include "nfc_target.h" 29#include "llcp_defs.h" 30 31/***************************************************************************** 32** Constants 33*****************************************************************************/ 34#define LLCP_STATUS_SUCCESS 0 /* Successfully done */ 35#define LLCP_STATUS_FAIL 1 /* Failed without specific reason */ 36#define LLCP_STATUS_CONGESTED 2 /* Data link is congested */ 37 38typedef UINT8 tLLCP_STATUS; 39 40#define LLCP_MIN_OFFSET (NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE + LLCP_PDU_HEADER_SIZE + LLCP_SEQUENCE_SIZE) 41 42#define LLCP_INVALID_SAP 0xFF /* indication of failure to allocate data link resource */ 43 44/***************************************************************************** 45** Type Definitions 46*****************************************************************************/ 47typedef struct 48{ 49 BOOLEAN is_initiator; /* TRUE if we are POLL mode */ 50 UINT8 max_payload_size; /* 64, 128, 192 or 254 */ 51 UINT8 waiting_time; 52 UINT8 *p_gen_bytes; 53 UINT8 gen_bytes_len; 54} tLLCP_ACTIVATE_CONFIG; 55 56typedef struct 57{ 58 UINT16 miu; /* Local receiving MIU */ 59 UINT8 rw; /* Local receiving window */ 60 char sn[LLCP_MAX_SN_LEN + 1]; /* Service name to connect */ 61} tLLCP_CONNECTION_PARAMS; 62 63/********************************* 64** Callback Functions Prototypes 65**********************************/ 66 67/* Link Management Callback Events */ 68 69#define LLCP_LINK_ACTIVATION_FAILED_EVT 0x00 /* Fail to activate link */ 70#define LLCP_LINK_ACTIVATION_COMPLETE_EVT 0x01 /* LLCP Link is activated */ 71#define LLCP_LINK_DEACTIVATED_EVT 0x02 /* LLCP Link is deactivated */ 72 73/* Link Management Callback Reasons */ 74 75#define LLCP_LINK_SUCCESS 0x00 /* Success */ 76#define LLCP_LINK_VERSION_FAILED 0x01 /* Failed to agree version */ 77#define LLCP_LINK_BAD_GEN_BYTES 0x02 /* Failed to parse received general bytes */ 78#define LLCP_LINK_INTERNAL_ERROR 0x03 /* internal error */ 79#define LLCP_LINK_LOCAL_INITIATED 0x04 /* Link has been deactivated by local */ 80#define LLCP_LINK_REMOTE_INITIATED 0x05 /* Link has been deactivated by remote */ 81#define LLCP_LINK_TIMEOUT 0x06 /* Link has been deactivated by timeout */ 82#define LLCP_LINK_FRAME_ERROR 0x07 /* Link has been deactivated by frame error */ 83#define LLCP_LINK_RF_LINK_LOSS_NO_RX_LLC 0x08 /* RF link loss without any rx LLC PDU */ 84#define LLCP_LINK_RF_TRANSMISSION_ERR NFC_STATUS_RF_TRANSMISSION_ERR 85#define LLCP_LINK_RF_PROTOCOL_ERR NFC_STATUS_RF_PROTOCOL_ERR 86#define LLCP_LINK_RF_TIMEOUT NFC_STATUS_TIMEOUT 87#define LLCP_LINK_RF_LINK_LOSS_ERR NFC_STATUS_LINK_LOSS 88 89typedef void (tLLCP_LINK_CBACK) (UINT8 event, UINT8 reason); 90 91/* Minimum length of Gen Bytes for LLCP */ 92/* In CE4 low power mode, NFCC can store up to 21 bytes */ 93#define LLCP_MIN_GEN_BYTES 20 94 95/* Service Access Point (SAP) Callback Events */ 96 97#define LLCP_SAP_EVT_DATA_IND 0x00 /* Received data on SAP */ 98#define LLCP_SAP_EVT_CONNECT_IND 0x01 /* Connection request from peer */ 99#define LLCP_SAP_EVT_CONNECT_RESP 0x02 /* Connection accepted by peer */ 100#define LLCP_SAP_EVT_DISCONNECT_IND 0x03 /* Received disconnect request */ 101#define LLCP_SAP_EVT_DISCONNECT_RESP 0x04 /* Received disconnect response */ 102#define LLCP_SAP_EVT_CONGEST 0x05 /* congested status is changed */ 103#define LLCP_SAP_EVT_LINK_STATUS 0x06 /* Change of LLCP Link status */ 104#define LLCP_SAP_EVT_TX_COMPLETE 0x07 /* tx queue is empty and all PDU is acked */ 105 106#define LLCP_LINK_TYPE_LOGICAL_DATA_LINK 0x01 107#define LLCP_LINK_TYPE_DATA_LINK_CONNECTION 0x02 108 109typedef struct 110{ 111 UINT8 event; /* LLCP_SAP_EVT_DATA_IND */ 112 UINT8 local_sap; /* SAP of local device */ 113 UINT8 remote_sap; /* SAP of remote device */ 114 UINT8 link_type; /* link type */ 115} tLLCP_SAP_DATA_IND; 116 117typedef struct 118{ 119 UINT8 event; /* LLCP_SAP_EVT_CONNECT_IND */ 120 UINT8 server_sap; /* SAP of local server */ 121 UINT8 local_sap; /* SAP of local device */ 122 UINT8 remote_sap; /* SAP of remote device */ 123 UINT16 miu; /* MIU of peer device */ 124 UINT8 rw; /* RW of peer device */ 125 char *p_service_name; /* Service name (only for SDP) */ 126} tLLCP_SAP_CONNECT_IND; 127 128typedef struct 129{ 130 UINT8 event; /* LLCP_SAP_EVT_CONNECT_RESP */ 131 UINT8 local_sap; /* SAP of local device */ 132 UINT8 remote_sap; /* SAP of remote device */ 133 UINT16 miu; /* MIU of peer device */ 134 UINT8 rw; /* RW of peer device */ 135} tLLCP_SAP_CONNECT_RESP; 136 137#define LLCP_SAP_DISCONNECT_REASON_TIMEOUT 0x80 138typedef struct 139{ 140 UINT8 event; /* LLCP_SAP_EVT_DISCONNECT_IND */ 141 UINT8 local_sap; /* SAP of local device */ 142 UINT8 remote_sap; /* SAP of remote device */ 143} tLLCP_SAP_DISCONNECT_IND; 144 145typedef struct 146{ 147 UINT8 event; /* LLCP_SAP_EVT_DISCONNECT_RESP */ 148 UINT8 local_sap; /* SAP of local device */ 149 UINT8 remote_sap; /* SAP of remote device */ 150 UINT8 reason; /* Reason of DM PDU if not timeout */ 151} tLLCP_SAP_DISCONNECT_RESP; 152 153typedef struct 154{ 155 UINT8 event; /* LLCP_SAP_EVT_CONGEST */ 156 UINT8 local_sap; /* SAP of local device */ 157 UINT8 remote_sap; /* SAP of remote device */ 158 BOOLEAN is_congested; /* TRUE if congested */ 159 UINT8 link_type; /* congested link type */ 160} tLLCP_SAP_CONGEST; 161 162typedef struct 163{ 164 UINT8 event; /* LLCP_SAP_EVT_LINK_STATUS */ 165 UINT8 local_sap; /* SAP of local device */ 166 BOOLEAN is_activated; /* TRUE if LLCP link is activated */ 167 BOOLEAN is_initiator; /* TRUE if local LLCP is initiator */ 168} tLLCP_SAP_LINK_STATUS; 169 170typedef struct 171{ 172 UINT8 event; /* LLCP_SAP_EVT_TX_COMPLETE */ 173 UINT8 local_sap; /* SAP of local device */ 174 UINT8 remote_sap; /* SAP of remote device */ 175} tLLCP_SAP_TX_COMPLETE; 176 177typedef struct 178{ 179 UINT8 event; /* event */ 180 UINT8 local_sap; /* SAP of local device */ 181} tLLCP_SAP_HEADER; 182 183typedef union 184{ 185 tLLCP_SAP_HEADER hdr; /* common header */ 186 tLLCP_SAP_DATA_IND data_ind; /* LLCP_SAP_EVT_DATA_IND */ 187 tLLCP_SAP_CONNECT_IND connect_ind; /* LLCP_SAP_EVT_CONNECT_IND */ 188 tLLCP_SAP_CONNECT_RESP connect_resp; /* LLCP_SAP_EVT_CONNECT_RESP */ 189 tLLCP_SAP_DISCONNECT_IND disconnect_ind; /* LLCP_SAP_EVT_DISCONNECT_IND */ 190 tLLCP_SAP_DISCONNECT_RESP disconnect_resp; /* LLCP_SAP_EVT_DISCONNECT_RESP */ 191 tLLCP_SAP_CONGEST congest; /* LLCP_SAP_EVT_CONGEST */ 192 tLLCP_SAP_LINK_STATUS link_status; /* LLCP_SAP_EVT_LINK_STATUS */ 193 tLLCP_SAP_TX_COMPLETE tx_complete; /* LLCP_SAP_EVT_TX_COMPLETE */ 194} tLLCP_SAP_CBACK_DATA; 195 196typedef void (tLLCP_APP_CBACK) (tLLCP_SAP_CBACK_DATA *p_data); 197 198/* Service Discovery Callback */ 199 200typedef void (tLLCP_SDP_CBACK) (UINT8 tid, UINT8 remote_sap); 201 202/* LLCP DTA Callback - notify DTA responded SNL for connectionless echo service */ 203 204typedef void (tLLCP_DTA_CBACK) (void); 205 206/***************************************************************************** 207** External Function Declarations 208*****************************************************************************/ 209#ifdef __cplusplus 210extern "C" 211{ 212#endif 213 214/******************************************************************************* 215** 216** Function LLCP_SetConfig 217** 218** Description Set configuration parameters for LLCP 219** - Local Link MIU 220** - Option parameter 221** - Waiting Time Index 222** - Local Link Timeout 223** - Inactivity Timeout as initiator role 224** - Inactivity Timeout as target role 225** - Delay SYMM response 226** - Data link connection timeout 227** - Delay timeout to send first PDU as initiator 228** 229** Returns void 230** 231*******************************************************************************/ 232LLCP_API extern void LLCP_SetConfig (UINT16 link_miu, 233 UINT8 opt, 234 UINT8 wt, 235 UINT16 link_timeout, 236 UINT16 inact_timeout_init, 237 UINT16 inact_timeout_target, 238 UINT16 symm_delay, 239 UINT16 data_link_timeout, 240 UINT16 delay_first_pdu_timeout); 241 242/******************************************************************************* 243** 244** Function LLCP_GetConfig 245** 246** Description Get configuration parameters for LLCP 247** - Local Link MIU 248** - Option parameter 249** - Response Waiting Time Index 250** - Local Link Timeout 251** - Inactivity Timeout as initiator role 252** - Inactivity Timeout as target role 253** - Delay SYMM response 254** - Data link connection timeout 255** - Delay timeout to send first PDU as initiator 256** 257** Returns void 258** 259*******************************************************************************/ 260LLCP_API extern void LLCP_GetConfig (UINT16 *p_link_miu, 261 UINT8 *p_opt, 262 UINT8 *p_wt, 263 UINT16 *p_link_timeout, 264 UINT16 *p_inact_timeout_init, 265 UINT16 *p_inact_timeout_target, 266 UINT16 *p_symm_delay, 267 UINT16 *p_data_link_timeout, 268 UINT16 *p_delay_first_pdu_timeout); 269 270/******************************************************************************* 271** 272** Function LLCP_GetDiscoveryConfig 273** 274** Description Returns discovery config for LLCP MAC link activation 275** This function is called to get general bytes for NFC_PMID_ATR_REQ_GEN_BYTES 276** or NFC_PMID_ATR_RES_GEN_BYTES before starting discovery. 277** 278** wt:Waiting time 0 - 8, only for listen 279** p_gen_bytes: pointer to store LLCP magic number and paramters 280** p_gen_bytes_len: length of buffer for gen bytes as input 281** (NOTE:it must be bigger than LLCP_MIN_GEN_BYTES) 282** actual gen bytes size as output 283** 284** Restrictions on the use of ISO 18092 285** 1. The DID features shall not be used. 286** 2. the NAD features shall not be used. 287** 3. Frame waiting time extentions (WTX) shall not be used. 288** 289** Returns None 290** 291*******************************************************************************/ 292LLCP_API extern void LLCP_GetDiscoveryConfig (UINT8 *p_wt, 293 UINT8 *p_gen_bytes, 294 UINT8 *p_gen_bytes_len); 295 296/******************************************************************************* 297** 298** Function LLCP_ActivateLink 299** 300** Description This function will activate LLCP link with LR, WT and Gen Bytes 301** in activation NTF from NFCC. 302** 303** LLCP_LINK_ACTIVATION_COMPLETE_EVT will be returned through 304** callback function if successful. 305** Otherwise, LLCP_LINK_ACTIVATION_FAILED_EVT will be returned. 306** 307** Returns LLCP_STATUS_SUCCESS if success 308** 309*******************************************************************************/ 310LLCP_API extern tLLCP_STATUS LLCP_ActivateLink (tLLCP_ACTIVATE_CONFIG config, 311 tLLCP_LINK_CBACK *p_link_cback); 312 313/******************************************************************************* 314** 315** Function LLCP_DeactivateLink 316** 317** Description Deactivate LLCP link 318** 319** LLCP_LINK_DEACTIVATED_EVT will be returned through callback 320** when LLCP link is deactivated. Then NFC link may be deactivated. 321** 322** Returns LLCP_STATUS_SUCCESS if success 323** 324*******************************************************************************/ 325LLCP_API extern tLLCP_STATUS LLCP_DeactivateLink (void); 326 327/******************************************************************************* 328** 329** Function LLCP_RegisterServer 330** 331** Description Register server and callback function 332** 333** reg_sap : Well-Known SAP except LM and SDP (0x02 - 0x0F) 334** Advertized by SDP (0x10 - 0x1F) 335** LLCP_INVALID_SAP, LLCP will allocate between 0x10 and 0x1F 336** link_type : LLCP_LINK_TYPE_LOGICAL_DATA_LINK 337** and/or LLCP_LINK_TYPE_DATA_LINK_CONNECTION 338** p_service_name : Null-terminated string up to LLCP_MAX_SN_LEN 339** 340** Returns SAP between 0x02 and 0x1F, if success 341** LLCP_INVALID_SAP, otherwise 342** 343*******************************************************************************/ 344LLCP_API extern UINT8 LLCP_RegisterServer (UINT8 reg_sap, 345 UINT8 link_type, 346 char *p_service_name, 347 tLLCP_APP_CBACK *p_sap_cback); 348 349/******************************************************************************* 350** 351** Function LLCP_RegisterClient 352** 353** Description Register client and callback function 354** 355** link_type : LLCP_LINK_TYPE_LOGICAL_DATA_LINK 356** and/or LLCP_LINK_TYPE_DATA_LINK_CONNECTION 357** 358** Returns SAP between 0x20 and 0x3F, if success 359** LLCP_INVALID_SAP, otherwise 360** 361*******************************************************************************/ 362LLCP_API extern UINT8 LLCP_RegisterClient (UINT8 link_type, 363 tLLCP_APP_CBACK *p_sap_cback); 364 365/******************************************************************************* 366** 367** Function LLCP_Deregister 368** 369** Description Deregister server or client 370** 371** 372** Returns LLCP_STATUS_SUCCESS if success 373** 374*******************************************************************************/ 375LLCP_API extern tLLCP_STATUS LLCP_Deregister (UINT8 sap); 376 377/******************************************************************************* 378** 379** Function LLCP_IsLogicalLinkCongested 380** 381** Description Check if logical link is congested 382** 383** 384** Returns TRUE if congested 385** 386*******************************************************************************/ 387LLCP_API extern BOOLEAN LLCP_IsLogicalLinkCongested (UINT8 local_sap, 388 UINT8 num_pending_ui_pdu, 389 UINT8 total_pending_ui_pdu, 390 UINT8 total_pending_i_pdu); 391 392/******************************************************************************* 393** 394** Function LLCP_SendUI 395** 396** Description Send connnectionless data to DSAP 397** 398** 399** Returns LLCP_STATUS_SUCCESS if success 400** LLCP_STATUS_CONGESTED if logical link is congested 401** LLCP_STATUS_FAIL, otherwise 402** 403*******************************************************************************/ 404LLCP_API extern tLLCP_STATUS LLCP_SendUI (UINT8 ssap, UINT8 dsap, BT_HDR *p_buf); 405 406/******************************************************************************* 407** 408** Function LLCP_ReadLogicalLinkData 409** 410** Description Read information of UI PDU for local SAP 411** 412** - Remote SAP who sent UI PDU is returned. 413** - Information of UI PDU up to max_data_len is copied into p_data. 414** - Information of next UI PDU is not concatenated. 415** - Recommended max_data_len is link MIU of local device 416** 417** Returns TRUE if more information of UI PDU or more UI PDU in queue 418** 419*******************************************************************************/ 420LLCP_API extern BOOLEAN LLCP_ReadLogicalLinkData (UINT8 local_sap, 421 UINT32 max_data_len, 422 UINT8 *p_remote_sap, 423 UINT32 *p_data_len, 424 UINT8 *p_data); 425 426/******************************************************************************* 427** 428** Function LLCP_FlushLogicalLinkRxData 429** 430** Description Discard received data in logical data link of local SAP 431** 432** 433** Returns length of data flushed 434** 435*******************************************************************************/ 436LLCP_API extern UINT32 LLCP_FlushLogicalLinkRxData (UINT8 local_sap); 437 438/******************************************************************************* 439** 440** Function LLCP_ConnectReq 441** 442** Description Create data link connection between registered SAP and DSAP 443** in peer LLCP, 444** 445** 446** Returns LLCP_STATUS_SUCCESS if success 447** LLCP_STATUS_FAIL, otherwise 448** 449*******************************************************************************/ 450LLCP_API extern tLLCP_STATUS LLCP_ConnectReq (UINT8 reg_sap, UINT8 dsap, 451 tLLCP_CONNECTION_PARAMS *p_params); 452 453/******************************************************************************* 454** 455** Function LLCP_ConnectCfm 456** 457** Description Accept connection request from peer LLCP 458** 459** 460** Returns LLCP_STATUS_SUCCESS if success 461** LLCP_STATUS_FAIL, otherwise 462** 463*******************************************************************************/ 464LLCP_API extern tLLCP_STATUS LLCP_ConnectCfm (UINT8 local_sap, 465 UINT8 remote_sap, 466 tLLCP_CONNECTION_PARAMS *p_params); 467 468/******************************************************************************* 469** 470** Function LLCP_ConnectReject 471** 472** Description Reject connection request from peer LLCP 473** 474** reason : LLCP_SAP_DM_REASON_APP_REJECTED 475** LLCP_SAP_DM_REASON_PERM_REJECT_THIS 476** LLCP_SAP_DM_REASON_PERM_REJECT_ANY 477** LLCP_SAP_DM_REASON_TEMP_REJECT_THIS 478** LLCP_SAP_DM_REASON_TEMP_REJECT_ANY 479** 480** Returns LLCP_STATUS_SUCCESS if success 481** LLCP_STATUS_FAIL, otherwise 482** 483*******************************************************************************/ 484LLCP_API extern tLLCP_STATUS LLCP_ConnectReject (UINT8 local_sap, 485 UINT8 remote_sap, 486 UINT8 reason); 487 488/******************************************************************************* 489** 490** Function LLCP_IsDataLinkCongested 491** 492** Description Check if data link is congested 493** 494** 495** Returns TRUE if congested 496** 497*******************************************************************************/ 498LLCP_API extern BOOLEAN LLCP_IsDataLinkCongested (UINT8 local_sap, 499 UINT8 remote_sap, 500 UINT8 num_pending_i_pdu, 501 UINT8 total_pending_ui_pdu, 502 UINT8 total_pending_i_pdu); 503 504/******************************************************************************* 505** 506** Function LLCP_SendData 507** 508** Description Send connection-oriented data 509** 510** 511** Returns LLCP_STATUS_SUCCESS if success 512** LLCP_STATUS_CONGESTED if data link is congested 513** 514*******************************************************************************/ 515LLCP_API extern tLLCP_STATUS LLCP_SendData (UINT8 local_sap, 516 UINT8 remote_sap, 517 BT_HDR *p_buf); 518 519/******************************************************************************* 520** 521** Function LLCP_ReadDataLinkData 522** 523** Description Read information of I PDU for data link connection 524** 525** - Information of I PDU up to max_data_len is copied into p_data. 526** - Information of next I PDU is not concatenated. 527** - Recommended max_data_len is data link connection MIU of local 528** end point 529** 530** Returns TRUE if more data in queue 531** 532*******************************************************************************/ 533LLCP_API extern BOOLEAN LLCP_ReadDataLinkData (UINT8 local_sap, 534 UINT8 remote_sap, 535 UINT32 max_data_len, 536 UINT32 *p_data_len, 537 UINT8 *p_data); 538 539/******************************************************************************* 540** 541** Function LLCP_FlushDataLinkRxData 542** 543** Description Discard received data in data link connection 544** 545** 546** Returns length of rx data flushed 547** 548*******************************************************************************/ 549LLCP_API extern UINT32 LLCP_FlushDataLinkRxData (UINT8 local_sap, 550 UINT8 remote_sap); 551 552/******************************************************************************* 553** 554** Function LLCP_DisconnectReq 555** 556** Description Disconnect data link 557** discard any pending data if flush is set to TRUE 558** 559** Returns LLCP_STATUS_SUCCESS if success 560** 561*******************************************************************************/ 562LLCP_API extern tLLCP_STATUS LLCP_DisconnectReq (UINT8 local_sap, 563 UINT8 remote_sap, 564 BOOLEAN flush); 565 566/******************************************************************************* 567** 568** Function LLCP_SetTxCompleteNtf 569** 570** Description This function is called to get LLCP_SAP_EVT_TX_COMPLETE 571** when Tx queue is empty and all PDU is acked. 572** This is one time event, so upper layer shall call this function 573** again to get next LLCP_SAP_EVT_TX_COMPLETE. 574** 575** Returns LLCP_STATUS_SUCCESS if success 576** 577*******************************************************************************/ 578LLCP_API extern tLLCP_STATUS LLCP_SetTxCompleteNtf (UINT8 local_sap, 579 UINT8 remote_sap); 580 581/******************************************************************************* 582** 583** Function LLCP_SetLocalBusyStatus 584** 585** Description Set local busy status 586** 587** 588** Returns LLCP_STATUS_SUCCESS if success 589** 590*******************************************************************************/ 591LLCP_API extern tLLCP_STATUS LLCP_SetLocalBusyStatus (UINT8 local_sap, 592 UINT8 remote_sap, 593 BOOLEAN is_busy); 594 595/******************************************************************************* 596** 597** Function LLCP_GetRemoteWKS 598** 599** Description Return well-known service bitmap of connected device 600** 601** 602** Returns WKS bitmap if success 603** 604*******************************************************************************/ 605LLCP_API extern UINT16 LLCP_GetRemoteWKS (void); 606 607/******************************************************************************* 608** 609** Function LLCP_GetRemoteLSC 610** 611** Description Return link service class of connected device 612** 613** 614** Returns link service class 615** 616*******************************************************************************/ 617LLCP_API extern UINT8 LLCP_GetRemoteLSC (void); 618 619/******************************************************************************* 620** 621** Function LLCP_GetLinkMIU 622** 623** Description Return local and remote link MIU 624** 625** 626** Returns None 627** 628*******************************************************************************/ 629LLCP_API extern void LLCP_GetLinkMIU (UINT16 *p_local_link_miu, UINT16 *p_remote_link_miu); 630 631/******************************************************************************* 632** 633** Function LLCP_DiscoverService 634** 635** Description Return SAP of service name in connected device through callback 636** 637** 638** Returns LLCP_STATUS_SUCCESS if success 639** 640*******************************************************************************/ 641LLCP_API extern tLLCP_STATUS LLCP_DiscoverService (char *p_name, 642 tLLCP_SDP_CBACK *p_cback, 643 UINT8 *p_tid); 644 645/******************************************************************************* 646** 647** Function LLCP_SetTraceLevel 648** 649** Description This function sets the trace level for LLCP. If called with 650** a value of 0xFF, it simply returns the current trace level. 651** 652** Returns The new or current trace level 653** 654*******************************************************************************/ 655LLCP_API extern UINT8 LLCP_SetTraceLevel (UINT8 new_level); 656 657/******************************************************************************* 658** 659** Function LLCP_RegisterDtaCback 660** 661** Description Register callback function for LLCP DTA testing 662** 663** 664** Returns void 665** 666*******************************************************************************/ 667LLCP_API extern void LLCP_RegisterDtaCback (tLLCP_DTA_CBACK *p_dta_cback); 668 669#if (LLCP_TEST_INCLUDED == TRUE) 670/******************************************************************************* 671** 672** Function LLCP_SetTestParams 673** 674** Description Set test parameters for LLCP 675** 676** 677** Returns void 678** 679*******************************************************************************/ 680LLCP_API extern void LLCP_SetTestParams (UINT8 version, UINT16 wks); 681#endif 682 683#ifdef __cplusplus 684} 685#endif 686 687#endif /* LLCP_API_H */ 688 689