93#if IS_ACTIVE(HAS_FLASH_UTILS_ARCH)
94#define __swprintf flash_swprintf
96#define __swprintf swprintf
97__attribute__ ((format (
printf, 2, 3)))
113#if IS_ACTIVE(HAS_FLASH_UTILS_ARCH)
114#define swprintf(sw, fmt, ...) flash_swprintf(sw, TO_FLASH(fmt), ## __VA_ARGS__)
125#if !defined(CPU_NATIVE) \
126 && !(IS_USED(MODULE_PICOLIBC) && __BSD_VISIBLE) \
127 && !(IS_USED(MODULE_NEWLIB) && __BSD_VISIBLE && !defined(CPU_ESP8266))
143 volatile uint8_t *tmp = dest;
144 for (
size_t i = 0; i < n_bytes; i++) {
168ssize_t
strscpy(
char *dest,
const char *src,
size_t count);
180const void *
memchk(
const void *data, uint8_t c,
size_t len);
POSIX.1-2008 compliant version of the assert macro.
#define assert(cond)
abort the program if assertion is false
Utility functions, macros, and types for read-only memory.
#define printf(...)
A wrapper for the printf() function that passes arguments through unmodified, but fails to compile if...
#define FLASH_ATTR
C type qualifier required to place a variable in flash.
ssize_t strscpy(char *dest, const char *src, size_t count)
Copy the string, or as much of it as fits, into the dest buffer.
static size_t string_writer_len(const string_writer_t *sw)
Get the size of the string contained by the string writer.
const void * memchk(const void *data, uint8_t c, size_t len)
Check if the entire buffer is filled with the same byte.
static void explicit_bzero(void *dest, size_t n_bytes)
Like memset(dest, 0, n_bytes), but secure.
#define __swprintf
internal helper macro
static const char * string_writer_str(const string_writer_t *sw)
Get the string contained by the string writer.
static void string_writer_init(string_writer_t *sw, void *buffer, size_t len)
Initialize a string writer structure.
Common macros and compiler attributes/pragmas configuration.
char * position
current write pointer
const char * start
start of the target buffer
size_t capacity
remaining capacity of the buffer