ADISense1000 Version 2.1 code base

Fork of AdiSense1000_V21 by Sean Wilson

Committer:
kevin1990
Date:
Mon Sep 25 14:45:35 2017 +0000
Revision:
6:ef0331efed74
v0.2 updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevin1990 6:ef0331efed74 1 /*!
kevin1990 6:ef0331efed74 2 ******************************************************************************
kevin1990 6:ef0331efed74 3 * @file: adi_sense_types.h
kevin1990 6:ef0331efed74 4 * @brief: Type definitions for ADI Sense API.
kevin1990 6:ef0331efed74 5 *-----------------------------------------------------------------------------
kevin1990 6:ef0331efed74 6 *
kevin1990 6:ef0331efed74 7 Copyright (c) 2017 Emutex Ltd. / Analog Devices, Inc.
kevin1990 6:ef0331efed74 8
kevin1990 6:ef0331efed74 9 All rights reserved.
kevin1990 6:ef0331efed74 10
kevin1990 6:ef0331efed74 11 Redistribution and use in source and binary forms, with or without modification,
kevin1990 6:ef0331efed74 12 are permitted provided that the following conditions are met:
kevin1990 6:ef0331efed74 13 - Redistributions of source code must retain the above copyright notice,
kevin1990 6:ef0331efed74 14 this list of conditions and the following disclaimer.
kevin1990 6:ef0331efed74 15 - Redistributions in binary form must reproduce the above copyright notice,
kevin1990 6:ef0331efed74 16 this list of conditions and the following disclaimer in the documentation
kevin1990 6:ef0331efed74 17 and/or other materials provided with the distribution.
kevin1990 6:ef0331efed74 18 - Modified versions of the software must be conspicuously marked as such.
kevin1990 6:ef0331efed74 19 - This software is licensed solely and exclusively for use with processors
kevin1990 6:ef0331efed74 20 manufactured by or for Analog Devices, Inc.
kevin1990 6:ef0331efed74 21 - This software may not be combined or merged with other code in any manner
kevin1990 6:ef0331efed74 22 that would cause the software to become subject to terms and conditions
kevin1990 6:ef0331efed74 23 which differ from those listed here.
kevin1990 6:ef0331efed74 24 - Neither the name of Analog Devices, Inc. nor the names of its
kevin1990 6:ef0331efed74 25 contributors may be used to endorse or promote products derived
kevin1990 6:ef0331efed74 26 from this software without specific prior written permission.
kevin1990 6:ef0331efed74 27 - The use of this software may or may not infringe the patent rights of one
kevin1990 6:ef0331efed74 28 or more patent holders. This license does not release you from the
kevin1990 6:ef0331efed74 29 requirement that you obtain separate licenses from these patent holders
kevin1990 6:ef0331efed74 30 to use this software.
kevin1990 6:ef0331efed74 31
kevin1990 6:ef0331efed74 32 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY
kevin1990 6:ef0331efed74 33 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
kevin1990 6:ef0331efed74 34 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
kevin1990 6:ef0331efed74 35 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
kevin1990 6:ef0331efed74 36 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
kevin1990 6:ef0331efed74 37 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
kevin1990 6:ef0331efed74 38 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
kevin1990 6:ef0331efed74 39 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
kevin1990 6:ef0331efed74 40 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
kevin1990 6:ef0331efed74 41 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
kevin1990 6:ef0331efed74 42 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
kevin1990 6:ef0331efed74 43 *
kevin1990 6:ef0331efed74 44 *****************************************************************************/
kevin1990 6:ef0331efed74 45 #ifndef __ADI_SENSE_TYPES_H__
kevin1990 6:ef0331efed74 46 #define __ADI_SENSE_TYPES_H__
kevin1990 6:ef0331efed74 47
kevin1990 6:ef0331efed74 48 /******************************************************************************/
kevin1990 6:ef0331efed74 49 /* Include Files */
kevin1990 6:ef0331efed74 50 /******************************************************************************/
kevin1990 6:ef0331efed74 51
kevin1990 6:ef0331efed74 52 /*!
kevin1990 6:ef0331efed74 53 *****************************************************************************
kevin1990 6:ef0331efed74 54 * \enum ADI_SENSE_RESULT
kevin1990 6:ef0331efed74 55 *
kevin1990 6:ef0331efed74 56 * ADI Sense API Error Codes. #ADI_SENSE_SUCCESS is always zero
kevin1990 6:ef0331efed74 57 * The return value of all ADI Sense APIs returning #ADI_SENSE_RESULT
kevin1990 6:ef0331efed74 58 * should always be tested at the application level for success or failure.
kevin1990 6:ef0331efed74 59 *
kevin1990 6:ef0331efed74 60 *****************************************************************************/
kevin1990 6:ef0331efed74 61 typedef enum
kevin1990 6:ef0331efed74 62 {
kevin1990 6:ef0331efed74 63 /*! Generic success. */
kevin1990 6:ef0331efed74 64 ADI_SENSE_SUCCESS,
kevin1990 6:ef0331efed74 65 /*! Generic Failure. */
kevin1990 6:ef0331efed74 66 ADI_SENSE_FAILURE,
kevin1990 6:ef0331efed74 67 /*! Operation incomplete, call again */
kevin1990 6:ef0331efed74 68 ADI_SENSE_INCOMPLETE,
kevin1990 6:ef0331efed74 69 /*! Device is already initialized. */
kevin1990 6:ef0331efed74 70 ADI_SENSE_IN_USE,
kevin1990 6:ef0331efed74 71 /*! Invalid device handle. */
kevin1990 6:ef0331efed74 72 ADI_SENSE_INVALID_HANDLE,
kevin1990 6:ef0331efed74 73 /*! Invalid device ID. */
kevin1990 6:ef0331efed74 74 ADI_SENSE_INVALID_DEVICE_NUM,
kevin1990 6:ef0331efed74 75 /*! Device is uninitialized. */
kevin1990 6:ef0331efed74 76 ADI_SENSE_ERR_NOT_INITIALIZED,
kevin1990 6:ef0331efed74 77 /*! NULL data pointer not allowed. */
kevin1990 6:ef0331efed74 78 ADI_SENSE_INVALID_POINTER,
kevin1990 6:ef0331efed74 79 /*! Parameter is out of range. */
kevin1990 6:ef0331efed74 80 ADI_SENSE_INVALID_PARAM,
kevin1990 6:ef0331efed74 81 /*! Unsupported mode of operation. */
kevin1990 6:ef0331efed74 82 ADI_SENSE_UNSUPPORTED_MODE,
kevin1990 6:ef0331efed74 83 /*! Invalid operation */
kevin1990 6:ef0331efed74 84 ADI_SENSE_INVALID_OPERATION,
kevin1990 6:ef0331efed74 85 /*! No data available, or buffer full */
kevin1990 6:ef0331efed74 86 ADI_SENSE_NO_DATA,
kevin1990 6:ef0331efed74 87 /*! No buffer space available */
kevin1990 6:ef0331efed74 88 ADI_SENSE_NO_SPACE,
kevin1990 6:ef0331efed74 89 /*! Square root of a negative number */
kevin1990 6:ef0331efed74 90 ADI_SENSE_NEGATIVE_SQRT,
kevin1990 6:ef0331efed74 91 /*! Division by 0 or 0.0 */
kevin1990 6:ef0331efed74 92 ADI_SENSE_DIVIDE_BY_ZERO,
kevin1990 6:ef0331efed74 93 /*! Invalid signature */
kevin1990 6:ef0331efed74 94 ADI_SENSE_INVALID_SIGNATURE,
kevin1990 6:ef0331efed74 95 /*! Wrong size */
kevin1990 6:ef0331efed74 96 ADI_SENSE_WRONG_SIZE,
kevin1990 6:ef0331efed74 97 /*! Sample Out of the dsp data limits */
kevin1990 6:ef0331efed74 98 ADI_SENSE_OUT_OF_RANGE,
kevin1990 6:ef0331efed74 99 /*! Unable to operate with not a number */
kevin1990 6:ef0331efed74 100 ADI_SENSE_NAN_FOUND,
kevin1990 6:ef0331efed74 101 /*! Timeout error */
kevin1990 6:ef0331efed74 102 ADI_SENSE_TIMEOUT,
kevin1990 6:ef0331efed74 103 } ADI_SENSE_RESULT;
kevin1990 6:ef0331efed74 104
kevin1990 6:ef0331efed74 105 #endif /* __ADI_SENSE_TYPES_H__ */
kevin1990 6:ef0331efed74 106