Vybhav Kadaba
/
EV-PRO-MW1001_Development_code_cleaup
Removed unwanted enums and unused functions
Diff: inc/admw_api.h
- Revision:
- 63:6d048b2f3f32
- Parent:
- 56:38b36e947602
--- a/inc/admw_api.h Wed Apr 08 10:05:08 2020 +0000 +++ b/inc/admw_api.h Thu Apr 09 12:01:25 2020 +0000 @@ -113,17 +113,6 @@ } ADMW_DEVICE_STATUS_FLAGS; -/*! Bit masks (flags) for the different diagnostics status indicators. */ -typedef enum -{ - ADMW_DIAGNOSTICS_STATUS_CHECKSUM_ERROR = (1 << 0), - /*!< Indicates Error on Internal Checksum Calculations */ - ADMW_DIAGNOSTICS_STATUS_CONVERSION_ERROR = (1 << 8), - /*!< Indicates Error During Internal ADC Conversions */ - ADMW_DIAGNOSTICS_STATUS_CALIBRATION_ERROR = (1 << 9), - /*!< Indicates Error During Internal Device Calibrations */ - -} ADMW_DIAGNOSTICS_STATUS_FLAGS; /*! Bit masks (flags) for the different channel alert indicators. */ typedef enum @@ -151,8 +140,6 @@ { ADMW_DEVICE_STATUS_FLAGS deviceStatus; /*!< General summary status information from the device */ - ADMW_DIAGNOSTICS_STATUS_FLAGS diagnosticsStatus; - /*!< Diagnostic error status information from the device */ ADMW_CHANNEL_ALERT_FLAGS channelAlerts[ADMW1001_MAX_CHANNELS]; /*!< Per-channel alert status information from the device */ uint32_t errorCode; @@ -204,13 +191,6 @@ /*! Identifiers for the user configuration slots in persistent memory. */ typedef enum { - ADMW_FLASH_CONFIG_1, - -} ADMW_USER_CONFIG_SLOT; - -/*! Identifiers for the user configuration slots in persistent memory. */ -typedef enum -{ ADMW_FLASH_LUT_CHANNEL_0=0, ADMW_FLASH_LUT_CHANNEL_1, ADMW_FLASH_LUT_CHANNEL_2, @@ -219,6 +199,13 @@ } ADMW_USER_LUT_CONFIG_SLOT; +/*! Identifiers for the user configuration slots in persistent memory. */ +typedef enum +{ + ADMW_FLASH_CONFIG_1, + +} ADMW_USER_CONFIG_SLOT; + typedef struct { unsigned nDeviceIndex; @@ -459,71 +446,7 @@ * * @note No other command must be running when this is called. */ -ADMW_RESULT admw_EraseExternalFlash( - ADMW_DEVICE_HANDLE const hDevice); -/*! - * @brief Gets the number of samples stored in the external flash - * memory. - * - * @param[in] hDevice ADMW device context handle - * @param[in] pSampleCount Address of the return value. - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @note No other command must be running when this is called. - */ -ADMW_RESULT admw_GetExternalFlashSampleCount( - ADMW_DEVICE_HANDLE const hDevice, - uint32_t * nSampleCount); - -// DEBUG - TO BE DELETED -ADMW_RESULT admw_SetExternalFlashIndex( - ADMW_DEVICE_HANDLE const hDevice, - uint32_t nStartIndex); - -/*! - * @brief Read measurement samples stored in the the external flash memory. - * - * @param[in] hDevice ADMW device context handle - * @param[out] pSamples Pointer to return a set of requested data - * samples. - * @param[in] nStartIndex Index of first sample to retrieve. - * @param[in] nBytesPerSample The size, in bytes, of each sample. - * @param[in] nRequested Number of requested data samples. - * @param[out] pnReturned Number of valid data samples successfully - * retrieved. - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Reads the status registers and extracts the relevant information - * to return to the caller. - * - */ -ADMW_RESULT admw_GetExternalFlashData( - ADMW_DEVICE_HANDLE const hDevice, - ADMW_DATA_SAMPLE * const pSamples, - uint32_t const nIndex, - uint32_t const nRequested, - uint32_t * const pnReturned); - -/*! - * @brief Store the LUT data to persistent memory on the device. - * - * @param[in] hDevice ADMW device context handle - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Instructs the ADMW device to save the current contents of its - * LUT data buffer, set using @ref admw_SetLutData, to - * non-volatile memory. - * - * @note No other command must be running when this is called. - * @note Do not power down the device while this command is running. - */ ADMW_RESULT admw_SaveLutData( ADMW_DEVICE_HANDLE const hDevice); @@ -584,76 +507,8 @@ */ ADMW_RESULT admw_StopMeasurement( ADMW_DEVICE_HANDLE const hDevice); - -/*! - * @brief Run built-in diagnostic checks on the device. - * - * @param[in] hDevice ADMW device context handle - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Instructs the ADMW device to execute its built-in diagnostic - * tests, on any enabled measurement channels, according to the current - * applied configuration settings. Device status registers will be - * updated to indicate if any errors were detected by the diagnostics. - * - * @note No other command must be running when this is called. - */ -ADMW_RESULT admw_RunDiagnostics( - ADMW_DEVICE_HANDLE const hDevice); + -/*! - * @brief Run built-in calibration on the device. - * - * @param[in] hDevice ADMW device context handle - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Instructs the ADMW device to execute its self-calibration - * routines, on any enabled measurement channels, according to the - * current applied configuration settings. Device status registers - * will be updated to indicate if any errors were detected. - * - * @note No other command must be running when this is called. - */ -ADMW_RESULT admw_RunCalibration( - ADMW_DEVICE_HANDLE const hDevice); - -/*! - * @brief Run built-in digital calibration on the device. - * - * @param[in] hDevice ADMW device context handle - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Instructs the ADMW device to execute its calibration - * routines, on any enabled digital channels, according to the - * current applied configuration settings. Device status registers - * will be updated to indicate if any errors were detected. - * - * @note No other command must be running when this is called. - */ -ADMW_RESULT admw_RunDigitalCalibration( - ADMW_DEVICE_HANDLE const hDevice); - -/*! - * @brief Read the current status from the device registers. - * - * @param[in] hDevice ADMW device context handle - * @param[out] pStatus Pointer to return the status summary obtained from the - * device. - * - * @return Status - * - #ADMW_SUCCESS Call completed successfully. - * - * @details Reads the status registers and extracts the relevant information - * to return to the caller. - * - * @note This may be called at any time, assuming the device is ready. - */ ADMW_RESULT admw_GetStatus( ADMW_DEVICE_HANDLE const hDevice, ADMW_STATUS * const pStatus);