Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: WiconnectInterface.h
- Revision:
- 26:8067e3d463d3
- Parent:
- 21:17bb3eddcbae
- Child:
- 27:b63f5a9cdefa
--- a/WiconnectInterface.h Tue Aug 26 16:53:06 2014 -0700 +++ b/WiconnectInterface.h Thu Oct 23 15:16:06 2014 -0700 @@ -136,7 +136,7 @@ * @param[in] bringNetworkUp Flag indicating if the module should try to bring the network up upon initialization. * @return Result of initialization. See @ref WiconnectResult */ - WiconnectResult init(bool bringNetworkUp=true); + WiconnectResult init(bool bringNetworkUp=false); /** * @ingroup api_core_misc @@ -208,6 +208,19 @@ WiconnectResult getVersion(char *versionBuffer = NULL, int versionBufferSize = 0, const Callback &completeCallback = Callback()); + /** + * @ingroup api_core_misc + * + * @brief Update the wifi module's internal firmware. + * @param[in] forced Optional, If true, force update of all firmware files to latest version, else only update out-dated files. + * @param[in] versionStr Optional, If specified, update to specific firmware version, else update to latest version. + * @param[in] completeCallback Optional, callback when update is complete. 'result' callback argument contains result of update. + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult updateFirmware(bool forced = false, const char *versionStr = NULL, const Callback &completeCallback = Callback()); + + // ------------------------------------------------------------------------ @@ -452,7 +465,6 @@ void stopCurrentCommand(); - // ------------------------------------------------------------------------ @@ -512,6 +524,82 @@ // ------------------------------------------------------------------------ + /** + * @ingroup api_core_settings + * + * @brief Set a module setting + * + * Refer to: http://wiconnect.ack.me/2.0/variables + * for a list of the available settings and descriptions + * + * @param settingStr String module setting name. + * @param value The integer value to set + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult setSetting(const char *settingStr, uint32_t value); + + /** + * @ingroup api_core_settings + * + * @brief Set a module setting + * + * Refer to: http://wiconnect.ack.me/2.0/variables + * for a list of the available settings and descriptions + * + * @param settingStr String module setting name. + * @param value The string value to set + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult setSetting(const char *settingStr, const char *value); + + /** + * @ingroup api_core_settings + * + * @brief Get a module setting + * + * Refer to: http://wiconnect.ack.me/2.0/variables + * for a list of the available settings and descriptions + * + * @param settingStr String module setting name. + * @param valuePtr Pointer to buffer to contain integer value + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult getSetting(const char *settingStr, uint32_t *valuePtr); + + /** + * @ingroup api_core_settings + * + * @brief Get a module setting + * + * Refer to: http://wiconnect.ack.me/2.0/variables + * for a list of the available settings and descriptions + * + * @param settingStr String module setting name. + * @param valuePtr Pointer to hold pointer to internal API buffer containing retrieved setting result + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult getSetting(const char *settingStr, char **valuePtr); + + /** + * @ingroup api_core_settings + * + * @brief Get a module setting + * + * Refer to: http://wiconnect.ack.me/2.0/variables + * for a list of the available settings and descriptions + * + * @param settingStr String module setting name. + * @param valueBuffer Buffer to hold retrieved setting result + * @param valueBufferLen The length of the input buffer + * + * @return Result of method. See @ref WiconnectResult + */ + WiconnectResult getSetting(const char *settingStr, char *valueBuffer, uint16_t valueBufferLen); + /** * @ingroup api_core_settings