ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_esp_hosted_fmt_internal.h
Go to the documentation of this file.
1
40
41#pragma once
42
43#include <stdarg.h>
44#include <stdint.h>
45
46#include "ra8_attributes.h"
47
82
111
144
192[[nodiscard]] bool priv_ra8_esp_hosted_fmt_parse(const char* after_percent,
194
236[[nodiscard]] uint8_t
237priv_ra8_esp_hosted_fmt_utoa(char* buf, uint64_t value, uint8_t base, bool upper);
238
291uint32_t priv_ra8_esp_hosted_fmt_vformat(char* out, uint32_t cap, const char* fmt, va_list ap);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
bool priv_ra8_esp_hosted_fmt_parse(const char *after_percent, ra8_esp_hosted_fmt_spec_t *out)
Parse one conversion specification.
struct ra8_esp_hosted_fmt_spec ra8_esp_hosted_fmt_spec_t
uint8_t priv_ra8_esp_hosted_fmt_utoa(char *buf, uint64_t value, uint8_t base, bool upper)
Render an unsigned value into a digit buffer, least digit last.
ra8_esp_hosted_fmt_len_t
Argument width selected by a conversion's length modifier.
@ k_ra8_esp_hosted_fmt_len_size
z; argument is size_t.
@ k_ra8_esp_hosted_fmt_len_long
l; argument is long.
@ k_ra8_esp_hosted_fmt_len_int
No modifier; argument is int.
@ k_ra8_esp_hosted_fmt_len_llong
ll; argument is long long.
ra8_esp_hosted_fmt_bound_t
Fixed bounds the formatter works within.
@ k_ra8_esp_hosted_fmt_spec_max
Longest run of specification characters accepted after a per-cent sign, which bounds the parser's loo...
@ k_ra8_esp_hosted_fmt_width_max
Largest field width honoured; anything wider is clamped.
@ k_ra8_esp_hosted_fmt_digits_max
Widest digit run the supported bases produce, from UINT64_MAX in base ten.
uint32_t priv_ra8_esp_hosted_fmt_vformat(char *out, uint32_t cap, const char *fmt, va_list ap)
Format into a bounded buffer from a variable-argument list.
One parsed conversion specification.
bool left_justify
The - flag was present.
bool zero_pad
The 0 flag was present.
uint16_t width
Minimum field width; zero if absent.
char conv
Conversion character, zero on failure.
ra8_esp_hosted_fmt_len_t len
Argument width from the length modifier.
uint8_t consumed
Characters consumed after the per-cent.