sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
Loading...
Searching...
No Matches
arm_stdclib.h File Reference

ARM common standard c library wrapper macros. More...

#include <string.h>
#include <stdio.h>
Include dependency graph for arm_stdclib.h:
This graph shows which files directly or indirectly include this file:

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.
 

Detailed Description

ARM common standard c library wrapper macros.

Author
SMFSW

Macro Definition Documentation

◆ printExpr

#define printExpr ( e)    (printf("%s = %d\r\n", STR(e), (e)))

Print expression e and it's result e using printf.

◆ str_add_cr

#define str_add_cr ( s)    (strcat(s, '\r'))

Adding carriage return to s string using strcat.

◆ str_add_crlf

#define str_add_crlf ( s)    (strcat(s, '\r\n'))

Adding carriage return and line feed to s string using strcat.

◆ str_add_lf

#define str_add_lf ( s)    (strcat(s, '\n'))

Adding line feed to s string using strcat.

◆ str_add_tab

#define str_add_tab ( s)    (strcat(s, '\t'))

Adding tab to s string using strcat.

◆ str_clr

#define str_clr ( s)    (s[0] = charNull)

clear string s (fast way)

◆ str_clr_safe

#define str_clr_safe ( s)    (memset(s, charNull, sizeof(s)))

clear string s (safe way)

◆ verbDec

#define verbDec ( x)    (puts("Decrementing " STR(x)), (x)--)

Decrement example on x using puts.

◆ verbInc

#define verbInc ( x)    (puts("Incrementing " STR(x)), (x)++)

Increment example on x using puts.

◆ verbInstr

#define verbInstr ( i)    (printf(STR(i)), (i))

Print instruction i and execute it.