lib/sw_services/xilplmi/src/xplmi_generic.c
static u8* XPlmi_BoardNameRW(const XPlmi_Cmd *Cmd, u8 GetFlag, u32 *Len)
{
	int Status = XST_FAILURE;
	static u8 BoardName[XPLMI_MAX_NAME_LEN + 1U] = {0U,};
	static u32 BoardLen = 0U;

	if (*Len > XPLMI_MAX_NAME_WORDS) {
		*Len = XPLMI_MAX_NAME_WORDS;
	}

	if (GetFlag == (u8)FALSE) {
		/* Set Command */
		Status = XPlmi_DmaXfr((u64)(u32)&Cmd->Payload[0U],
				(u64)(u32)BoardName, *Len, XPLMI_PMCDMA_0);
		if (Status != XST_SUCCESS) {
			goto END;
		}

		BoardName[*Len * XPLMI_WORD_LEN] = 0U;
		BoardLen = *Len;
	}
	else {
		*Len = BoardLen;
	}

END:
	return BoardName;
}
/*****************************************************************************/
/**
 * @brief	This function stores the board name in a local variable based
 * on the parameters passed.
 *
 * @param	Cmd is pointer to the command structure
 * @param	GetFlag is set to TRUE for read and FALSE for write
 * @param	Len is pointer to the number of bytes to be copied
 *
 * @return	BoardName
 *
 *****************************************************************************/
@brief       This function stores the board name in a local variable based
on the parameters passed.

@param       Cmd is pointer to the command structure
@param       GetFlag is set to TRUE for read and FALSE for write
@param       Len is pointer to the number of bytes to be copied


@brief This function stores the board name in a local variable based on the parameters passed . @param Cmd is pointer to the command structure @param GetFlag is set to TRUE for read and FALSE for write @param Len is pointer to the number of bytes to be copied
static u8* XPlmi_BoardNameRW(const XPlmi_Cmd *Cmd, u8 GetFlag, u32 *Len)
{
	int Status = XST_FAILURE;
	static u8 BoardName[XPLMI_MAX_NAME_LEN + 1U] = {0U,};
	static u32 BoardLen = 0U;
	if (*Len > XPLMI_MAX_NAME_WORDS) {
		*Len = XPLMI_MAX_NAME_WORDS;
	}
	if (GetFlag == (u8)FALSE) {
		Status = XPlmi_DmaXfr((u64)(u32)&Cmd->Payload[0U],
				(u64)(u32)BoardName, *Len, XPLMI_PMCDMA_0);
		if (Status != XST_SUCCESS) {
			goto END;
		}
		BoardName[*Len * XPLMI_WORD_LEN] = 0U;
		BoardLen = *Len;
	}
	else {
		*Len = BoardLen;
	}
END:
	return BoardName;
}
static u8 * XPlmi_BoardNameRW ( const XPlmi_Cmd * Cmd , u8 GetFlag , u32 * Len ) { int Status = XST_FAILURE ; static u8 BoardName [ XPLMI_MAX_NAME_LEN + 1U ] = { 0U , } ; static u32 BoardLen = 0U ; if ( * Len > XPLMI_MAX_NAME_WORDS ) { * Len = XPLMI_MAX_NAME_WORDS ; } if ( GetFlag == ( u8 ) FALSE ) { Status = XPlmi_DmaXfr ( ( u64 ) ( u32 ) & Cmd -> Payload [ 0U ] , ( u64 ) ( u32 ) BoardName , * Len , XPLMI_PMCDMA_0 ) ; if ( Status != XST_SUCCESS ) { goto END ; } BoardName [ * Len * XPLMI_WORD_LEN ] = 0U ; BoardLen = * Len ; } else { * Len = BoardLen ; } END : return BoardName ; }
@brief       This function stores the board name in a local variable based
 on the parameters passed.
@brief This function stores the board name in a local variable based on the parameters passed .
/* Set Command */