ADISense1000 Version 2.1 code base

Fork of AdiSense1000_V21 by Sean Wilson

Committer:
kevin1990
Date:
Fri Oct 20 16:56:43 2017 +0000
Revision:
8:1cb384be42aa
v0.3 release (New Host API)

Who changed what in which revision?

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