sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
|
ARM common standard c library wrapper macros. More...
#include <string.h>
#include <stdio.h>
Macros | |
#define | str_clr(s) (s[0] = charNull) |
clear string s (fast way) | |
#define | str_clr_safe(s) (memset(s, charNull, sizeof(s))) |
clear string s (safe way) | |
#define | str_add_tab(s) (strcat(s, '\t')) |
Adding tab to s string using strcat. | |
#define | str_add_cr(s) (strcat(s, '\r')) |
Adding carriage return to s string using strcat. | |
#define | str_add_lf(s) (strcat(s, '\n')) |
Adding line feed to s string using strcat. | |
#define | str_add_crlf(s) (strcat(s, '\r\n')) |
Adding carriage return and line feed to s string using strcat. | |
#define | printExpr(e) (printf("%s = %d\r\n", STR(e), (e))) |
Print expression e and it's result e using printf . | |
#define | verbInstr(i) (printf(STR(i)), (i)) |
Print instruction i and execute it. | |
#define | verbInc(x) (puts("Incrementing " STR(x)), (x)++) |
Increment example on x using puts . | |
#define | verbDec(x) (puts("Decrementing " STR(x)), (x)--) |
Decrement example on x using puts . | |
ARM common standard c library wrapper macros.
#define printExpr | ( | e | ) | (printf("%s = %d\r\n", STR(e), (e))) |
Print expression e
and it's result e
using printf
.
#define str_add_cr | ( | s | ) | (strcat(s, '\r')) |
Adding carriage return to s
string using strcat.
#define str_add_crlf | ( | s | ) | (strcat(s, '\r\n')) |
Adding carriage return and line feed to s
string using strcat.
#define str_add_lf | ( | s | ) | (strcat(s, '\n')) |
Adding line feed to s
string using strcat.
#define str_add_tab | ( | s | ) | (strcat(s, '\t')) |
Adding tab to s
string using strcat.
#define str_clr | ( | s | ) | (s[0] = charNull) |
clear string s
(fast way)
#define str_clr_safe | ( | s | ) | (memset(s, charNull, sizeof(s))) |
clear string s
(safe way)
#define verbDec | ( | x | ) | (puts("Decrementing " STR(x)), (x)--) |
Decrement example on x
using puts
.
#define verbInc | ( | x | ) | (puts("Incrementing " STR(x)), (x)++) |
Increment example on x
using puts
.
#define verbInstr | ( | i | ) | (printf(STR(i)), (i)) |
Print instruction i
and execute it.