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

One decoded co-processor announcement. More...

#include <ra8_c6link.h>

Collaboration diagram for ra8_c6link_event:

Data Fields

ra8_c6link_event_kind_t kind
 Which announcement this is.
uint8_t ssid_len
 Octets of ssid the C6 supplied.
uint8_t channel
 Primary channel, sta_connected.
int8_t rssi
 Signal level, sta_disconnected.
uint16_t reason
 802.11 reason code, sta_disconnected.
int32_t wifi_event_id
 Raw id, wifi.
uint32_t reset_reason
 Co-processor reset cause, boot.
ra8_c6link_mac_t bssid
 AP address for the two station events.
char ssid [k_ra8_c6link_ssid_max+1U]
 AP SSID, NUL-terminated.

Detailed Description

One decoded co-processor announcement.

A flat record rather than a union: the whole thing is 48 bytes, it is passed by const pointer into a callback that must not keep it, and a union would buy nothing but a discriminant nobody can forget to check.

Which fields carry meaning depends on kind: boot sets reset_reason; sta_connected sets ssid, ssid_len, bssid and channel; sta_disconnected sets ssid, ssid_len, bssid, reason and rssi; wifi sets wifi_event_id. Every other field is zero.

Invariant
ssid_len never exceeds k_ra8_c6link_ssid_max.
ssid is NUL-terminated at ssid_len, so it is printable directly even when the co-processor sent no terminator.
Example:
static void on_event(void* ctx, const ra8_c6link_event_t* ev)
{
(void)ctx;
if (ev->kind == k_ra8_c6link_event_boot) { announce(); }
}
See also
ra8_c6link_event_cb_t
Since
0.1.0

Definition at line 297 of file ra8_c6link.h.

Field Documentation

◆ bssid

ra8_c6link_mac_t ra8_c6link_event::bssid

AP address for the two station events.

Definition at line 305 of file ra8_c6link.h.

Referenced by internal_c6link_rpc_ev_connected(), and internal_c6link_rpc_ev_disconnected().

◆ channel

uint8_t ra8_c6link_event::channel

Primary channel, sta_connected.

Definition at line 300 of file ra8_c6link.h.

Referenced by internal_c6link_rpc_ev_connected().

◆ kind

◆ reason

uint16_t ra8_c6link_event::reason

802.11 reason code, sta_disconnected.

Definition at line 302 of file ra8_c6link.h.

Referenced by c6_join_on_event(), c6_wifi_on_event(), internal_c6link_on_event(), and internal_c6link_rpc_ev_disconnected().

◆ reset_reason

uint32_t ra8_c6link_event::reset_reason

Co-processor reset cause, boot.

Definition at line 304 of file ra8_c6link.h.

Referenced by internal_c6link_rpc_event().

◆ rssi

int8_t ra8_c6link_event::rssi

Signal level, sta_disconnected.

Definition at line 301 of file ra8_c6link.h.

Referenced by internal_c6link_rpc_ev_disconnected().

◆ ssid

char ra8_c6link_event::ssid[k_ra8_c6link_ssid_max+1U]

AP SSID, NUL-terminated.

Definition at line 307 of file ra8_c6link.h.

Referenced by c6_wifi_on_event(), internal_c6link_rpc_ev_connected(), and internal_c6link_rpc_ev_disconnected().

◆ ssid_len

uint8_t ra8_c6link_event::ssid_len

Octets of ssid the C6 supplied.

Definition at line 299 of file ra8_c6link.h.

Referenced by c6_wifi_on_event(), internal_c6link_rpc_ev_connected(), and internal_c6link_rpc_ev_disconnected().

◆ wifi_event_id

int32_t ra8_c6link_event::wifi_event_id

Raw id, wifi.

Definition at line 303 of file ra8_c6link.h.

Referenced by c6_wifi_on_event(), and internal_c6link_rpc_event().


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