YAMI4Industry
|
Functions | |
size_t | yami_round_up_to_4 (const size_t v) |
Rounds the given value to the nearest 4 (for alignment). More... | |
size_t | yami_round_up_to_8 (const size_t v) |
Rounds the given value to the nearest 8 (for alignment). More... | |
size_t | yami_strlen (const char s[]) |
Replacement for standard strlen. More... | |
int32_t | yami_strcmp (const char s1[], const char s2[]) |
Replacement for standard strcmp. More... | |
int32_t | yami_strncmp (const char s1[], const char s2[], const size_t n) |
Replacement for standard strncmp. More... | |
void | yami_strncpy (char dest[], const char src[], const size_t n) |
Replacement for standard strncpy. More... | |
int32_t | yami_strfind (const char s[], const char c, const size_t from, const size_t to) |
Finds the given character in nul-terminated string. More... | |
void | yami_memcpy (uint8_t dest[], const size_t dest_from, const uint8_t src[], const size_t src_from, const size_t n) |
Replacement for standard memcpy. More... | |
void | yami_bzero (uint8_t dest[], const size_t n) |
Replacement for standard bzero. More... | |
int32_t | yami_uint32_to_string (uint32_t v, char buf[], const size_t buf_from, const size_t buf_size) |
Converts uint32_t to string format. More... | |
int32_t | yami_string_to_uint32 (const char buf[], const size_t from, const size_t to, uint32_t *const out_value) |
Converts nul-terminated string to uint32_t. More... | |
int32_t | yami_string_to_uint8 (const char buf[], const size_t from, const size_t to, uint8_t *const out_value) |
Converts nul-terminated string to uint8_t. More... | |
void yami_bzero | ( | uint8_t | dest[], |
const size_t | n | ||
) |
Replacement for standard bzero.
void yami_memcpy | ( | uint8_t | dest[], |
const size_t | dest_from, | ||
const uint8_t | src[], | ||
const size_t | src_from, | ||
const size_t | n | ||
) |
Replacement for standard memcpy.
size_t yami_round_up_to_4 | ( | size_t | v | ) |
Rounds the given value to the nearest 4 (for alignment).
v | value to round |
size_t yami_round_up_to_8 | ( | size_t | v | ) |
Rounds the given value to the nearest 8 (for alignment).
v | value to round |
int32_t yami_strcmp | ( | const char | s1[], |
const char | s2[] | ||
) |
Replacement for standard strcmp.
int32_t yami_strfind | ( | const char | s[], |
char | c, | ||
size_t | from, | ||
size_t | to | ||
) |
Finds the given character in nul-terminated string.
s | string to be searched in |
c | character to be searched for |
from | starting index in s |
to | last (not inclusive) index in s |
int32_t yami_string_to_uint32 | ( | const char | buf[], |
size_t | from, | ||
size_t | to, | ||
uint32_t * | out_value | ||
) |
Converts nul-terminated string to uint32_t.
buf | string to be converted |
from | starting index in buf |
to | last (not inclusive) index in buf |
out_value | value after conversion |
int32_t yami_string_to_uint8 | ( | const char | buf[], |
size_t | from, | ||
size_t | to, | ||
uint8_t * | out_value | ||
) |
Converts nul-terminated string to uint8_t.
buf | string to be converted |
from | starting index in buf |
to | last (not inclusive) index in buf |
out_value | value after conversion |
size_t yami_strlen | ( | const char | s[] | ) |
Replacement for standard strlen.
int32_t yami_strncmp | ( | const char | s1[], |
const char | s2[], | ||
const size_t | n | ||
) |
Replacement for standard strncmp.
void yami_strncpy | ( | char | dest[], |
const char | src[], | ||
const size_t | n | ||
) |
Replacement for standard strncpy.
int32_t yami_uint32_to_string | ( | uint32_t | v, |
char | buf[], | ||
size_t | buf_from, | ||
size_t | buf_size | ||
) |
Converts uint32_t to string format.
v | value to be converted |
buf | buffer where the string will be formatted |
buf_from | starting index in buf |
buf_size | total size of buf |