Xil_SMemSet - Xil_SMemSet - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

This is wrapper function to memset function. This function writes specified byte to destination specified number of times. This function also takes maximum string size that destination holds to make sure not to write out of bound area.

Copies source string to destination string

Prototype

s32 Xil_SMemSet(void *Dest, const u32 DestSize, const u8 Data, const u32 Len);

Parameters

The following table lists the Xil_SMemSet function arguments.

Table 1. Xil_SMemSet Arguments
Type Member Description
void * Dest - Pointer to destination memory
const u32 DestSize - Memory available at destination
const u8 Data - Any value from 0 to 255
const u32 Len - Number of bytes to be copied

Returns

XST_SUCCESS - Copy is successful XST_INVALID_PARAM - Invalid inputs