39#include "esp_hosted_host_fw_ver.h"
40#include "esp_hosted_interface.h"
41#include "esp_hosted_transport.h"
42#include "esp_hosted_transport_init.h"
44#include "transport_drv.h"
66typedef enum : uint8_t {
95typedef enum : uint8_t {
144 if ((out ==
nullptr) || (out_len ==
nullptr)) {
147 const uint16_t tlv_bytes =
163 (uint8_t)RCVD_ESP_FIRMWARE_CHIP_ID,
164 (uint8_t)ESP_PRIV_FIRMWARE_CHIP_ESP32C6);
168 (uint8_t)SLV_CONFIG_THROTTLE_HIGH_THRESHOLD,
172 (uint8_t)SLV_CONFIG_THROTTLE_LOW_THRESHOLD,
225 if ((if_type != (uint8_t)ESP_PRIV_IF) || (payload ==
nullptr) ||
238 if ((event_type != (uint8_t)ESP_PRIV_EVENT_INIT) ||
244 for (uint16_t seen = 0U; seen < event_len; seen++) {
Shared contract for the esp-hosted RPC round-trip application.
void c6_fwver_put_hex(uint32_t value, uint8_t digits)
Emit a value as a fixed-width lower-case hexadecimal field.
@ k_c6_fwver_hex_byte
Hex digits printed for a byte-wide field.
void c6_fwver_put_u32(uint32_t value)
Emit an unsigned 32-bit value in decimal.
void c6_fwver_puts(const char *text)
Write a NUL-terminated string to the board console.
ra8_err_t c6_fwver_priv_host_caps(uint8_t *out, uint16_t cap, uint16_t *out_len)
Build the host-capabilities frame the reference host sends first.
static void c6_fwver_priv_tlv(uint8_t tag, const uint8_t *value, uint8_t len)
Decode and report one TLV of an INIT event.
c6_fwver_priv_ver_t
Byte layout of the ESP_PRIV_FIRMWARE_VERSION tag's value.
@ k_c6_fwver_priv_shift_2
Shift for the 3rd byte.
@ k_c6_fwver_priv_ver_bytes
Width of the tag value.
@ k_c6_fwver_priv_ver_b1
Second byte.
@ k_c6_fwver_priv_shift_3
Shift for the 4th byte.
@ k_c6_fwver_priv_shift_1
Shift for the 2nd byte.
@ k_c6_fwver_priv_ver_b2
Third byte.
@ k_c6_fwver_priv_ver_b3
Most significant byte.
@ k_c6_fwver_priv_ver_b0
Least significant byte.
static uint32_t s_c6_fwver_priv_version
Version word the boot INIT event announced, or zero.
static uint16_t c6_fwver_priv_put_tlv(uint8_t *out, uint16_t at, uint8_t tag, uint8_t value)
Append one one-byte-valued TLV at a cursor.
bool c6_fwver_priv_consume(uint8_t if_type, uint8_t if_num, const uint8_t *payload, uint16_t len)
Decode an ESP_PRIV_IF frame and report what it announced.
c6_fwver_priv_t
Layout and values of the ESP_PRIV_IF event this host sends.
@ k_c6_fwver_priv_evt_type
Offset of the event type byte.
@ k_c6_fwver_priv_tlv_stride
Bytes one one-byte-valued TLV occupies.
@ k_c6_fwver_priv_tlv_tag
Offset of a TLV's tag, from its start.
@ k_c6_fwver_priv_host_cap
Host capability word; zero, as upstream.
@ k_c6_fwver_priv_evt_hdr
Bytes before the first TLV.
@ k_c6_fwver_priv_evt_len
Offset of the event length byte.
@ k_c6_fwver_priv_tlv_len
Value width of every tag this host emits.
@ k_c6_fwver_priv_tag_count
TLVs this host emits.
@ k_c6_fwver_priv_tlv_value
Offset of a TLV's value, from its start.
@ k_c6_fwver_priv_tlv_size
Offset of a TLV's length, from its start.
uint32_t c6_fwver_priv_init_version(void)
Report the version the boot INIT event announced, if one arrived.
esp-hosted port header: optional host features, RPC bounds, counters.
#define H_WIFI_TX_DATA_THROTTLE_HIGH_THRESHOLD
Queue occupancy, in percent, at which the co-processor throttles.
#define H_TEST_RAW_TP_DIR
Direction bitmap advertised for the raw-throughput test.
#define H_WIFI_TX_DATA_THROTTLE_LOW_THRESHOLD
Queue occupancy, in percent, at which throttling is released.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
@ k_ra8_err_invalid_size
Invalid size parameter (too large, too small, or misaligned).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.