Example program for EVAL-ADMX2001
Dependencies: ADMX2001
calibrate.h@15:fca7551aaf0a, 2021-11-17 (annotated)
- Committer:
- nsheth
- Date:
- Wed Nov 17 18:15:37 2021 +0000
- Revision:
- 15:fca7551aaf0a
- Parent:
- 10:186e097fb1e3
Updating default .lib file for eval platform
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nsheth | 5:746e78113d7d | 1 | /* Copyright (c) 2021 Analog Devices, Inc. All rights reserved. |
nsheth | 5:746e78113d7d | 2 | |
nsheth | 5:746e78113d7d | 3 | Redistribution and use in source and binary forms, with or without modification, |
nsheth | 5:746e78113d7d | 4 | are permitted provided that the following conditions are met: |
nsheth | 5:746e78113d7d | 5 | - Redistributions of source code must retain the above copyright notice, |
nsheth | 5:746e78113d7d | 6 | this list of conditions and the following disclaimer. |
nsheth | 5:746e78113d7d | 7 | - Redistributions in binary form must reproduce the above copyright notice, |
nsheth | 5:746e78113d7d | 8 | this list of conditions and the following disclaimer in the documentation |
nsheth | 5:746e78113d7d | 9 | and/or other materials provided with the distribution. |
nsheth | 5:746e78113d7d | 10 | - Modified versions of the software must be conspicuously marked as such. |
nsheth | 5:746e78113d7d | 11 | - This software is licensed solely and exclusively for use with processors/products |
nsheth | 5:746e78113d7d | 12 | manufactured by or for Analog Devices, Inc. |
nsheth | 5:746e78113d7d | 13 | - This software may not be combined or merged with other code in any manner |
nsheth | 5:746e78113d7d | 14 | that would cause the software to become subject to terms and conditions which |
nsheth | 5:746e78113d7d | 15 | differ from those listed here. |
nsheth | 5:746e78113d7d | 16 | - Neither the name of Analog Devices, Inc. nor the names of its contributors |
nsheth | 5:746e78113d7d | 17 | may be used to endorse or promote products derived from this software without |
nsheth | 5:746e78113d7d | 18 | specific prior written permission. |
nsheth | 5:746e78113d7d | 19 | - The use of this software may or may not infringe the patent rights of one or |
nsheth | 5:746e78113d7d | 20 | more patent holders. This license does not release you from the requirement |
nsheth | 5:746e78113d7d | 21 | that you obtain separate licenses from these patent holders to use this software. |
nsheth | 5:746e78113d7d | 22 | |
nsheth | 5:746e78113d7d | 23 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND |
nsheth | 5:746e78113d7d | 24 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
nsheth | 5:746e78113d7d | 25 | TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN |
nsheth | 5:746e78113d7d | 26 | NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
nsheth | 5:746e78113d7d | 27 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES |
nsheth | 5:746e78113d7d | 28 | (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL |
nsheth | 5:746e78113d7d | 29 | PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
nsheth | 5:746e78113d7d | 30 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
nsheth | 5:746e78113d7d | 31 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
nsheth | 5:746e78113d7d | 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
nsheth | 5:746e78113d7d | 33 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
nsheth | 5:746e78113d7d | 34 | |
nsheth | 5:746e78113d7d | 35 | 2021-01-10-7CBSD SLA |
nsheth | 5:746e78113d7d | 36 | */ |
nsheth | 5:746e78113d7d | 37 | |
nsheth | 5:746e78113d7d | 38 | |
nsheth | 5:746e78113d7d | 39 | /** |
nsheth | 5:746e78113d7d | 40 | * @file: calibrate.h |
nsheth | 5:746e78113d7d | 41 | * @brief: This file contains type definitions and function prototype |
nsheth | 8:bd0b93e35392 | 42 | * for calibrate.cpp |
nsheth | 5:746e78113d7d | 43 | */ |
nsheth | 5:746e78113d7d | 44 | |
nsheth | 5:746e78113d7d | 45 | #ifndef __CALIBRATE_H__ |
nsheth | 5:746e78113d7d | 46 | #define __CALIBRATE_H__ |
nsheth | 5:746e78113d7d | 47 | |
nsheth | 5:746e78113d7d | 48 | /*============= I N C L U D E S =============*/ |
nsheth | 9:29db35656fcb | 49 | |
nsheth | 5:746e78113d7d | 50 | #include <stdint.h> |
nsheth | 5:746e78113d7d | 51 | |
nsheth | 5:746e78113d7d | 52 | /*============= D E F I N E S =============*/ |
nsheth | 5:746e78113d7d | 53 | |
nsheth | 5:746e78113d7d | 54 | /** |
nsheth | 5:746e78113d7d | 55 | * @brief enumeration for all calibration coeffs |
nsheth | 5:746e78113d7d | 56 | * |
nsheth | 5:746e78113d7d | 57 | */ |
nsheth | 5:746e78113d7d | 58 | typedef enum |
nsheth | 5:746e78113d7d | 59 | { |
nsheth | 5:746e78113d7d | 60 | CAL_TYPE_NO_CAL = 0, /**< No Calibration */ |
nsheth | 5:746e78113d7d | 61 | CAL_TYPE_OPEN, /**< OPEN Calibration*/ |
nsheth | 5:746e78113d7d | 62 | CAL_TYPE_SHORT, /**< SHORT Calibration */ |
nsheth | 5:746e78113d7d | 63 | CAL_TYPE_LOAD, /**< LOAD Calibration */ |
nsheth | 5:746e78113d7d | 64 | } CAL_TYPE; |
nsheth | 5:746e78113d7d | 65 | |
nsheth | 5:746e78113d7d | 66 | |
nsheth | 5:746e78113d7d | 67 | /*============= F U N C T I O N P R O T O T Y P E S =============*/ |
nsheth | 5:746e78113d7d | 68 | |
nsheth | 5:746e78113d7d | 69 | /** |
nsheth | 5:746e78113d7d | 70 | * @details perform specified cal type calibration . |
nsheth | 5:746e78113d7d | 71 | * @param [in] calType - type of calibration |
nsheth | 5:746e78113d7d | 72 | * @param [in] stdR - load value for Rt/Load calibration |
nsheth | 5:746e78113d7d | 73 | * @param [in] stdX - load value for Xt/Load calibration |
nsheth | 5:746e78113d7d | 74 | * @return ADMX_LCR_STATUS_SUCCESS - Success |
nsheth | 5:746e78113d7d | 75 | * |
nsheth | 5:746e78113d7d | 76 | */ |
nsheth | 5:746e78113d7d | 77 | int32_t Calibrate(CAL_TYPE calType, float stdR, float stdX); |
nsheth | 5:746e78113d7d | 78 | |
nsheth | 5:746e78113d7d | 79 | #endif /* __CALIBRATE_H__ */ |