ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_esp_hosted_fmt_cursor Struct Reference

Write cursor over the caller's output buffer. More...

Data Fields

char * out
 Destination buffer.
uint32_t cap
 Capacity including the terminator.
uint32_t len
 Characters written so far.

Detailed Description

Write cursor over the caller's output buffer.

Carries the capacity alongside the position so the terminator reserve is enforced in one place. len is also the value the driver returns, so truncation is reported without a second measurement pass.

Invariant
len is always strictly less than cap while cap is non-zero.
out is null only when cap is zero.
Example:
ra8_esp_hosted_fmt_cursor_t cur = { .out = buf, .cap = sizeof(buf), .len = 0U };
struct ra8_esp_hosted_fmt_cursor ra8_esp_hosted_fmt_cursor_t
uint32_t len
Characters written so far.
See also
priv_ra8_esp_hosted_fmt_vformat
Since
0.1.0

Definition at line 139 of file ra8_esp_hosted_fmt.c.

Field Documentation

◆ cap

uint32_t ra8_esp_hosted_fmt_cursor::cap

Capacity including the terminator.

Definition at line 141 of file ra8_esp_hosted_fmt.c.

Referenced by internal_put().

◆ len

uint32_t ra8_esp_hosted_fmt_cursor::len

Characters written so far.

Definition at line 142 of file ra8_esp_hosted_fmt.c.

Referenced by internal_put(), and priv_ra8_esp_hosted_fmt_vformat().

◆ out

char* ra8_esp_hosted_fmt_cursor::out

Destination buffer.

Definition at line 140 of file ra8_esp_hosted_fmt.c.

Referenced by internal_put(), and priv_ra8_esp_hosted_fmt_vformat().


The documentation for this struct was generated from the following file: