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

One esp-hosted transaction buffer, addressable either way. More...

#include <c6_fwver.h>

Data Fields

uint8_t bytes [k_c6_fwver_frame_bytes]
 The transaction as the transport sees it: flat bytes.
struct esp_payload_header header
 The same storage as the protocol sees it: a payload header.

Detailed Description

One esp-hosted transaction buffer, addressable either way.

The transport clocks a flat byte array; the protocol reads a twelve-byte payload header off the front of it. Declaring both as members of one union makes that overlay legal by construction – union member access is defined in C, whereas casting the byte array to a header pointer is not, and clang-tidy's bugprone-casting-through-void says so.

Invariant
bytes and header name the same storage, so a write through either is visible through the other.
The union is exactly k_c6_fwver_frame_bytes long, because the header member is smaller than the byte member.
Example:
static c6_fwver_frame_t frame;
frame.header.len = 0U;
union c6_fwver_frame c6_fwver_frame_t
struct esp_payload_header header
The same storage as the protocol sees it: a payload header.
Definition c6_fwver.h:185
See also
c6_fwver_link_t
Since
0.1.0

Definition at line 182 of file c6_fwver.h.

Field Documentation

◆ bytes

uint8_t c6_fwver_frame::bytes[k_c6_fwver_frame_bytes]

The transaction as the transport sees it: flat bytes.

Definition at line 183 of file c6_fwver.h.

◆ header

struct esp_payload_header c6_fwver_frame::header

The same storage as the protocol sees it: a payload header.

Definition at line 185 of file c6_fwver.h.


The documentation for this union was generated from the following file:
  • examples/ek_ra8d2/hw_validated/c6/c6_fw_version/inc/c6_fwver.h