// Burn Fuze
//

// CryptoMemory Library Include Files
#include "CM_LIB.h"
#include "CM_I2C.h"
#include "CM_I2C_L.h"
#include <stdint.h>
#include <stdio.h>

uint8_t ucCmdWrFuze[4] = {0xb4, 0x01, 0x00, 0x00};

// Burn Fuse
uint8_t cm_BurnFuse(uint8_t ucFuze)
{
	uint8_t ucReturn;
	
  // Burn Fuze
	ucCmdWrFuze[2] = ucFuze;
	if((ucReturn = CM_LOW_LEVEL.SendCommand(ucCmdWrFuze))!= SUCCESS) 
	{
		printf("---> cm_BurnFuse log1\n");
		return ucReturn;
	}
	
  // done	
	ucReturn = CM_LOW_LEVEL.ReceiveRet(NULL,0);
	if(ucReturn != SUCCESS)
	{
		printf("---> cm_BurnFuse log2\n");
		return ucReturn;
	}

	return  SUCCESS;
}
