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