/**
 *  @file ins_ut_tfcard.c
 *  @details config unit test
 *
 */
 
#include <stdlib.h>
#include "unittest.h"
#include "unittest/device/ins_ut_tfcard.h"
#include "ins_mw_config.h"
#include "ins_pal_error_code.h"
#include "ins_comm_log.h"

#include "ins_dev_tfcard.h"

static int32_t InsUT_Device_TfcardFormat(int32_t argc, char **argv)
{
    char value = 0;
	InsDev_TfCard_t *p_tfcard_dev = InsDev_TfCard_Init(0);

#if 0
	if(argc > 0)
	{
		INSLOG_E("argc = %d\n", argc);
	    for(int i = 0; i < argc; i++)
	    {
	        INSLOG_E("argv[%d] = %s\n", i, argv[i]);
	    }
	}
#endif
	
    if(argc < 1)
    {
        INSLOG_W("Input para not enough! \n  on 0->red\n on 1->green\n on 2->blue\n");
        return INSERR_NG;
    }

    value = *argv[0];
	
    return (int32_t)p_tfcard_dev->format(value);
}

InsUT_Unittest_CmdInfo_t g_ut_cmd_tfcard[INSUT_CMDCNT_TFCARD] = 
{
	{InsUT_Device_TfcardFormat,        0,  NULL, "format",         "tfcard format"},
};

