From 562a32eda64587b1d926bd7317b9a91a7aa655a4 Mon Sep 17 00:00:00 2001 From: h2zero Date: Sat, 27 Aug 2022 12:38:53 -0600 Subject: [PATCH] Add docs build. --- .github/workflows/build.yml | 9 +++++++++ .gitignore | 1 + docs/Doxyfile | 4 ++-- src/NimBLEClient.h | 3 ++- src/NimBLEDescriptor.cpp | 2 ++ src/NimBLEDevice.h | 3 ++- src/NimBLERemoteCharacteristic.cpp | 1 - src/NimBLEServer.h | 3 ++- 8 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0533a13..a8af038 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,3 +47,12 @@ jobs: . ${IDF_PATH}/export.sh cp -r components/esp-nimble-cpp/examples/* . idf.py -C ${{ matrix.example }} -DEXTRA_COMPONENT_DIRS=$PWD/components build + + build_docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Doxygen Action + uses: mattnotmitt/doxygen-action@v1.9.1 + with: + working-directory: 'docs/' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..343d1f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +docs/doxydocs \ No newline at end of file diff --git a/docs/Doxyfile b/docs/Doxyfile index 1c807c0..663ec28 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = . +OUTPUT_DIRECTORY = doxydocs # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -836,7 +836,7 @@ WARN_NO_PARAMDOC = NO # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. -WARN_AS_ERROR = NO +WARN_AS_ERROR = YES # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which diff --git a/src/NimBLEClient.h b/src/NimBLEClient.h index 8afc52b..486b3d0 100644 --- a/src/NimBLEClient.h +++ b/src/NimBLEClient.h @@ -130,6 +130,7 @@ public: /** * @brief Called when disconnected from the server. * @param [in] pClient A pointer to the calling client object. + * @param [in] reason Contains the reason code for the disconnection. */ virtual void onDisconnect(NimBLEClient* pClient, int reason); @@ -149,7 +150,7 @@ public: /** * @brief Called when the pairing procedure is complete. - * @param [in] desc A pointer to the struct containing the connection information.\n + * @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.\n * This can be used to check the status of the connection encryption/pairing. */ virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo); diff --git a/src/NimBLEDescriptor.cpp b/src/NimBLEDescriptor.cpp index c5fb712..28a1513 100644 --- a/src/NimBLEDescriptor.cpp +++ b/src/NimBLEDescriptor.cpp @@ -286,6 +286,7 @@ std::string NimBLEDescriptor::toString() { /** * @brief Callback function to support a read request. * @param [in] pDescriptor The descriptor that is the source of the event. + * @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info. */ void NimBLEDescriptorCallbacks::onRead(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo) { (void)pDescriptor; @@ -296,6 +297,7 @@ void NimBLEDescriptorCallbacks::onRead(NimBLEDescriptor* pDescriptor, NimBLEConn /** * @brief Callback function to support a write request. * @param [in] pDescriptor The descriptor that is the source of the event. + * @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info. */ void NimBLEDescriptorCallbacks::onWrite(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo) { (void)pDescriptor; diff --git a/src/NimBLEDevice.h b/src/NimBLEDevice.h index dbae118..a32c3b8 100644 --- a/src/NimBLEDevice.h +++ b/src/NimBLEDevice.h @@ -150,7 +150,8 @@ public: int max_events = 0); static bool stopAdvertising(uint8_t inst_id); static bool stopAdvertising(); -# else +# endif +# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) static NimBLEAdvertising* getAdvertising(); static bool startAdvertising(uint32_t duration = 0); static bool stopAdvertising(); diff --git a/src/NimBLERemoteCharacteristic.cpp b/src/NimBLERemoteCharacteristic.cpp index 9735568..e04fc9d 100644 --- a/src/NimBLERemoteCharacteristic.cpp +++ b/src/NimBLERemoteCharacteristic.cpp @@ -584,7 +584,6 @@ bool NimBLERemoteCharacteristic::setNotify(uint16_t val, notify_callback notifyC * @brief Subscribe for notifications or indications. * @param [in] notifications If true, subscribe for notifications, false subscribe for indications. * @param [in] notifyCallback A callback to be invoked for a notification. - * @param [in] response If true, require a write response from the descriptor write operation. * If NULL is provided then no callback is performed. * @return false if writing to the descriptor failed. */ diff --git a/src/NimBLEServer.h b/src/NimBLEServer.h index 65848bf..ea56ed7 100644 --- a/src/NimBLEServer.h +++ b/src/NimBLEServer.h @@ -57,7 +57,8 @@ public: int duration = 0, int max_events = 0); bool stopAdvertising(uint8_t inst_id); -#else +#endif +# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) NimBLEAdvertising* getAdvertising(); bool startAdvertising(uint32_t duration = 0); #endif