Skip to content

Commit 36763fd

Browse files
committed
Document variants in ConnectionStatus enum
1 parent e25eb10 commit 36763fd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

esp32-wroom-rp/src/wifi.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
pub use crate::spi::Wifi;
22

3-
/// Defines the WiFi network connection status
3+
/// An enumerated type that represents the current WiFi network connection status.
44
#[repr(u8)]
55
#[derive(Eq, PartialEq, PartialOrd, Debug)]
66
pub enum ConnectionStatus {
7+
/// No device is connected to hardware
78
NoEsp32 = 255,
9+
/// Temporary status while attempting to connect to WiFi network
810
Idle = 0, // Assigned by WiFi.begin() in the Reference Library, is this relevant?
11+
/// No SSID is available
912
NoActiveSsid,
13+
/// WiFi network scan has finished
1014
ScanCompleted,
15+
/// Device is connected to WiFi network
1116
Connected,
17+
/// Device failed to connect to WiFi network
1218
Failed,
19+
/// Device lost connection to WiFi network
1320
Lost,
21+
/// Device disconnected from WiFi network
1422
Disconnected,
23+
/// Device is listening for connections in Access Point mode
1524
ApListening,
25+
/// Device is connected in Access Point mode
1626
ApConnected,
27+
/// Device failed to make connection in Access Point mode
1728
ApFailed, // Not in the Reference Library
29+
/// Unexpected value returned from device, reset may be required
1830
Invalid,
1931
}
2032

0 commit comments

Comments
 (0)