1 /****************************************************************************** 2 * 3 * Copyright (C) 2011-2012 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 * Decode NFC packets and print them to ADB log. 20 * If protocol decoder is not present, then decode packets into hex numbers. 21 ******************************************************************************/ 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #include "data_types.h" 28 #include "nfc_types.h" 29 30 #define DISP_NCI ProtoDispAdapterDisplayNciPacket 31 void ProtoDispAdapterDisplayNciPacket(uint8_t* nciPacket, uint16_t nciPacketLen, 32 bool is_recv); 33 void ProtoDispAdapterUseRawOutput(bool isUseRaw); 34 void ScrLog(uint32_t trace_set_mask, const char* fmt_str, ...); 35 void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...); 36 void LogMsg_0(uint32_t trace_set_mask, const char* p_str); 37 void LogMsg_1(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1); 38 void LogMsg_2(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 39 uintptr_t p2); 40 void LogMsg_3(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 41 uintptr_t p2, uintptr_t p3); 42 void LogMsg_4(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 43 uintptr_t p2, uintptr_t p3, uintptr_t p4); 44 void LogMsg_5(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 45 uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5); 46 void LogMsg_6(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 47 uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5, 48 uintptr_t p6); 49 uint8_t* scru_dump_hex(uint8_t* p, char* pTitle, uint32_t len, uint32_t layer, 50 uint32_t type); 51 void BTDISP_LOCK_LOG(); 52 void BTDISP_UNLOCK_LOG(); 53 void BTDISP_INIT_LOCK(); 54 void BTDISP_UNINIT_LOCK(); 55 void DispHciCmd(NFC_HDR* p_buf); 56 void DispHciEvt(NFC_HDR* p_buf); 57 void DispLLCP(NFC_HDR* p_buf, bool is_recv); 58 void DispHcp(uint8_t* data, uint16_t len, bool is_recv); 59 void DispSNEP(uint8_t local_sap, uint8_t remote_sap, NFC_HDR* p_buf, 60 bool is_first, bool is_rx); 61 void DispCHO(uint8_t* pMsg, uint32_t MsgLen, bool is_rx); 62 void DispT3TagMessage(NFC_HDR* p_msg, bool is_rx); 63 void DispRWT4Tags(NFC_HDR* p_buf, bool is_rx); 64 void DispCET4Tags(NFC_HDR* p_buf, bool is_rx); 65 void DispRWI93Tag(NFC_HDR* p_buf, bool is_rx, uint8_t command_to_respond); 66 void DispNDEFMsg(uint8_t* pMsg, uint32_t MsgLen, bool is_recv); 67 68 #ifdef __cplusplus 69 }; 70 #endif 71