/****************************************************************
 ****************************************************************
 **                                                            **
 **    (C)Copyright 2008, American Megatrends Inc.             **
 **                                                            **
 **            All Rights Reserved.                            **
 **                                                            **
 **        6145-F, Northbelt Parkway, Norcross,                **
 **                                                            **
 **        Georgia - 30071, USA. Phone-(770)-246-8600.         **
 **                                                            **
 ****************************************************************
 *
 * OemCmdhndlr.c
 * Oem Commands used  by SMM Channel
 *
 * Author: Anurag Bhatia <anuragb@ami.com>
 *         Vinesh Chirstopher <vineshc@ami.com>
 *
 *****************************************************************/

#include <string.h>
#include "OemSMMCmds.h"
#include "com_BmcType.h"
#include "main.h"

int  SMMExample_0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	printf("SMMExample_0h\n" );
	pRes[1] = 1;
	pRes[2] = 2;
	pRes[3] = 3;
	pRes[4] = 4;
	return 	5;
}

int  SMMExample_1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	g_BMCInfo.SlotID		=	PDK_GetSlotID();
	g_BMCInfo.ChassisID		=	PDK_GetChassisID();
	printf("\n======== Module Info ========\n");
	printf("BMC Version:         %d.%d\n", g_BMCInfo.FwMajorVer, g_BMCInfo.FwMinorVer);
	printf("BMC Build Time:      %s - %s\n", __DATE__, __TIME__);
	printf("Slot ID:             %d\n", g_BMCInfo.SlotID);
	printf("Chassis ID:          %d\n", g_BMCInfo.ChassisID);
	printf("Primary IPMB Addr:   %#x\n", g_BMCInfo.PrimaryIPMBAddr);
	printf("Secondary IPMB Addr: %#x\n", g_BMCInfo.SecondaryIPMBAddr);
	printf("Primary IPMB Bus:    %d\n", g_BMCInfo.IpmiConfig.PrimaryIPMBBus);
	printf("Secondary IPMB Bus:  %d\n", g_BMCInfo.IpmiConfig.SecondaryIPMBBus);
	printf("Module Name:         %s\n", g_BMCInfo.BladeName);
	
	return 	1;
}


int SMMExample_2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	printf("SMMExample_2h\n" );
	pRes[1] = 0x21;
	pRes[2] = 0x22;
	pRes[3] = 0x23;
	pRes[4] = 0x24;
	return 5;

}

int SMMExample_3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	printf("SMMExample_3h\n" );
	return 	1;
}

//rename sensor
int SMMExample_4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;

	uint8_t SensorNum, i;
	uint8_t rdbuf[MAX_ID_STR_LEN + 1] = {0};
	SDRRecHdr_T*			pSDRRec;

	//invalid cmd length
	if(ReqLen <= 1){//havn't got sensor number or senser's new name in cmd
		*pRes = CC_ILLEGAL_CMD_FOR_SENSOR_REC;
		return 1;
	}else if(ReqLen > MAX_ID_STR_LEN +1){//too long serser name
		*pRes = CC_ILLEGAL_CMD_FOR_SENSOR_REC;
		return 1;
	}

	//record cmd
	for(i=0;i<ReqLen;i++){
		rdbuf[i] = *pReq++;
		// printf("rdbuf[%d] = %x\n", i, rdbuf[i]);
	}

	SensorNum = rdbuf[0];
	if (getSensorDev(SensorNum) == NULL){//invalid sensornum
		*pRes = CC_ILLEGAL_CMD_FOR_SENSOR_REC;
		return 1;
	}

	pSDRRec	= (SDRRecHdr_T*) SR_FindSDR(SensorNum);

	for(i=1;i<ReqLen;i++){
		if((rdbuf[i] >= 0x20 && rdbuf[i] <= 0x7e) || (rdbuf[i] == 0x00)){
			((FullSensorRec_T*)pSDRRec)->IDStr[i-1] = rdbuf[i];
			// printf("revised ID[%d] = %02x\n", i, ((FullSensorRec_T*)pSDRRec)->IDStr[i-1]);
		}else{//invalid sensor name(refer to ASCII)
			*pRes = CC_ILLEGAL_CMD_FOR_SENSOR_REC;
			return 1;
		}
	}

	for(i=ReqLen-1;i<MAX_ID_STR_LEN;i++){//string end
		((FullSensorRec_T*)pSDRRec)->IDStr[i] = 0;
	}

	FlushSDRToFlash();
	
	return 	1;
}



int SMMExample_5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	

	return 	1;										
}


int SMMExample_6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_10h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_11h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_12h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_13h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_14h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_15h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_16h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_17h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_18h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_19h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_1ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_1bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_1ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_1dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_1eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_1fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_20h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_21h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_22h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_23h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_24h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_25h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_26h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_27h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_28h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_29h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_2ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_2bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_2ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_2dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_2eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_2fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_30h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_31h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_32h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_33h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_34h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_35h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_36h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_37h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_38h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_39h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_3ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_3bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_3ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_3dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_3eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_3fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_40h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_41h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_42h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_43h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_44h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_45h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_46h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_47h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_48h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_49h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_4ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_4bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_4ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_4dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_4eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_4fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_50h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_51h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_52h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_53h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_54h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_55h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_56h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_57h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_58h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_59h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_5ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_5bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_5ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_5dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_5eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_5fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_60h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_61h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_62h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_63h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_64h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_65h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_66h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_67h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_68h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_69h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_6ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_6bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_6ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_6dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_6eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_6fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_70h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_71h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_72h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_73h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_74h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_75h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_76h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_77h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_78h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_79h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_7ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_7bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_7ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_7dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_7eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_7fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

/********************** storlead oem command ********************************/
//get CPU info
int SMMExample_80h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	
	return 1;	
} 

//
int SMMExample_81h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	return 18;
} 

//
int SMMExample_82h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	return 1;
} 

int SMMExample_83h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
			
	return 1;	
} 


//reserved
int SMMExample_84h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	pRes[0] = CC_NORMAL;
	return 1;	
} 

//
int SMMExample_85h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	
	return 1;	
} 
//
int SMMExample_86h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	
	return 1;	
} 
//
int SMMExample_87h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	return 1;	
} 

int SMMExample_88h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	return 1;
} 

int SMMExample_89h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	return 1;
} 

int SMMExample_8ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	return 1;	
} 

int SMMExample_8bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	return 1;	
} 

//
int SMMExample_8ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes) 
{

 return 1;    
} 

int SMMExample_8dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes) 
{
	return 1;
} 

int SMMExample_8eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 


int SMMExample_8fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;	
} 


int SMMExample_90h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;	
} 


int SMMExample_91h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;	
}


int SMMExample_92h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	
	return 1;
} 

int SMMExample_93h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;
} 


int SMMExample_94h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;	
} 

int SMMExample_95h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_96h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_97h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_98h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_99h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_9ah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_9bh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_9ch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_9dh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return sizeof (*pRes);	
} 

int SMMExample_9eh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{
	*pRes= CC_NORMAL;
	return 1;	
} 

int SMMExample_9fh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{

	return 1;	
} 

/******************************************************************************/

int  SMMExample_a0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_a1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_a2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_a3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_a4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_a5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_a6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_a7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_a8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_a9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_aah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_abh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_ach( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_adh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_aeh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_afh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_b0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_b1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_b2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_b3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_b4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_b5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_b6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_b7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_b8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_b9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_bah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_bbh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_bch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_bdh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_beh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_bfh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_c0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_c1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_c2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_c3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_c4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_c5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_c6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_c7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_c8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_c9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_cah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_cbh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_cch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_cdh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_ceh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_cfh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_d0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_d1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_d2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_d3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_d4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_d5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_d6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_d7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_d8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_d9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_dah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_dbh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_dch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_ddh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_deh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_dfh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_e0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_e1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_e2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_e3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_e4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_e5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_e6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_e7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_e8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_e9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_eah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_ebh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_ech( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_edh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_eeh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_efh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int  SMMExample_f0h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}

int  SMMExample_f1h(uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_f2h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 1;

}

int SMMExample_f3h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)	
{	
	*pRes= CC_NORMAL;
	return 	1;
}


int SMMExample_f4h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;
}



int SMMExample_f5h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;										
}


int SMMExample_f6h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)
{
	*pRes= CC_NORMAL;
	return 	1;											
}
 

int SMMExample_f7h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;	
}
 

int SMMExample_f8h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 1;
}


int SMMExample_f9h( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;
}

int SMMExample_fah( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{							
	*pRes= CC_NORMAL;
	return 1;	
}

int SMMExample_fbh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_fch( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_fdh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

int SMMExample_feh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;		
}


int SMMExample_ffh( uint8_t* pReq, uint8_t ReqLen,  uint8_t* pRes)		
{
	*pRes= CC_NORMAL;
	return 	1;	
}

