Other useful kernel service
[RT-Thread Kernel API]


Functions

void rt_snprintf (char *buf, rt_size_t size, const char *fmt,...)
void rt_kprintf (const char *fmt,...)
void * rt_memset (void *src, int c, rt_ubase_t n)
void * rt_memcpy (void *dest, const void *src, rt_ubase_t n)
rt_ubase_t rt_strncmp (const char *cs, const char *ct, rt_ubase_t count)
rt_ubase_t rt_strlen (const char *src)
char * rt_strstr (const char *str1, const char *str2)
rt_int32_t rt_sscanf (const char *buf, const char *fmt,...)
char * rt_strncpy (char *dest, const char *src, rt_ubase_t n)
void * rt_memmove (void *dest, const void *src, rt_ubase_t n)
rt_int32_t rt_memcmp (const void *cs, const void *ct, rt_ubase_t count)
rt_uint32_t rt_strcasecmp (const char *a, const char *b)
void rt_show_version (void)

Function Documentation

void rt_kprintf ( const char *  fmt,
  ... 
)

This function will print a formatted string on system console

Parameters:
fmt the format

rt_int32_t rt_memcmp ( const void *  cs,
const void *  ct,
rt_ubase_t  count 
)

memcmp - Compare two areas of memory

Parameters:
cs,: One area of memory
ct,: Another area of memory
count,: The size of the area.

void * rt_memcpy ( void *  dst,
const void *  src,
rt_ubase_t  count 
)

This function will copy memory content from source address to destination address.

Parameters:
dst the address of destination memory
src the address of source memory
count the copied length
Returns:
the address of destination memory

void * rt_memmove ( void *  dest,
const void *  src,
rt_ubase_t  n 
)

This function will move memory content from source address to destination address.

Parameters:
dest the address of destination memory
src the address of source memory
n the copied length
Returns:
the address of destination memory

void * rt_memset ( void *  s,
int  c,
rt_ubase_t  count 
)

This function will set the content of memory to specified value

Parameters:
s the address of source memory
c the value shall be set in content
count the copied length
Returns:
the address of source memory

void rt_show_version ( void   ) 

This function will show the version of rt-thread rtos

void rt_snprintf ( char *  buf,
rt_size_t  size,
const char *  fmt,
  ... 
)

This function will fill a formatted string to buffer

Parameters:
buf the buffer to save formatted string
size the size of buffer
fmt the format

rt_int32_t rt_sscanf ( const char *  buf,
const char *  fmt,
  ... 
)

sscanf - Unformat a buffer into a list of arguments

Parameters:
buf input buffer
fmt formatting of buffer

rt_uint32_t rt_strcasecmp ( const char *  a,
const char *  b 
)

This function will compare two strings while ignoring differences in case

Parameters:
a the string to be compared
b the string to be compared
Returns:
the result

rt_ubase_t rt_strlen ( const char *  s  ) 

This function will return the length of a string, which terminate will null character.

Parameters:
s the string
Returns:
the length of string

rt_ubase_t rt_strncmp ( const char *  cs,
const char *  ct,
rt_ubase_t  count 
)

This function will compare two strings with specified maximum length

Parameters:
cs the string to be compared
ct the string to be compared
count the maximum compare length
Returns:
the result

char * rt_strncpy ( char *  dest,
const char *  src,
rt_ubase_t  n 
)

This function will copy string no more than n bytes.

Parameters:
dest the string to copy
src the string to be copied
n the maximum copied length
Returns:
the result

char * rt_strstr ( const char *  s1,
const char *  s2 
)

This function will return the first occurrence of a string.

Parameters:
s1 the source string
s2 the find string
Returns:
the first occurrence of a s2 in s1, or RT_NULL if no found.


Generated on Thu Oct 9 07:19:09 2008 for RT-Thread Kernel by  doxygen 1.5.7