From 44db046e5706f8695ad09ff25eddfe484c83e0c0 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Sat, 28 Oct 2023 17:22:27 -0500 Subject: [PATCH] Update Reference.md --- docs/Reference.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index 11d8afd..5806d08 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -157,8 +157,11 @@ The following **optional** `homeSpan` methods enable additional features and pro * :warning: SECURITY WARNING: The purpose of this function is to allow advanced users to *dynamically* set the device's WiFi Credentials using a customized Access Point function specified by `setApFunction(func)`. It it NOT recommended to use this function to hardcode your WiFi SSID and password directly into your sketch. Instead, use one of the more secure methods provided by HomeSpan, such as typing 'W' from the CLI, or launching HomeSpan's Access Point, to set your WiFi credentials without hardcoding them into your sketch * `Span& setWifiCallback(void (*func)())` - * sets an optional user-defined callback function, *func*, to be called by HomeSpan upon start-up just after WiFi connectivity has been established. This one-time call to *func* is provided for users that are implementing other network-related services as part of their sketch, but that cannot be started until WiFi connectivity is established. The function *func* must be of type *void* and have no arguments + * sets an optional user-defined callback function, *func*, to be called by HomeSpan upon start-up just after WiFi connectivity has been initially established. This one-time call to *func* is provided for users that are implementing other network-related services as part of their sketch, but that cannot be started until WiFi connectivity is established. The function *func* must be of type *void* and have no arguments +* `Span& setWifiCallbackAll(void (*func)(int count))` + * similar to `setWiFiCallback()` above, but the user-defined callback function, *func*, is called by HomeSpan *every* time WiFi connectivity has been established or re-established after a disconnect. The function *func* must be of type *void* and accept a single int argument, *count*, into which HomeSpan passes the number of times WiFi has been established or re-established (i.e. count=1 on initial WiFi connection; count=2 if re-established after the first disconnect, etc.) + * `Span& setPairCallback(void (*func)(boolean status))` * sets an optional user-defined callback function, *func*, to be called by HomeSpan upon completion of pairing to a controller (*status=true*) or unpairing from a controller (*status=false*) * this one-time call to *func* is provided for users that would like to trigger additional actions when the device is first paired, or the device is later unpaired