![](/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/mbed/adi_sense_platform.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_platform.h |
seanwilson10 | 0:76fed7dd9235 | 4 | * @brief: mbed platform-specific 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 (c) 2017 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 modification, |
seanwilson10 | 0:76fed7dd9235 | 14 | are permitted provided that the following conditions are met: |
seanwilson10 | 0:76fed7dd9235 | 15 | - Redistributions of source code must retain the above copyright notice, |
seanwilson10 | 0:76fed7dd9235 | 16 | this list of conditions and the following disclaimer. |
seanwilson10 | 0:76fed7dd9235 | 17 | - Redistributions in binary form must reproduce the above copyright notice, |
seanwilson10 | 0:76fed7dd9235 | 18 | this list of conditions and the following disclaimer in the documentation |
seanwilson10 | 0:76fed7dd9235 | 19 | and/or other materials provided with the distribution. |
seanwilson10 | 0:76fed7dd9235 | 20 | - Modified versions of the software must be conspicuously marked as such. |
seanwilson10 | 0:76fed7dd9235 | 21 | - This software is licensed solely and exclusively for use with processors |
seanwilson10 | 0:76fed7dd9235 | 22 | manufactured by or for Analog Devices, Inc. |
seanwilson10 | 0:76fed7dd9235 | 23 | - This software may not be combined or merged with other code in any manner |
seanwilson10 | 0:76fed7dd9235 | 24 | that would cause the software to become subject to terms and conditions |
seanwilson10 | 0:76fed7dd9235 | 25 | which differ from those listed here. |
seanwilson10 | 0:76fed7dd9235 | 26 | - Neither the name of Analog Devices, Inc. nor the names of its |
seanwilson10 | 0:76fed7dd9235 | 27 | contributors may be used to endorse or promote products derived |
seanwilson10 | 0:76fed7dd9235 | 28 | from this software without specific prior written permission. |
seanwilson10 | 0:76fed7dd9235 | 29 | - The use of this software may or may not infringe the patent rights of one |
seanwilson10 | 0:76fed7dd9235 | 30 | or more patent holders. This license does not release you from the |
seanwilson10 | 0:76fed7dd9235 | 31 | requirement that you obtain separate licenses from these patent holders |
seanwilson10 | 0:76fed7dd9235 | 32 | to use this software. |
seanwilson10 | 0:76fed7dd9235 | 33 | |
seanwilson10 | 0:76fed7dd9235 | 34 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY |
seanwilson10 | 0:76fed7dd9235 | 35 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
seanwilson10 | 0:76fed7dd9235 | 36 | TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN |
seanwilson10 | 0:76fed7dd9235 | 37 | NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
seanwilson10 | 0:76fed7dd9235 | 38 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES |
seanwilson10 | 0:76fed7dd9235 | 39 | (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL |
seanwilson10 | 0:76fed7dd9235 | 40 | PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
seanwilson10 | 0:76fed7dd9235 | 41 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
seanwilson10 | 0:76fed7dd9235 | 42 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
seanwilson10 | 0:76fed7dd9235 | 43 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
seanwilson10 | 0:76fed7dd9235 | 44 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
seanwilson10 | 0:76fed7dd9235 | 45 | */ |
seanwilson10 | 0:76fed7dd9235 | 46 | |
seanwilson10 | 0:76fed7dd9235 | 47 | #ifndef __ADI_SENSE_PLATFORM_MBED_H__ |
seanwilson10 | 0:76fed7dd9235 | 48 | #define __ADI_SENSE_PLATFORM_MBED_H__ |
seanwilson10 | 0:76fed7dd9235 | 49 | |
seanwilson10 | 0:76fed7dd9235 | 50 | /*! Maximum number of ADI Sense device instances supported on this platform */ |
seanwilson10 | 0:76fed7dd9235 | 51 | #define ADI_SENSE_PLATFORM_MAX_DEVICES 1 |
seanwilson10 | 0:76fed7dd9235 | 52 | |
seanwilson10 | 0:76fed7dd9235 | 53 | typedef struct { |
seanwilson10 | 0:76fed7dd9235 | 54 | int mosiPin; |
seanwilson10 | 0:76fed7dd9235 | 55 | int misoPin; |
seanwilson10 | 0:76fed7dd9235 | 56 | int sckPin; |
seanwilson10 | 0:76fed7dd9235 | 57 | int csPin; |
seanwilson10 | 0:76fed7dd9235 | 58 | int maxSpeedHz; |
seanwilson10 | 0:76fed7dd9235 | 59 | } ADI_SENSE_PLATFORM_SPI_CONFIG; |
seanwilson10 | 0:76fed7dd9235 | 60 | |
seanwilson10 | 0:76fed7dd9235 | 61 | typedef struct { |
seanwilson10 | 0:76fed7dd9235 | 62 | int resetPin; |
seanwilson10 | 0:76fed7dd9235 | 63 | int errorPin; |
seanwilson10 | 0:76fed7dd9235 | 64 | int alertPin; |
seanwilson10 | 0:76fed7dd9235 | 65 | int datareadyPin; |
seanwilson10 | 0:76fed7dd9235 | 66 | } ADI_SENSE_PLATFORM_GPIO_CONFIG; |
seanwilson10 | 0:76fed7dd9235 | 67 | |
seanwilson10 | 0:76fed7dd9235 | 68 | #endif /* __ADI_SENSE_PLATFORM_MBED_H__ */ |
seanwilson10 | 0:76fed7dd9235 | 69 |