DeterministicESPAsyncWebServer 1.2.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
physical.h
Go to the documentation of this file.
1// Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4/**
5 * @file physical.h
6 * @brief Layer 1 (Physical) — WiFi radio initialisation and link-state query.
7 *
8 * Wraps the Arduino WiFi library into the OSI-layered interface used by
9 * this library. On ESP32, the "physical" link is the 802.11 radio managed
10 * by the Espressif WiFi stack (not a discrete PHY chip).
11 *
12 * @author Douglas Quigg (dstroy0)
13 * @date 2026
14 */
15
16#ifndef DETERMINISTICESPASYNCWEBSERVER_PHYSICAL_H
17#define DETERMINISTICESPASYNCWEBSERVER_PHYSICAL_H
18
19#include <Arduino.h>
20
21/**
22 * @brief Connect to a WiFi access point.
23 *
24 * Calls `WiFi.begin()` and returns immediately; it does not block waiting
25 * for the association to complete. Poll wifi_ready() to check link status.
26 *
27 * @param ssid Network SSID (null-terminated).
28 * @param password WPA2 passphrase (null-terminated).
29 * @return Always returns `true` (WiFi.begin() is fire-and-forget).
30 */
31bool init_wifi_physical(const char *ssid, const char *password);
32
33/**
34 * @brief Query whether the WiFi link is up.
35 *
36 * @return `true` if associated with an AP and an IP address is assigned.
37 */
38bool wifi_ready();
39
40#endif
bool wifi_ready()
Query whether the WiFi link is up.
Definition physical.cpp:23
bool init_wifi_physical(const char *ssid, const char *password)
Connect to a WiFi access point.
Definition physical.cpp:17