sjanc commented on code in PR #1540:
URL: https://github.com/apache/mynewt-nimble/pull/1540#discussion_r1250537116
##########
nimble/host/include/host/ble_dtm.h:
##########
@@ -25,25 +25,120 @@
extern "C" {
#endif
+/**
+ * @file ble_dtm.h
+ *
+ * @brief DTM (Direct Test Mode)
+ *
+ * This header file provides the interface and data structures for working with
+ * the Direct Test Mode (DTM) functionality in a BLE (Bluetooth Low Energy)
host.
+ * DTM allows for testing and validation of the BLE radio performance by
enabling
+ * custom transmission and reception of data packets.
+ *
+ * @defgroup bt_host_dtm Bluetooth Host Direct Test Mode
+ * @ingroup bt_host
+ * @{
+ */
+
+/**
+ * @struct ble_dtm_rx_params
+ * @brief Parameters for DTM RX test.
+ *
+ * This structure represents the parameters for a Direct Test Mode (DTM)
receiver test.
+ */
struct ble_dtm_rx_params {
+ /** The channel to use for the RX test. */
uint8_t channel;
+
+ /** The PHY to use for the RX test. */
uint8_t phy;
+
+ /** The modulation index to use for the RX test. */
uint8_t modulation_index;
};
+/**
+ * @brief Start a Direct Test Mode (DTM) receiver test.
+ *
+ * This function starts a DTM RX test with the provided parameters.
+ *
+ * @param params The parameters for the DTM RX test.
+ *
+ * @return 0 on success;
+ * A Bluetooth Host Error Code on failure:
Review Comment:
looks good but I don't think we need to comment on every possible error code
here, just note that "0 on success, nonzero on failure." (otherwise this will
get out of sync eventually)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]