Skip to content

Commit

Permalink
Stub OutputDbgTrace() function
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
  • Loading branch information
ABOSTM committed Dec 8, 2021
1 parent a771c9e commit bd414b6
Showing 1 changed file with 1 addition and 176 deletions.
177 changes: 1 addition & 176 deletions src/utility/STM32Cube_FW/tl_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "stm_list.h"
#include "tl.h"
#include "mbox_def.h"
#include "tl_dbg_conf.h"

/* Private typedef -----------------------------------------------------------*/
typedef enum
Expand Down Expand Up @@ -532,181 +531,7 @@ __WEAK void TL_TRACES_EvtReceived( TL_EvtPacket_t * hcievt )
******************************************************************************/
static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer)
{
TL_EvtPacket_t *p_evt_packet;
TL_CmdPacket_t *p_cmd_packet;

switch(packet_type)
{
case TL_MB_MM_RELEASE_BUFFER:
p_evt_packet = (TL_EvtPacket_t*)buffer;
switch(p_evt_packet->evtserial.evt.evtcode)
{
case TL_BLEEVT_CS_OPCODE:
TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_MM_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode);
TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet);
break;

case TL_BLEEVT_CC_OPCODE:
TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_MM_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode);
TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet);
break;

case TL_BLEEVT_VS_OPCODE:
TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_MM_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode);
TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet);
break;

default:
TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet);
break;
}

TL_MM_DBG_MSG("\r\n");
break;

case TL_MB_BLE_CMD:
p_cmd_packet = (TL_CmdPacket_t*)buffer;
TL_HCI_CMD_DBG_MSG("ble cmd: 0x%04X", p_cmd_packet->cmdserial.cmd.cmdcode);
if(p_cmd_packet->cmdserial.cmd.plen != 0)
{
TL_HCI_CMD_DBG_MSG(" payload:");
TL_HCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, "");
}
TL_HCI_CMD_DBG_MSG("\r\n");

TL_HCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE);
break;

case TL_MB_BLE_CMD_RSP:
p_evt_packet = (TL_EvtPacket_t*)buffer;
switch(p_evt_packet->evtserial.evt.evtcode)
{
case TL_BLEEVT_CS_OPCODE:
TL_HCI_CMD_DBG_MSG("ble rsp: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_HCI_CMD_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode);
TL_HCI_CMD_DBG_MSG(" numhci: 0x%02X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->numcmd);
TL_HCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->status);
break;

case TL_BLEEVT_CC_OPCODE:
TL_HCI_CMD_DBG_MSG("ble rsp: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_HCI_CMD_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode);
TL_HCI_CMD_DBG_MSG(" numhci: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->numcmd);
TL_HCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[0]);
if((p_evt_packet->evtserial.evt.plen-4) != 0)
{
TL_HCI_CMD_DBG_MSG(" payload:");
TL_HCI_CMD_DBG_BUF(&((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[1], p_evt_packet->evtserial.evt.plen-4, "");
}
break;

default:
TL_HCI_CMD_DBG_MSG("unknown ble rsp received: %02X", p_evt_packet->evtserial.evt.evtcode);
break;
}

TL_HCI_CMD_DBG_MSG("\r\n");

TL_HCI_CMD_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE);
break;

case TL_MB_BLE_ASYNCH_EVT:
p_evt_packet = (TL_EvtPacket_t*)buffer;
if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE)
{
TL_HCI_EVT_DBG_MSG("ble evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
if((p_evt_packet->evtserial.evt.plen) != 0)
{
TL_HCI_EVT_DBG_MSG(" payload:");
TL_HCI_EVT_DBG_BUF(p_evt_packet->evtserial.evt.payload, p_evt_packet->evtserial.evt.plen, "");
}
}
else
{
TL_HCI_EVT_DBG_MSG("ble evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_HCI_EVT_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode);
if((p_evt_packet->evtserial.evt.plen-2) != 0)
{
TL_HCI_EVT_DBG_MSG(" payload:");
TL_HCI_EVT_DBG_BUF(((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload, p_evt_packet->evtserial.evt.plen-2, "");
}
}

TL_HCI_EVT_DBG_MSG("\r\n");

TL_HCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE);
break;

case TL_MB_SYS_CMD:
p_cmd_packet = (TL_CmdPacket_t*)buffer;

TL_SHCI_CMD_DBG_MSG("sys cmd: 0x%04X", p_cmd_packet->cmdserial.cmd.cmdcode);

if(p_cmd_packet->cmdserial.cmd.plen != 0)
{
TL_SHCI_CMD_DBG_MSG(" payload:");
TL_SHCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, "");
}
TL_SHCI_CMD_DBG_MSG("\r\n");

TL_SHCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE);
break;

case TL_MB_SYS_CMD_RSP:
p_evt_packet = (TL_EvtPacket_t*)buffer;
switch(p_evt_packet->evtserial.evt.evtcode)
{
case TL_BLEEVT_CC_OPCODE:
TL_SHCI_CMD_DBG_MSG("sys rsp: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_SHCI_CMD_DBG_MSG(" cmd opcode: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode);
TL_SHCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[0]);
if((p_evt_packet->evtserial.evt.plen-4) != 0)
{
TL_SHCI_CMD_DBG_MSG(" payload:");
TL_SHCI_CMD_DBG_BUF(&((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[1], p_evt_packet->evtserial.evt.plen-4, "");
}
break;

default:
TL_SHCI_CMD_DBG_MSG("unknown sys rsp received: %02X", p_evt_packet->evtserial.evt.evtcode);
break;
}

TL_SHCI_CMD_DBG_MSG("\r\n");

TL_SHCI_CMD_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE);
break;

case TL_MB_SYS_ASYNCH_EVT:
p_evt_packet = (TL_EvtPacket_t*)buffer;
if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE)
{
TL_SHCI_EVT_DBG_MSG("unknown sys evt received: %02X", p_evt_packet->evtserial.evt.evtcode);
}
else
{
TL_SHCI_EVT_DBG_MSG("sys evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode);
TL_SHCI_EVT_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode);
if((p_evt_packet->evtserial.evt.plen-2) != 0)
{
TL_SHCI_EVT_DBG_MSG(" payload:");
TL_SHCI_EVT_DBG_BUF(((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload, p_evt_packet->evtserial.evt.plen-2, "");
}
}

TL_SHCI_EVT_DBG_MSG("\r\n");

TL_SHCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE);
break;

default:
break;
}

/* Function stubbed */
return;
}

Expand Down

0 comments on commit bd414b6

Please sign in to comment.