32 uint8_t u8Tmp = u8Data_;
40 }
else if (u8Data_ >= 10) {
47 while ((u8Max--) != 0u) {
48 szText_[u8Max] =
'0' + (u8Tmp % 10);
56 uint16_t u16Tmp = u16Data_;
58 uint16_t u16Compare = 10;
62 while (u16Data_ >= u16Compare && u16Max < 5) {
68 while ((u16Max--) != 0u) {
69 szText_[u16Max] =
'0' + (u16Tmp % 10);
77 uint32_t u32Tmp = u32Data_;
79 uint32_t u32Compare = 10;
83 while (u32Data_ >= u32Compare && u32Max < 12) {
89 while ((u32Max--) != 0u) {
90 szText_[u32Max] =
'0' + (u32Tmp % 10);
98 uint64_t u64Tmp = u64Data_;
100 uint64_t u64Compare = 10;
104 while (u64Data_ >= u64Compare && u64Max < 21) {
110 while ((u64Max--) != 0u) {
111 szText_[u64Max] =
'0' + (u64Tmp % 10);
121 uint8_t* pcData = (uint8_t*)pvSrc_;
126 while ((u16Len_--) != 0u) { u8Ret += *pcData++; }
134 uint8_t* pcData = (uint8_t*)pvSrc_;
139 while ((u16Len_--) != 0u) { u16Ret += *pcData++; }
147 uint8_t* pcData = (uint8_t*)szStr_;
152 while (*pcData++ != 0u) { u16Len++; }
159 char* szTmp1 = (
char*)szStr1_;
160 char* szTmp2 = (
char*)szStr2_;
165 while ((*szTmp1 != 0) && (*szTmp2 != 0)) {
166 if (*szTmp1++ != *szTmp2++) {
172 return ((*szTmp1) == 0) && ((*szTmp2) == 0);
178 char* szTmp1 = (
char*)szStr1_;
179 char* szTmp2 = (
char*)szStr2_;
181 while (((*szTmp1 != 0) && (*szTmp2 != 0)) && (u16Length_ != 0u)) {
182 if (*szTmp1++ != *szTmp2++) {
189 return (((*szTmp1) == 0) && ((*szTmp2) == 0)) || (u16Length_ == 0u);
195 char* szDst = (
char*)pvDst_;
196 char* szSrc = (
char*)pvSrc_;
203 while ((u16Len_--) != 0u) { *szDst++ = *szSrc++; }
209 char* szDst = (
char*)szDst_;
210 char* szSrc = (
char*)szSrc_;
217 while (*szSrc != 0) { *szDst++ = *szSrc++; }
223 auto* szTmpPat = szPattern_;
230 while (szBuffer_[i16Idx] != 0) {
233 szTmpPat = (
char*)szPattern_;
234 while ((*szTmpPat != 0) && (szBuffer_[i16Idx] != 0)) {
235 if (*szTmpPat != szBuffer_[i16Idx]) {
242 if (*szTmpPat ==
'\0') {
254 auto* szTmp1 =
static_cast<const char*
>(pvMem1_);
255 auto* szTmp2 =
static_cast<const char*
>(pvMem2_);
262 while ((u16Len_--) != 0u) {
263 if (*szTmp1++ != *szTmp2++) {
273 auto* szDst =
static_cast<char*
>(pvDst_);
277 while ((u16Len_--) != 0u) { *szDst++ = u8Val_; }
283 auto u8CurrArg = uint8_t{0};
284 auto u8LastArg = uint8_t{0};
287 auto bEscape =
false;
292 while (szBuffer_[i] != 0) {
294 if (szBuffer_[i] ==
'\"') {
301 if (szBuffer_[i] ==
'\\') {
303 if (szBuffer_[i] != 0) {
317 if (szBuffer_[i] !=
' ') {
322 pastTokens_[u8CurrArg].
pcToken = &(szBuffer_[u8LastArg]);
323 pastTokens_[u8CurrArg].
u8Len = i - u8LastArg;
325 if (u8CurrArg >= u8MaxTokens_) {
330 while (szBuffer_[i] ==
' ') { i++; }
334 if ((i != 0u) && (szBuffer_[i] == 0) && ((i - u8LastArg) != 0)) {
335 pastTokens_[u8CurrArg].
pcToken = &(szBuffer_[u8LastArg]);
336 pastTokens_[u8CurrArg].
u8Len = i - u8LastArg;
static void CopyMemory(void *pvDst_, const void *pvSrc_, uint16_t u16Len_)
CopyMemory.
Utility class containing memory, string, and conversion routines.
static void CopyString(char *szDst_, const char *szSrc_)
CopyString.
Basic data type primatives used throughout the OS.
static int16_t StringSearch(const char *szBuffer_, const char *szPattern_)
StringSearch.
static bool CompareStrings(const char *szStr1_, const char *szStr2_)
CompareStrings.
static bool CompareMemory(const void *pvMem1_, const void *pvMem2_, uint16_t u16Len_)
CompareMemory.
static void DecimalToString(uint8_t u8Data_, char *szText_)
DecimalToString.
static uint8_t Tokenize(const char *szBuffer_, Token_t *pastTokens_, uint8_t u8MaxTokens_)
Tokenize Function to tokenize a string based on a space delimeter. This is a non-destructive function...
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
Macros and functions used for assertions, kernel traces, etc.
Token descriptor struct format.
const char * pcToken
Pointer to the beginning of the token string.
static uint8_t Checksum8(const void *pvSrc_, uint16_t u16Len_)
Checksum8.
static uint16_t Checksum16(const void *pvSrc_, uint16_t u16Len_)
Checksum16.
static void SetMemory(void *pvDst_, uint8_t u8Val_, uint16_t u16Len_)
SetMemory.
static uint16_t StringLength(const char *szStr_)
StringLength.
uint8_t u8Len
Length of the token (in bytes)