From c362d0b27e4fac29907f1765028c5aa28b45e4f1 Mon Sep 17 00:00:00 2001 From: brentru Date: Tue, 11 Feb 2025 14:58:34 -0500 Subject: [PATCH] complete doxygen pass through --- Doxyfile | 2 +- src/Wippersnapper_V2.h | 37 +++++++++++++++++--------- src/Wippersnapper_demo.ino.cpp | 22 +++++++++++++++ src/adapters/wifi/ws_wifi_airlift.h | 2 +- src/adapters/wifi/ws_wifi_esp32.h | 4 +-- src/adapters/wifi/ws_wifi_ninafw.h | 2 +- src/components/i2c/drivers/drvDps310.h | 7 +++-- src/display/ws_display_driver.h | 2 +- 8 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 src/Wippersnapper_demo.ino.cpp diff --git a/Doxyfile b/Doxyfile index 91d657f5..199b283e 100644 --- a/Doxyfile +++ b/Doxyfile @@ -380,7 +380,7 @@ MARKDOWN_ID_STYLE = DOXYGEN # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. -AUTOLINK_SUPPORT = YES +AUTOLINK_SUPPORT = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this diff --git a/src/Wippersnapper_V2.h b/src/Wippersnapper_V2.h index aa3e4dae..7aca11e1 100644 --- a/src/Wippersnapper_V2.h +++ b/src/Wippersnapper_V2.h @@ -9,10 +9,9 @@ * please support Adafruit and open-source hardware by purchasing * products from Adafruit! * - * Copyright (c) Brent Rubell 2020-2024 for Adafruit Industries. + * @copyright Copyright (c) Brent Rubell 2020-2024 for Adafruit Industries. * * BSD license, all text here must be included in any redistribution. - * */ #ifndef WIPPERSNAPPER_V2_H @@ -20,29 +19,41 @@ // Debug Flags // #DEBUG_PROFILE 1 ///< Enable debug output for function profiling - -#define WS_DEBUG ///< Define to enable debugging to serial terminal -#define WS_PRINTER Serial ///< Where debug messages will be printed +// Debug Flags +#define WS_DEBUG /**< Define to enable debugging to serial terminal */ +#define WS_PRINTER Serial /**< Where debug messages will be printed */ /**************************************************************************/ /*! - @brief Debug print macros + @brief Debug print macros for WipperSnapper debugging output + @details These macros provide debug output functionality when WS_DEBUG is + defined */ /**************************************************************************/ #ifdef WS_DEBUG #define WS_DEBUG_PRINT(...) \ - { WS_PRINTER.print(__VA_ARGS__); } ///< Prints debug output. + { WS_PRINTER.print(__VA_ARGS__); } /**< Print debug message to serial */ #define WS_DEBUG_PRINTLN(...) \ - { WS_PRINTER.println(__VA_ARGS__); } ///< Prints line from debug output. + { WS_PRINTER.println(__VA_ARGS__); } /**< Print debug message with newline \ + */ #define WS_DEBUG_PRINTHEX(...) \ - { WS_PRINTER.print(__VA_ARGS__, HEX); } ///< Prints debug output. + { \ + WS_PRINTER.print(__VA_ARGS__, HEX); \ + } /**< Print debug message in hexadecimal */ #else #define WS_DEBUG_PRINT(...) \ - {} ///< Prints debug output + {} /**< Debug print */ #define WS_DEBUG_PRINTLN(...) \ - {} ///< Prints line from debug output. + {} /**< Debug println */ #endif +/**************************************************************************/ +/*! + @brief delay() function for use with a watchdog timer + @param timeout + Delay duration in milliseconds +*/ +/**************************************************************************/ #define WS_DELAY_WITH_WDT(timeout) \ { \ unsigned long start = millis(); \ @@ -51,10 +62,10 @@ yield(); \ feedWDT(); \ if (millis() < start) { \ - start = millis(); /* if rollover */ \ + start = millis(); \ } \ } \ - } ///< Delay function + } // Cpp STD #include diff --git a/src/Wippersnapper_demo.ino.cpp b/src/Wippersnapper_demo.ino.cpp new file mode 100644 index 00000000..3291a638 --- /dev/null +++ b/src/Wippersnapper_demo.ino.cpp @@ -0,0 +1,22 @@ +# 1 "/var/folders/ff/dmzflvf52tq9kzvt6g8jglxw0000gn/T/tmpgufeaxcd" +#include +# 1 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino" +# 11 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino" +#include "ws_adapters.h" + +ws_adapter_offline wipper; + +#define WS_DEBUG +void setup(); +void loop(); +#line 17 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino" +void setup() { + Serial.begin(115200); + while (!Serial) delay(10); + wipper.provision(); + wipper.connect(); +} + +void loop() { + wipper.run(); +} \ No newline at end of file diff --git a/src/adapters/wifi/ws_wifi_airlift.h b/src/adapters/wifi/ws_wifi_airlift.h index 1510f0d7..d9904c32 100644 --- a/src/adapters/wifi/ws_wifi_airlift.h +++ b/src/adapters/wifi/ws_wifi_airlift.h @@ -34,7 +34,7 @@ #define SPIWIFI SPI /*!< Instance of SPI interface used by an AirLift. */ -extern Wippersnapper WS; +extern Wippersnapper WS; ///< Global Wippersnapper instance /****************************************************************************/ /*! @brief Class for using the AirLift Co-Processor network iface. diff --git a/src/adapters/wifi/ws_wifi_esp32.h b/src/adapters/wifi/ws_wifi_esp32.h index 6c8fd289..2de41568 100644 --- a/src/adapters/wifi/ws_wifi_esp32.h +++ b/src/adapters/wifi/ws_wifi_esp32.h @@ -8,7 +8,7 @@ * please support Adafruit and open-source hardware by purchasing * products from Adafruit! * - * Copyright (c) Brent Rubell 2020-2024 for Adafruit Industries. + * Copyright (c) Brent Rubell 2020-2025 for Adafruit Industries. * * MIT license, all text here must be included in any redistribution. * @@ -27,7 +27,7 @@ #include "WiFiMulti.h" #include #include -extern Wippersnapper_V2 WsV2; +extern Wippersnapper_V2 WsV2; ///< Wippersnapper client instance /****************************************************************************/ /*! diff --git a/src/adapters/wifi/ws_wifi_ninafw.h b/src/adapters/wifi/ws_wifi_ninafw.h index f2319077..811b81ff 100644 --- a/src/adapters/wifi/ws_wifi_ninafw.h +++ b/src/adapters/wifi/ws_wifi_ninafw.h @@ -27,7 +27,7 @@ #define SPIWIFI \ SPI /*!< Instance of SPI interface used by an external uBlox module. */ -extern Wippersnapper WS; +extern Wippersnapper WS; ///< Global Wippersnapper instance /****************************************************************************/ /*! @brief Class for using the AirLift Co-Processor network iface. diff --git a/src/components/i2c/drivers/drvDps310.h b/src/components/i2c/drivers/drvDps310.h index 2c4aad89..0406d69b 100644 --- a/src/components/i2c/drivers/drvDps310.h +++ b/src/components/i2c/drivers/drvDps310.h @@ -152,8 +152,11 @@ public: } protected: - sensors_event_t _temp_event, _pressure_event; - ulong _last_read; + sensors_event_t _temp_event = { + 0}; ///< DPS310 sensor event for temperature readings + sensors_event_t + _pressure_event; ///< DPS310 sensor event for pressure readings + ulong _last_read; ///< Last time the sensor was read Adafruit_DPS310 *_dps310; ///< DPS310 driver object Adafruit_Sensor *_dps_temp = NULL; ///< Holds data for the DPS310's temperature sensor diff --git a/src/display/ws_display_driver.h b/src/display/ws_display_driver.h index 853119c7..80f149df 100644 --- a/src/display/ws_display_driver.h +++ b/src/display/ws_display_driver.h @@ -51,6 +51,6 @@ private: uint8_t _displayRotationMode; ///< Display rotation (mode, not number in degrees) }; -extern Wippersnapper WS; +extern Wippersnapper WS; ///< Global Wippersnapper instance #endif // WIPPERSNAPPER_DISPLAY_H \ No newline at end of file