Sean Wilson
/
AdiSense1000_V21
AdiSense1000_V21 MBED API
Fork of AdiSense1000 by
inc/mbed/adi_sense_platform.h@32:262fc8aeb486, 2018-07-24 (annotated)
- Committer:
- seanwilson10
- Date:
- Tue Jul 24 11:49:57 2018 +0000
- Revision:
- 32:262fc8aeb486
- Parent:
- 28:4eb837cd71df
v2.1 imported
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
danodonovan | 26:12d0204be712 | 1 | /* |
danodonovan | 26:12d0204be712 | 2 | Copyright (c) 2017 Analog Devices, Inc. |
danodonovan | 26:12d0204be712 | 3 | |
danodonovan | 26:12d0204be712 | 4 | All rights reserved. |
danodonovan | 26:12d0204be712 | 5 | |
danodonovan | 26:12d0204be712 | 6 | Redistribution and use in source and binary forms, with or without modification, |
danodonovan | 26:12d0204be712 | 7 | are permitted provided that the following conditions are met: |
danodonovan | 26:12d0204be712 | 8 | - Redistributions of source code must retain the above copyright notice, |
danodonovan | 26:12d0204be712 | 9 | this list of conditions and the following disclaimer. |
danodonovan | 26:12d0204be712 | 10 | - Redistributions in binary form must reproduce the above copyright notice, |
danodonovan | 26:12d0204be712 | 11 | this list of conditions and the following disclaimer in the documentation |
danodonovan | 26:12d0204be712 | 12 | and/or other materials provided with the distribution. |
danodonovan | 26:12d0204be712 | 13 | - Modified versions of the software must be conspicuously marked as such. |
danodonovan | 26:12d0204be712 | 14 | - This software is licensed solely and exclusively for use with processors |
danodonovan | 26:12d0204be712 | 15 | manufactured by or for Analog Devices, Inc. |
danodonovan | 26:12d0204be712 | 16 | - This software may not be combined or merged with other code in any manner |
danodonovan | 26:12d0204be712 | 17 | that would cause the software to become subject to terms and conditions |
danodonovan | 26:12d0204be712 | 18 | which differ from those listed here. |
danodonovan | 26:12d0204be712 | 19 | - Neither the name of Analog Devices, Inc. nor the names of its |
danodonovan | 26:12d0204be712 | 20 | contributors may be used to endorse or promote products derived |
danodonovan | 26:12d0204be712 | 21 | from this software without specific prior written permission. |
danodonovan | 26:12d0204be712 | 22 | - The use of this software may or may not infringe the patent rights of one |
danodonovan | 26:12d0204be712 | 23 | or more patent holders. This license does not release you from the |
danodonovan | 26:12d0204be712 | 24 | requirement that you obtain separate licenses from these patent holders |
danodonovan | 26:12d0204be712 | 25 | to use this software. |
danodonovan | 26:12d0204be712 | 26 | |
danodonovan | 26:12d0204be712 | 27 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY |
danodonovan | 26:12d0204be712 | 28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
danodonovan | 26:12d0204be712 | 29 | TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN |
danodonovan | 26:12d0204be712 | 30 | NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
danodonovan | 26:12d0204be712 | 31 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES |
danodonovan | 26:12d0204be712 | 32 | (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL |
danodonovan | 26:12d0204be712 | 33 | PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
danodonovan | 26:12d0204be712 | 34 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
danodonovan | 26:12d0204be712 | 35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
danodonovan | 26:12d0204be712 | 36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
danodonovan | 26:12d0204be712 | 37 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
danodonovan | 26:12d0204be712 | 38 | */ |
danodonovan | 26:12d0204be712 | 39 | |
kevin1990 | 28:4eb837cd71df | 40 | /*! |
kevin1990 | 28:4eb837cd71df | 41 | ****************************************************************************** |
kevin1990 | 28:4eb837cd71df | 42 | * @file: |
kevin1990 | 28:4eb837cd71df | 43 | * @brief: mbed platform-specific type definitions for ADISENSE API. |
kevin1990 | 28:4eb837cd71df | 44 | *----------------------------------------------------------------------------- |
kevin1990 | 28:4eb837cd71df | 45 | */ |
kevin1990 | 28:4eb837cd71df | 46 | |
danodonovan | 26:12d0204be712 | 47 | #ifndef __ADI_SENSE_PLATFORM_MBED_H__ |
danodonovan | 26:12d0204be712 | 48 | #define __ADI_SENSE_PLATFORM_MBED_H__ |
danodonovan | 26:12d0204be712 | 49 | |
danodonovan | 26:12d0204be712 | 50 | /*! Maximum number of ADISENSE device instances supported on this platform */ |
danodonovan | 26:12d0204be712 | 51 | #define ADI_SENSE_PLATFORM_MAX_DEVICES 1 |
danodonovan | 26:12d0204be712 | 52 | |
danodonovan | 26:12d0204be712 | 53 | typedef struct { |
danodonovan | 26:12d0204be712 | 54 | int mosiPin; |
danodonovan | 26:12d0204be712 | 55 | int misoPin; |
danodonovan | 26:12d0204be712 | 56 | int sckPin; |
danodonovan | 26:12d0204be712 | 57 | int csPin; |
danodonovan | 26:12d0204be712 | 58 | int maxSpeedHz; |
danodonovan | 26:12d0204be712 | 59 | } ADI_SENSE_PLATFORM_SPI_CONFIG; |
danodonovan | 26:12d0204be712 | 60 | |
danodonovan | 26:12d0204be712 | 61 | typedef struct { |
danodonovan | 26:12d0204be712 | 62 | int resetPin; |
danodonovan | 26:12d0204be712 | 63 | int errorPin; |
danodonovan | 26:12d0204be712 | 64 | int alertPin; |
danodonovan | 26:12d0204be712 | 65 | int datareadyPin; |
danodonovan | 26:12d0204be712 | 66 | } ADI_SENSE_PLATFORM_GPIO_CONFIG; |
danodonovan | 26:12d0204be712 | 67 | |
kevin1990 | 28:4eb837cd71df | 68 | typedef struct { |
kevin1990 | 28:4eb837cd71df | 69 | int txPin; |
kevin1990 | 28:4eb837cd71df | 70 | int rxPin; |
kevin1990 | 28:4eb837cd71df | 71 | int baudRate; |
kevin1990 | 28:4eb837cd71df | 72 | bool disableLogs; |
kevin1990 | 28:4eb837cd71df | 73 | } ADI_SENSE_PLATFORM_LOG_CONFIG; |
kevin1990 | 28:4eb837cd71df | 74 | |
danodonovan | 26:12d0204be712 | 75 | #endif /* __ADI_SENSE_PLATFORM_MBED_H__ */ |