MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_tiny_printf.h
Go to the documentation of this file.
1/**
2 * Copyright © 2024 - 2025 MeshX
3 *
4 * @file meshx_tiny_printf.h
5 * @brief Lightweight printf implementation to reduce flash footprint.
6 */
7
8#ifndef MESHX_TINY_PRINTF_H
9#define MESHX_TINY_PRINTF_H
10
11#include <stdarg.h>
12#include <stddef.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/**
19 * @brief Lightweight vsnprintf replacement.
20 * Supports: %s, %d, %u, %x, %X, %p, %c, %%.
21 * Supports padding with '0' and width specifier.
22 */
23int meshx_tiny_vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
24
25/**
26 * @brief Lightweight snprintf replacement.
27 */
28int meshx_tiny_snprintf(char *buf, size_t size, const char *fmt, ...);
29
30/**
31 * @brief Lightweight printf that writes directly to console.
32 */
33int meshx_tiny_printf(const char *fmt, ...);
34int meshx_tiny_vprintf(const char *fmt, va_list args);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif // MESHX_TINY_PRINTF_H
int meshx_tiny_vprintf(const char *fmt, va_list args)
Definition meshx_tiny_printf.c:157
int meshx_tiny_printf(const char *fmt,...)
Lightweight printf that writes directly to console.
Definition meshx_tiny_printf.c:166
int meshx_tiny_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
Lightweight vsnprintf replacement. Supports: s, d, u, x, X, p, c, %%. Supports padding with '0' and w...
Definition meshx_tiny_printf.c:74
int meshx_tiny_snprintf(char *buf, size_t size, const char *fmt,...)
Lightweight snprintf replacement.
Definition meshx_tiny_printf.c:149