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