|
1 | 1 | /**
|
2 | 2 | * @file EspressifESP8266.h
|
3 |
| - * @copyright 2020 Stroud Water Research Center |
| 3 | + * @copyright 2017-2022 Stroud Water Research Center |
4 | 4 | * Part of the EnviroDIY ModularSensors library for Arduino
|
5 | 5 | * @author Sara Geleskie Damiano <sdamiano@stroudcenter.org>
|
6 | 6 | *
|
|
193 | 193 | */
|
194 | 194 | class EspressifESP8266 : public loggerModem {
|
195 | 195 | public:
|
196 |
| - // Constructor/Destructor |
| 196 | + // Constructors/Destructor |
197 | 197 | /**
|
198 | 198 | * @brief Construct a new Espressif ESP8266 object.
|
199 | 199 | *
|
@@ -223,6 +223,35 @@ class EspressifESP8266 : public loggerModem {
|
223 | 223 | int8_t modemResetPin, int8_t modemSleepRqPin,
|
224 | 224 | const char* ssid, const char* pwd,
|
225 | 225 | int8_t espSleepRqPin = -1, int8_t espStatusPin = -1);
|
| 226 | + /** |
| 227 | + * @brief Construct a new Espressif ESP8266 object. |
| 228 | + * |
| 229 | + * The constuctor initializes all of the provided member variables, |
| 230 | + * constructs a loggerModem parent class with the appropriate timing for the |
| 231 | + * module, calls the constructor for a TinyGSM modem on the provided |
| 232 | + * modemStream, and creates a TinyGSM Client linked to the modem. |
| 233 | + * |
| 234 | + * @param modemStream The Arduino stream instance for serial communication. |
| 235 | + * @param powerPin @copydoc loggerModem::_powerPin |
| 236 | + * @param statusPin @copydoc loggerModem::_statusPin |
| 237 | + * This can be any DIO pin on the esp. It is only used in light sleep. |
| 238 | + * @param modemResetPin @copydoc loggerModem::_modemResetPin |
| 239 | + * This is the ESP's `RSTB/DIO16` pin. |
| 240 | + * @param ssid The wifi network ID. |
| 241 | + * @param pwd The wifi network password, **assuming WPA2**. |
| 242 | + * @param modemSleepRqPin @copydoc loggerModem::_modemSleepRqPin |
| 243 | + * This can be any DIO pin on the esp. It is only used in light sleep. |
| 244 | + * @param espSleepRqPin The DIO pin on the ESP8266 assigned to light sleep |
| 245 | + * wake. This can be any DIO pin on the esp. |
| 246 | + * @param espStatusPin The DIO pin on the ESP8566 assigned to status |
| 247 | + * indication. This can be any DIO pin on the esp. |
| 248 | + * |
| 249 | + * @see loggerModem::loggerModem |
| 250 | + */ |
| 251 | + EspressifESP8266(Stream* modemStream, int8_t powerPin, int8_t statusPin, |
| 252 | + int8_t modemResetPin, const char* ssid, const char* pwd, |
| 253 | + int8_t modemSleepRqPin = -1, int8_t espSleepRqPin = -1, |
| 254 | + int8_t espStatusPin = -1); |
226 | 255 | /**
|
227 | 256 | * @brief Destroy the Espressif ESP8266 object - no action taken
|
228 | 257 | */
|
@@ -276,5 +305,11 @@ class EspressifESP8266 : public loggerModem {
|
276 | 305 | int8_t _espSleepRqPin;
|
277 | 306 | int8_t _espStatusPin;
|
278 | 307 | };
|
| 308 | + |
| 309 | +/** |
| 310 | + * @brief typedef to avoid confusion for users |
| 311 | + */ |
| 312 | +typedef EspressifESP8266 EspressifESP32; |
| 313 | + |
279 | 314 | /**@}*/
|
280 | 315 | #endif // SRC_MODEMS_ESPRESSIFESP8266_H_
|
0 commit comments