UTILS API 参考
-
int wm_set_cpu_usage_duration(uint32_t time_ms)
This function to set cpu usage duration.
- 参数:
time_ms – [in] : The time of being counted, if 0, the statistical time will be calculated from the last time it was not 0
- 返回:
WM_ERR_SUCCESS on success
other failed
-
int wm_printf(const char *fmt, ...)
-
int wm_vprintf(const char *fmt, va_list arg_ptr)
-
int wm_vsnprintf(char *buffer, size_t count, const char *format, va_list va)
-
int wm_hex_str_to_array(const char *str, uint8_t array[], int array_len)
Converts the hex string to a hex array.
- 参数:
str – [in] hex string
array – [out] hex array
array_len – [in] hex array length
- 返回:
WM_ERR_SUCCESS on success
other failed
-
int wm_hex2byte(const char hex[2])
-
int wm_atohex(char ch)
-
int wm_atoi(const char *s, int *err)
-
void *memrchr(const void *s, int c, size_t n)
-
char *strdup(const char *s)
-
int strcasecmp(const char *s1, const char *s2)
-
int strncasecmp(const char *s1, const char *s2, size_t n)
-
size_t strlcpy(char *dest, const char *src, size_t len)
-
size_t strnlen(const char *s, size_t maxlen)
-
uint8_t get_crc8(uint8_t *ptr, uint32_t len)
-
bool isstring(const char *str)
-
bool isdigitstr(const char *str)
-
bool isdecimalstr(const char *str)
-
void remove_string_quotation_mark(int argc, char **argv)
-
void wm_system_reboot(void)