lib/sw_services/xilnvm/examples/xilnvm_bbram_versal_client_example.c
static int BbramReadUsrData(void)
{
	int Status = XST_FAILURE;
	u64 DstAddr = (UINTPTR)&ReadData.UsrData;

	Xil_DCacheInvalidateRange((UINTPTR)DstAddr, XNVM_CACHE_LINE_LEN);
	Status = XNvm_BbramReadUsrData((UINTPTR)DstAddr);
	Xil_DCacheInvalidateRange((UINTPTR)DstAddr, XNVM_CACHE_LINE_LEN);

	if (Status == XST_SUCCESS) {
		xil_printf("Bbram UserData : %x\n\r", ReadData.UsrData);
	}

	return Status;
}
/*****************************************************************************/
/**
* BbramReadUsrData function reads user data present in BBRAM
*
* @return
*		- XST_SUCCESS if the user data read successful
*		- XST_FAILURE if the user data read failed
*
******************************************************************************/
BbramReadUsrData function reads user data present in BBRAM
BbramReadUsrData function reads user data present in BBRAM
static int BbramReadUsrData(void)
{
	int Status = XST_FAILURE;
	u64 DstAddr = (UINTPTR)&ReadData.UsrData;
	Xil_DCacheInvalidateRange((UINTPTR)DstAddr, XNVM_CACHE_LINE_LEN);
	Status = XNvm_BbramReadUsrData((UINTPTR)DstAddr);
	Xil_DCacheInvalidateRange((UINTPTR)DstAddr, XNVM_CACHE_LINE_LEN);
	if (Status == XST_SUCCESS) {
		xil_printf("Bbram UserData : %x\n\r", ReadData.UsrData);
	}
	return Status;
}
static int BbramReadUsrData ( void ) { int Status = XST_FAILURE ; u64 DstAddr = ( UINTPTR ) & ReadData . UsrData ; Xil_DCacheInvalidateRange ( ( UINTPTR ) DstAddr , XNVM_CACHE_LINE_LEN ) ; Status = XNvm_BbramReadUsrData ( ( UINTPTR ) DstAddr ) ; Xil_DCacheInvalidateRange ( ( UINTPTR ) DstAddr , XNVM_CACHE_LINE_LEN ) ; if ( Status == XST_SUCCESS ) { xil_printf ( " \n \r " , ReadData . UsrData ) ; } return Status ; }
BbramReadUsrData function reads user data present in BBRAM
BbramReadUsrData function reads user data present in BBRAM