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

Caller-allocated Wi-Fi handle. More...

#include <ra8_wifi.h>

Collaboration diagram for ra8_wifi:

Data Fields

const ra8_wifi_backend_tbackend
 Bound radio operations.
void * backend_ctx
 Backend's opaque state.
ra8_wifi_ip_bind_fn ip_bind
 Bound IP-stack hook.
void * ip_ctx
 Context for ip_bind.
ra8_wifi_mac_t mac
 Cached station address.
ra8_wifi_lease_t lease
 Cached DHCP lease.
ra8_wifi_state_t state
 Lifecycle position.
int8_t rssi
 Last signal reading, dBm.
bool open
 The handle is initialised.
bool radio_on
 The radio has been started.
bool mac_valid
 mac has been read.

Detailed Description

Caller-allocated Wi-Fi handle.

Treat every field as private.

Zero-initialise (= {}) and pass to ra8_wifi_init. It holds only the bound configuration and a little cached state, so it is small enough for file scope and carries no buffers of its own – the backend owns those.

Invariant
open is true exactly between a successful ra8_wifi_init and the matching ra8_wifi_deinit.
state never exceeds k_ra8_wifi_state_ip_bound.
Example:
static ra8_wifi_t s_wifi
The Wi-Fi handle every operation goes through.
Definition main.c:66
struct ra8_wifi ra8_wifi_t
See also
ra8_wifi_init
Since
0.1.0

Definition at line 397 of file ra8_wifi.h.

Field Documentation

◆ backend

◆ backend_ctx

void* ra8_wifi::backend_ctx

◆ ip_bind

ra8_wifi_ip_bind_fn ra8_wifi::ip_bind

Bound IP-stack hook.

Definition at line 400 of file ra8_wifi.h.

Referenced by ra8_wifi_init(), and ra8_wifi_wait_ip().

◆ ip_ctx

void* ra8_wifi::ip_ctx

Context for ip_bind.

Definition at line 401 of file ra8_wifi.h.

Referenced by ra8_wifi_init(), and ra8_wifi_wait_ip().

◆ lease

ra8_wifi_lease_t ra8_wifi::lease

Cached DHCP lease.

Definition at line 403 of file ra8_wifi.h.

Referenced by ra8_wifi_disconnect(), ra8_wifi_get_ip(), ra8_wifi_status(), and ra8_wifi_wait_ip().

◆ mac

ra8_wifi_mac_t ra8_wifi::mac

Cached station address.

Definition at line 402 of file ra8_wifi.h.

Referenced by ra8_wifi_connect(), ra8_wifi_get_mac(), and ra8_wifi_wait_ip().

◆ mac_valid

bool ra8_wifi::mac_valid

mac has been read.

Definition at line 408 of file ra8_wifi.h.

Referenced by ra8_wifi_connect(), and ra8_wifi_get_mac().

◆ open

◆ radio_on

bool ra8_wifi::radio_on

The radio has been started.

Definition at line 407 of file ra8_wifi.h.

Referenced by internal_ensure_radio_up(), ra8_wifi_deinit(), and ra8_wifi_disconnect().

◆ rssi

int8_t ra8_wifi::rssi

Last signal reading, dBm.

Definition at line 405 of file ra8_wifi.h.

Referenced by ra8_wifi_get_ap(), and ra8_wifi_status().

◆ state


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