1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/fmt_table.h
Marian Buschsieweke 26d73116f6
sys/fmt: Added submodule fmt_table
print_col_u32_dec() / print_col_s32_dec() can be used to print an
uint32_t / int32_t as a column of the given width
2019-08-20 14:32:49 +02:00

57 lines
1.4 KiB
C

/*
* Copyright 2019 Otto-von-Guericke-Universität Magdeburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @defgroup sys_fmt_table Table extension of the string formatting API (fmt_table)
* @ingroup sys_fmt
* @brief Provides utilities to print tables.
*
* \note The print functions in this library do not buffer any output.
* Mixing calls to standard @c printf from stdio.h with the @c print_xxx
* functions in fmt, especially on the same output line, may cause garbled
* output.
*
* @{
*
* @file
* @brief Table extension of the string formatting API
*
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
*/
#ifndef FMT_TABLE_H
#define FMT_TABLE_H
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Print a table column with the given number as decimal
* @param number Number to print in the column
* @param width Width of the column
*/
void print_col_u32_dec(uint32_t number, size_t width);
/**
* @brief Print a table column with the given number as decimal
* @param number Number to print in the column
* @param width Width of the column
*/
void print_col_s32_dec(int32_t number, size_t width);
#ifdef __cplusplus
}
#endif
/** @} */
#endif /* FMT_TABLE_H */