blob: 7f27a7f4a4c015f4b0f5b765d3ac888052af8075 [file] [log] [blame]
/**
* @file configCliDebug.c
* @author NXP Semiconductors
* @version 1.0
* @par License
*
* Copyright 2017 NXP
* SPDX-License-Identifier: Apache-2.0
*
* @par Description
* Command line handling 'info' entry
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// project specific include files
#include "sm_types.h"
#include "sm_apdu.h"
#include "tst_sm_util.h"
#include "tst_a71ch_util.h"
#include "probeAxUtil.h"
#include "configCli.h"
#include "configCmd.h"
#include "axHostCrypto.h"
#include "tstHostCrypto.h"
#define FLOW_VERBOSE_PROBE_A70
#ifdef FLOW_VERBOSE_PROBE_A70
#define FPRINTF(...) printf (__VA_ARGS__)
#else
#define FPRINTF(...)
#endif
// #define DBG_PROBE_A70
#ifdef DBG_PROBE_A70
#define DBGPRINTF(...) printf (__VA_ARGS__)
#else
#define DBGPRINTF(...)
#endif
int a7xConfigCliCmdDebug(int argc, char **argv, U16 *sw)
{
int argCurrent = 1;
// Do not go beyond the last argument when parsing
if (argCurrent >= argc)
{
a7xConfigCliHelp("a71chConfig");
return AX_CLI_ARG_COUNT_MISTAKE;
}
if (strcmp(argv[argCurrent], "reset") == 0) {
return a7xConfigCmdDebugReset();
}
else if (strcmp(argv[argCurrent], "permanently_disable_debug") == 0) {
return a7xConfigCmdDebugDisable(sw);
}
else {
return a7xConfigCliHelp("a71chConfig");
}
}