Minor changes to support ADMW FWv1.17.75

Revision:
6:9d393a9677f4
Parent:
5:0728bde67bdb
Child:
8:2f2775c34640
--- a/inc/admw1001/admw1001_api.h	Wed Jun 05 05:39:15 2019 +0000
+++ b/inc/admw1001/admw1001_api.h	Sat Jun 15 14:30:49 2019 +0000
@@ -59,6 +59,32 @@
 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,/*
+Copyright 2019 (c) Analog Devices, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+  - Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+  - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+  - Neither the name of Analog Devices, Inc. nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+  - The use of this software may or may not infringe the patent rights
+    of one or more patent holders. This license does not release you
+    from the requirement that you obtain separate licenses from these
+    patent holders to use this software.
+  - Use of the software either in source or binary form, must be run
+    on or directly connected to an Analog Devices Inc. component.
+
+THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
@@ -66,19 +92,18 @@
 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
+ */
 
 /*!
  ******************************************************************************
- * @file:   adi_sense_api.h
- * @brief:  ADSNS1000 Host Library Application Programming Interface (API)
+ * @file:   admw_1001_api.h
+ * @brief:  ADMW1001 Host Library Application Programming Interface (API)
  *-----------------------------------------------------------------------------
  */
 
 #ifndef __ADMW1001_API_H__
 #define __ADMW1001_API_H__
 
-
 #include "inc/admw_types.h"
 #include "inc/admw_config_types.h"
 #include "inc/admw_platform.h"
@@ -115,6 +140,28 @@
  *       according to documentation for those registers.
  */
 ADMW_RESULT admw1001_ReadRegister(
+    ADMW_DEVICE_HANDLE       const hDevice,
+    uint16_t                   const nAddress,
+    void                     * const pData,
+    unsigned                   const nLength);
+/*!
+ * @brief Read one or more device registers at the specified debug register address.
+ *
+ * @param[in]  hDevice    ADMW1001 device context handle
+ * @param[in]  nAddress   Register map address to read from
+ * @param[out] pData      Pointer to return the register map data
+ * @param[in]  nLength    Number of bytes of data to read from the register map
+ *
+ * @return Status
+ *         - #ADMW_SUCCESS Call completed successfully.
+ *
+ * @details Provides direct byte-level read access to the device register map.
+ *          The size and format of the register(s) must be known.
+ *
+ * @note Reads from special "keyhole" or "FIFO" registers will be handled
+ *       according to documentation for those registers.
+ */
+ADMW_RESULT admw1001_Read_Debug_Register(
     ADMW_DEVICE_HANDLE    const hDevice,
     uint16_t                   const nAddress,
     void                     * const pData,
@@ -123,7 +170,7 @@
 /*!
  * @brief Write one or more device registers at the specified register address.
  *
- * @param[in]  hDevice    ADISENSE device context handle
+ * @param[in]  hDevice    ADMW1001 device context handle
  * @param[in]  nAddress   Register map address to read from
  * @param[out] pData      Pointer to return the register map data
  * @param[in]  nLength    Number of bytes of data to read from the register map
@@ -145,9 +192,29 @@
     unsigned                   const nLength);
 
 /*!
+ * @brief Write one or more device registers at the specified debug register address.
+ *
+ * @param[in]  hDevice    ADMW1001 device context handle
+ * @param[in]  nAddress   Register map address to read from
+ * @param[out] pData      Pointer to return the register map data
+ * @param[in]  nLength    Number of bytes of data to read from the register map
+ *
+ * @return Status
+ *         - #ADMW_SUCCESS Call completed successfully.
+ *
+ * @details Provides direct byte-level write access to the device register map.
+ *          The size and format of the register(s) must be known.
+ *
+ */
+ADMW_RESULT admw1001_Write_Debug_Register(
+    ADMW_DEVICE_HANDLE    const hDevice,
+    uint16_t                   const nAddress,
+    void                     * const pData,
+    unsigned                   const nLength);
+/*
  * @brief Update power configuration settings on the device.
  *
- * @param[in] hDevice      ADISENSE device context handle
+ * @param[in] hDevice      ADMW1001 device context handle
  * @param[in] pPowerConfig Power configuration details
  *
  * @return Status
@@ -156,7 +223,7 @@
  * @details Translates configuration details provided into device-specific
  *          register settings and updates device configuration registers.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetPowerConfig(
     ADMW_DEVICE_HANDLE hDevice,
@@ -165,7 +232,7 @@
 /*!
  * @brief Update measurement configuration settings on the device.
  *
- * @param[in] hDevice            ADISENSE device context handle
+ * @param[in] hDevice            ADMW1001 device context handle
  * @param[in] pMeasurementConfig Measurement configuration details
  *
  * @return Status
@@ -174,7 +241,7 @@
  * @details Translates configuration details provided into device-specific
  *          register settings and updates device configuration registers.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetMeasurementConfig(
     ADMW_DEVICE_HANDLE hDevice,
@@ -183,7 +250,7 @@
 /*!
  * @brief Update diagnostics configuration settings on the device.
  *
- * @param[in] hDevice            ADISENSE device context handle
+ * @param[in] hDevice            ADMW1001 device context handle
  * @param[in] pDiagnosticsConfig Diagnostics configuration details
  *
  * @return Status
@@ -192,7 +259,7 @@
  * @details Translates configuration details provided into device-specific
  *          register settings and updates device configuration registers.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetDiagnosticsConfig(
     ADMW_DEVICE_HANDLE hDevice,
@@ -201,7 +268,7 @@
 /*!
  * @brief Update channel configuration settings for a specific channel.
  *
- * @param[in] hDevice        ADISENSE device context handle
+ * @param[in] hDevice        ADMW1001 device context handle
  * @param[in] eChannelId     Selects the channel to be updated
  * @param[in] pChannelConfig Channel configuration details
  *
@@ -213,7 +280,7 @@
  *          Allows individual channel configuration details to be dynamically
  *          adjusted without rewriting the full device configuration.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetChannelConfig(
     ADMW_DEVICE_HANDLE hDevice,
@@ -223,7 +290,7 @@
 /*!
  * @brief Update number of measurements-per-cycle for a specific channel.
  *
- * @param[in] hDevice               ADISENSE device context handle
+ * @param[in] hDevice               ADMW1001 device context handle
  * @param[in] eChannelId            Selects the channel to be updated
  * @param[in] nMeasurementsPerCycle Specifies the number of measurements to be
  *                                  obtained from this channel in each
@@ -238,7 +305,7 @@
  *          Allows individual channels to be dynamically enabled/disabled, and
  *          measurements-per-cycle to be adjusted.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetChannelCount(
     ADMW_DEVICE_HANDLE hDevice,
@@ -248,7 +315,7 @@
 /*!
  * @brief Update priority level for a specific channel.
  *
- * @param[in] hDevice    ADI Sense device context handle
+ * @param[in] hDevice    ADMW1001 device context handle
  * @param[in] eChannelId Selects the channel to be updated
  * @param[in] ePriority  Specifies the channel priority level
  *
@@ -259,7 +326,7 @@
  *          register settings and updates device configuration registers.
  *          Allows individual channels to be dynamically re-prioritised.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetChannelPriority(
     ADMW_DEVICE_HANDLE hDevice,
@@ -269,7 +336,7 @@
 /*!
  * @brief Update the measurement threshold limits for a specified channel.
  *
- * @param[in] hDevice             ADISENSE device context handle
+ * @param[in] hDevice             ADMW1001 device context handle
  * @param[in] eChannelId          Selects the channel to be updated
  * @param[in] fHighThresholdLimit Optional maximum threshold value for each
  *                                processed sample, to be checked prior to
@@ -289,7 +356,7 @@
  *          register settings and updates device configuration registers.
  *          Allows individual channel thresholds to be dynamically adjusted.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetChannelThresholdLimits(
     ADMW_DEVICE_HANDLE hDevice,
@@ -301,7 +368,7 @@
 /*!
  * @brief Set a sensor specific parameter for a specified channel.
  *
- * @param[in] hDevice             ADI Sense device context handle
+ * @param[in] hDevice             ADMW1001 device context handle
  * @param[in] eChannelId          Selects the channel to be updated
  * @param[in] fSensorParam        Sensor specific parameter
  *
@@ -312,7 +379,7 @@
  *          register settings and updates device configuration registers.
  *          Allows optional sensor-specific parameter to be specified
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetSensorParameter(
      ADMW_DEVICE_HANDLE hDevice,
@@ -321,7 +388,7 @@
 /*!
  * @brief Update the extra settling time for a specified channel.
  *
- * @param[in] hDevice       ADISENSE device context handle
+ * @param[in] hDevice       ADMW1001 device context handle
  * @param[in] eChannelId    Selects the channel to be updated
  * @param[in] nSettlingTime A minimum settling time is applied internally for
  *                          each channel, based on the sensor type.  However,
@@ -336,7 +403,7 @@
  *          register settings and updates device configuration registers.
  *          Allows individual channel settling times to be dynamically adjusted.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetChannelSettlingTime(
     ADMW_DEVICE_HANDLE hDevice,
@@ -347,7 +414,7 @@
 /*!
  * @brief Enable access to advanced sensor configuration options.
  *
- * @param[in] hDevice       ADISENSE device context handle
+ * @param[in] hDevice       ADMW1001 device context handle
  * @param[in] key           Key to unlock advanced access
  *
  * @return Status
@@ -356,7 +423,7 @@
  * @details When the correct access key is provided, access to advanced sensor
  *          configuration options and use of advanced sensor types is enabled.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetAdvancedAccess(
     ADMW_DEVICE_HANDLE    const hDevice,
@@ -396,7 +463,7 @@
 /*!
  * @brief Write Look-Up Table data to the device memory
  *
- * @param[in]  hDevice  ADISENSE device context handle
+ * @param[in]  hDevice  ADMW1001 device context handle
  * @param[out] pLutData Pointer to the Look-Up Table data structure
  *
  * @return Status
@@ -405,7 +472,7 @@
  * @details Validates the Look-Up Table data format and loads it into
  *          device memory via dedicated keyhole registers.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetLutData(
     ADMW_DEVICE_HANDLE    const hDevice,
@@ -414,7 +481,7 @@
 /*!
  * @brief Write Look-Up Table raw data to the device memory
  *
- * @param[in]  hDevice  ADISENSE device context handle
+ * @param[in]  hDevice  ADMW device context handle
  * @param[out] pLutData Pointer to the Look-Up Table raw data structure
  *
  * @return Status
@@ -424,7 +491,7 @@
  *          loading LUT data from the alternative raw data format.  See
  *          @ref admw1001_SetLutData for more information.
  *
- * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called
+ * @note Settings are not applied until admw_ApplyConfigUpdates() is called
  */
 ADMW_RESULT admw1001_SetLutDataRaw(
     ADMW_DEVICE_HANDLE    const hDevice,
@@ -433,9 +500,9 @@
 /*!
  * @brief Get the number of samples available when DATAREADY status is asserted.
  *
- * @param[in]  hDevice               ADISENSE device context handle
+ * @param[in]  hDevice               ADMW device context handle
  * @param[in]  eMeasurementMode      Must be set to the same value used for @ref
- *                                   adi_sense_StartMeasurement().
+ *                                   admw_StartMeasurement().
  * @param[out] peOperatingMode       Pointer to return the configured operating mode
  * @param[out] peDataReadyMode       Pointer to return the configured data publishing mode
  * @param[out] pnSamplesPerDataready Pointer to return the calculated number of samples
@@ -470,5 +537,4 @@
  * @}
  */
 
-#endif /* __ADMW1001_API_H__ */
-
+#endif /* __ADMW1001_API_H__ */
\ No newline at end of file