lib/sw_services/xilnvm/examples/xilnvm_efuse_versal_client_example.c
static int XilNvm_EfuseInitPufFuses(XNvm_EfusePufFuseAddr *PufFuse)
{
	int Status = XST_FAILURE;

	PufFuse->PrgmPufFuse = XNVM_EFUSE_WRITE_PUF_FUSES;
	if (PufFuse->PrgmPufFuse == TRUE) {
		Status = XilNvm_ValidateUserFuseStr(
				(char *)XNVM_EFUSE_PUF_FUSES);
		if (Status != XST_SUCCESS) {
			xil_printf("PufFuse string validation failed\r\n");
			goto END;
		}

		if (strlen(XNVM_EFUSE_PUF_FUSES) != (XNVM_EFUSE_NUM_OF_PUF_FUSES *
				XNVM_EFUSE_ROW_STRING_LEN)) {
			goto END;
		}

		Status = Xil_ConvertStringToHex(
				XNVM_EFUSE_PUF_FUSES,
				(u32 *)(UINTPTR)PufFuse->PufFuseDataAddr,
				(XNVM_EFUSE_NUM_OF_PUF_FUSES *
				XNVM_EFUSE_ROW_STRING_LEN));
		if (Status != XST_SUCCESS) {
			goto END;
		}

		PufFuse->StartPufFuseNum = XNVM_EFUSE_PRGM_PUF_FUSE_NUM;
		PufFuse->NumOfPufFuses = XNVM_EFUSE_NUM_OF_PUF_FUSES;
		PufFuse->EnvMonitorDis= XNVM_EFUSE_ENV_MONITOR_DISABLE;
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
/****************************************************************************/
/**
 * This function is used to initialize XNvm_EfusePufFuse structure with user
 * provided data and assign the same to global structure XNvm_EfusePufFuse to
 * program PUF Fuses.
 *
 *
 * @param	PufFuse Pointer to XNvm_EfusePufFuse structure
 *
 * @return
 *		- XST_SUCCESS - On successful initialization
 *		- Error Code - On failure.
 *
 ******************************************************************************/
This function is used to initialize XNvm_EfusePufFuse structure with user
provided data and assign the same to global structure XNvm_EfusePufFuse to
program PUF Fuses.



@return
- XST_SUCCESS - On successful initialization
- Error Code - On failure.
This function is used to initialize XNvm_EfusePufFuse structure with user provided data and assign the same to global structure XNvm_EfusePufFuse to program PUF Fuses . @return - XST_SUCCESS - On successful initialization - Error Code - On failure .
static int XilNvm_EfuseInitPufFuses(XNvm_EfusePufFuseAddr *PufFuse)
{
	int Status = XST_FAILURE;
	PufFuse->PrgmPufFuse = XNVM_EFUSE_WRITE_PUF_FUSES;
	if (PufFuse->PrgmPufFuse == TRUE) {
		Status = XilNvm_ValidateUserFuseStr(
				(char *)XNVM_EFUSE_PUF_FUSES);
		if (Status != XST_SUCCESS) {
			xil_printf("PufFuse string validation failed\r\n");
			goto END;
		}
		if (strlen(XNVM_EFUSE_PUF_FUSES) != (XNVM_EFUSE_NUM_OF_PUF_FUSES *
				XNVM_EFUSE_ROW_STRING_LEN)) {
			goto END;
		}
		Status = Xil_ConvertStringToHex(
				XNVM_EFUSE_PUF_FUSES,
				(u32 *)(UINTPTR)PufFuse->PufFuseDataAddr,
				(XNVM_EFUSE_NUM_OF_PUF_FUSES *
				XNVM_EFUSE_ROW_STRING_LEN));
		if (Status != XST_SUCCESS) {
			goto END;
		}
		PufFuse->StartPufFuseNum = XNVM_EFUSE_PRGM_PUF_FUSE_NUM;
		PufFuse->NumOfPufFuses = XNVM_EFUSE_NUM_OF_PUF_FUSES;
		PufFuse->EnvMonitorDis= XNVM_EFUSE_ENV_MONITOR_DISABLE;
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
static int XilNvm_EfuseInitPufFuses ( XNvm_EfusePufFuseAddr * PufFuse ) { int Status = XST_FAILURE ; PufFuse -> PrgmPufFuse = XNVM_EFUSE_WRITE_PUF_FUSES ; if ( PufFuse -> PrgmPufFuse == TRUE ) { Status = XilNvm_ValidateUserFuseStr ( ( char * ) XNVM_EFUSE_PUF_FUSES ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; goto END ; } if ( strlen ( XNVM_EFUSE_PUF_FUSES ) != ( XNVM_EFUSE_NUM_OF_PUF_FUSES * XNVM_EFUSE_ROW_STRING_LEN ) ) { goto END ; } Status = Xil_ConvertStringToHex ( XNVM_EFUSE_PUF_FUSES , ( u32 * ) ( UINTPTR ) PufFuse -> PufFuseDataAddr , ( XNVM_EFUSE_NUM_OF_PUF_FUSES * XNVM_EFUSE_ROW_STRING_LEN ) ) ; if ( Status != XST_SUCCESS ) { goto END ; } PufFuse -> StartPufFuseNum = XNVM_EFUSE_PRGM_PUF_FUSE_NUM ; PufFuse -> NumOfPufFuses = XNVM_EFUSE_NUM_OF_PUF_FUSES ; PufFuse -> EnvMonitorDis = XNVM_EFUSE_ENV_MONITOR_DISABLE ; } Status = XST_SUCCESS ; END : return Status ; }
This function is used to initialize XNvm_EfusePufFuse structure with user
 provided data and assign the same to global structure XNvm_EfusePufFuse to
 program PUF Fuses.
This function is used to initialize XNvm_EfusePufFuse structure with user provided data and assign the same to global structure XNvm_EfusePufFuse to program PUF Fuses .