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 24extern "C" { 25#endif 26 27#include "data_types.h" 28#include "nfc_types.h" 29 30#define DISP_NCI ProtoDispAdapterDisplayNciPacket 31void ProtoDispAdapterDisplayNciPacket(uint8_t* nciPacket, uint16_t nciPacketLen, 32 bool is_recv); 33void ProtoDispAdapterUseRawOutput(bool isUseRaw); 34void ScrLog(uint32_t trace_set_mask, const char* fmt_str, ...); 35void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...); 36void LogMsg_0(uint32_t trace_set_mask, const char* p_str); 37void LogMsg_1(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1); 38void LogMsg_2(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 39 uintptr_t p2); 40void LogMsg_3(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 41 uintptr_t p2, uintptr_t p3); 42void LogMsg_4(uint32_t trace_set_mask, const char* fmt_str, uintptr_t p1, 43 uintptr_t p2, uintptr_t p3, uintptr_t p4); 44void 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); 46void 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); 49uint8_t* scru_dump_hex(uint8_t* p, char* pTitle, uint32_t len, uint32_t layer, 50 uint32_t type); 51void BTDISP_LOCK_LOG(); 52void BTDISP_UNLOCK_LOG(); 53void BTDISP_INIT_LOCK(); 54void BTDISP_UNINIT_LOCK(); 55void DispHciCmd(NFC_HDR* p_buf); 56void DispHciEvt(NFC_HDR* p_buf); 57void DispLLCP(NFC_HDR* p_buf, bool is_recv); 58void DispHcp(uint8_t* data, uint16_t len, bool is_recv); 59void DispSNEP(uint8_t local_sap, uint8_t remote_sap, NFC_HDR* p_buf, 60 bool is_first, bool is_rx); 61void DispCHO(uint8_t* pMsg, uint32_t MsgLen, bool is_rx); 62void DispT3TagMessage(NFC_HDR* p_msg, bool is_rx); 63void DispRWT4Tags(NFC_HDR* p_buf, bool is_rx); 64void DispCET4Tags(NFC_HDR* p_buf, bool is_rx); 65void DispRWI93Tag(NFC_HDR* p_buf, bool is_rx, uint8_t command_to_respond); 66void DispNDEFMsg(uint8_t* pMsg, uint32_t MsgLen, bool is_recv); 67 68#ifdef __cplusplus 69}; 70#endif 71