EVAL-AD593x Mbed Project.
Dependencies: platform_drivers
app_config.h@4:953fb3148f25, 2019-10-29 (annotated)
- Committer:
- ssmith73
- Date:
- Tue Oct 29 21:42:57 2019 +0000
- Revision:
- 4:953fb3148f25
- Parent:
- 1:bd8aea0d51e0
Added AD593x AnalogDevices Lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ssmith73 | 1:bd8aea0d51e0 | 1 | /*************************************************************************//** |
ssmith73 | 1:bd8aea0d51e0 | 2 | * @file app_config.h |
ssmith73 | 1:bd8aea0d51e0 | 3 | * @brief Configuration file of AD5686 firmware example program |
ssmith73 | 1:bd8aea0d51e0 | 4 | * @author ssmith (sean.smith@analog.com) |
ssmith73 | 1:bd8aea0d51e0 | 5 | ****************************************************************************** |
ssmith73 | 1:bd8aea0d51e0 | 6 | * Copyright (c) 2019 Analog Devices, Inc. |
ssmith73 | 1:bd8aea0d51e0 | 7 | * |
ssmith73 | 1:bd8aea0d51e0 | 8 | * All rights reserved. |
ssmith73 | 1:bd8aea0d51e0 | 9 | * |
ssmith73 | 1:bd8aea0d51e0 | 10 | * Redistribution and use in source and binary forms, with or without |
ssmith73 | 1:bd8aea0d51e0 | 11 | * modification, are permitted provided that the following conditions are met: |
ssmith73 | 1:bd8aea0d51e0 | 12 | * - Redistributions of source code must retain the above copyright notice, |
ssmith73 | 1:bd8aea0d51e0 | 13 | * this list of conditions and the following disclaimer. |
ssmith73 | 1:bd8aea0d51e0 | 14 | * - Redistributions in binary form must reproduce the above copyright notice, |
ssmith73 | 1:bd8aea0d51e0 | 15 | * this list of conditions and the following disclaimer in the documentation |
ssmith73 | 1:bd8aea0d51e0 | 16 | * and/or other materials provided with the distribution. |
ssmith73 | 1:bd8aea0d51e0 | 17 | * - Modified versions of the software must be conspicuously marked as such. |
ssmith73 | 1:bd8aea0d51e0 | 18 | * - This software is licensed solely and exclusively for use with |
ssmith73 | 1:bd8aea0d51e0 | 19 | * processors/products manufactured by or for Analog Devices, Inc. |
ssmith73 | 1:bd8aea0d51e0 | 20 | * - This software may not be combined or merged with other code in any manner |
ssmith73 | 1:bd8aea0d51e0 | 21 | * that would cause the software to become subject to terms and |
ssmith73 | 1:bd8aea0d51e0 | 22 | * conditions which differ from those listed here. |
ssmith73 | 1:bd8aea0d51e0 | 23 | * - Neither the name of Analog Devices, Inc. nor the names of its |
ssmith73 | 1:bd8aea0d51e0 | 24 | * contributors may be used to endorse or promote products derived |
ssmith73 | 1:bd8aea0d51e0 | 25 | * from this software without specific prior written permission. |
ssmith73 | 1:bd8aea0d51e0 | 26 | * - The use of this software may or may not infringe the patent rights |
ssmith73 | 1:bd8aea0d51e0 | 27 | * of one or more patent holders. This license does not release you from |
ssmith73 | 1:bd8aea0d51e0 | 28 | * the requirement that you obtain separate licenses from these patent |
ssmith73 | 1:bd8aea0d51e0 | 29 | * holders to use this software. |
ssmith73 | 1:bd8aea0d51e0 | 30 | * |
ssmith73 | 1:bd8aea0d51e0 | 31 | * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" |
ssmith73 | 1:bd8aea0d51e0 | 32 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
ssmith73 | 1:bd8aea0d51e0 | 33 | * NON-INFRINGEMENT, TITLE, MERCHANTABILITY AND FITNESS FOR A |
ssmith73 | 1:bd8aea0d51e0 | 34 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, |
ssmith73 | 1:bd8aea0d51e0 | 35 | * INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
ssmith73 | 1:bd8aea0d51e0 | 36 | * SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES |
ssmith73 | 1:bd8aea0d51e0 | 37 | * (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF |
ssmith73 | 1:bd8aea0d51e0 | 38 | * INTELLECTUAL PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE |
ssmith73 | 1:bd8aea0d51e0 | 39 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
ssmith73 | 1:bd8aea0d51e0 | 40 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
ssmith73 | 1:bd8aea0d51e0 | 41 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
ssmith73 | 1:bd8aea0d51e0 | 42 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
ssmith73 | 1:bd8aea0d51e0 | 43 | * POSSIBILITY OF SUCH DAMAGE. |
ssmith73 | 1:bd8aea0d51e0 | 44 | * |
ssmith73 | 1:bd8aea0d51e0 | 45 | * 20180927-7CBSD SLA |
ssmith73 | 1:bd8aea0d51e0 | 46 | *****************************************************************************/ |
ssmith73 | 1:bd8aea0d51e0 | 47 | |
ssmith73 | 1:bd8aea0d51e0 | 48 | #ifndef _APP_CONFIG_H_ |
ssmith73 | 1:bd8aea0d51e0 | 49 | #define _APP_CONFIG_H_ |
ssmith73 | 1:bd8aea0d51e0 | 50 | |
ssmith73 | 1:bd8aea0d51e0 | 51 | #include <stdint.h> |
ssmith73 | 1:bd8aea0d51e0 | 52 | #include "platform_drivers.h" |
ssmith73 | 1:bd8aea0d51e0 | 53 | #ifdef __cplusplus |
ssmith73 | 1:bd8aea0d51e0 | 54 | extern "C" |
ssmith73 | 1:bd8aea0d51e0 | 55 | { |
ssmith73 | 1:bd8aea0d51e0 | 56 | #endif |
ssmith73 | 1:bd8aea0d51e0 | 57 | #ifdef __cplusplus |
ssmith73 | 1:bd8aea0d51e0 | 58 | #include "ad5933.h" |
ssmith73 | 1:bd8aea0d51e0 | 59 | } |
ssmith73 | 1:bd8aea0d51e0 | 60 | #endif |
ssmith73 | 1:bd8aea0d51e0 | 61 | |
ssmith73 | 1:bd8aea0d51e0 | 62 | |
ssmith73 | 1:bd8aea0d51e0 | 63 | #define ARDUINO |
ssmith73 | 1:bd8aea0d51e0 | 64 | |
ssmith73 | 1:bd8aea0d51e0 | 65 | |
ssmith73 | 1:bd8aea0d51e0 | 66 | /** |
ssmith73 | 1:bd8aea0d51e0 | 67 | The ADI SDP_K1 can be used with both arduino headers |
ssmith73 | 1:bd8aea0d51e0 | 68 | or the 120-pin SDP connector found on ADI evaluation |
ssmith73 | 1:bd8aea0d51e0 | 69 | boards. The default is the SDP connector |
ssmith73 | 1:bd8aea0d51e0 | 70 | |
ssmith73 | 1:bd8aea0d51e0 | 71 | Uncomment the ARDUINO #define above to enable the ARDUINO connector |
ssmith73 | 1:bd8aea0d51e0 | 72 | |
ssmith73 | 1:bd8aea0d51e0 | 73 | */ |
ssmith73 | 1:bd8aea0d51e0 | 74 | //#warning check this |
ssmith73 | 1:bd8aea0d51e0 | 75 | #ifdef ARDUINO |
ssmith73 | 1:bd8aea0d51e0 | 76 | #define I2C_SCL D15 |
ssmith73 | 1:bd8aea0d51e0 | 77 | #define I2C_SDA D14 |
ssmith73 | 1:bd8aea0d51e0 | 78 | |
ssmith73 | 1:bd8aea0d51e0 | 79 | #define SPI_CS D10 |
ssmith73 | 1:bd8aea0d51e0 | 80 | #define SPI_MISO D12 |
ssmith73 | 1:bd8aea0d51e0 | 81 | #define SPI_MOSI D11 |
ssmith73 | 1:bd8aea0d51e0 | 82 | #define SPI_SCK D13 |
ssmith73 | 1:bd8aea0d51e0 | 83 | |
ssmith73 | 1:bd8aea0d51e0 | 84 | #define GAIN_PIN D8 |
ssmith73 | 1:bd8aea0d51e0 | 85 | #define RESET_PIN D9 |
ssmith73 | 1:bd8aea0d51e0 | 86 | #define LDAC_PIN D7 |
ssmith73 | 1:bd8aea0d51e0 | 87 | #define ADDR0_PIN D6 |
ssmith73 | 1:bd8aea0d51e0 | 88 | #else |
ssmith73 | 1:bd8aea0d51e0 | 89 | |
ssmith73 | 1:bd8aea0d51e0 | 90 | #define I2C_SCL SDP_I2C_SCL |
ssmith73 | 1:bd8aea0d51e0 | 91 | #define I2C_SDA SDP_I2C_SDA |
ssmith73 | 1:bd8aea0d51e0 | 92 | |
ssmith73 | 1:bd8aea0d51e0 | 93 | #define SPI_CS SDP_SPI_CS_A |
ssmith73 | 1:bd8aea0d51e0 | 94 | #define SPI_MISO SDP_SPI_MISO |
ssmith73 | 1:bd8aea0d51e0 | 95 | #define SPI_MOSI SDP_SPI_MOSI |
ssmith73 | 1:bd8aea0d51e0 | 96 | #define SPI_SCK SDP_SPI_SCK |
ssmith73 | 1:bd8aea0d51e0 | 97 | |
ssmith73 | 1:bd8aea0d51e0 | 98 | #define GAIN_PIN SDP_GPIO_0 |
ssmith73 | 1:bd8aea0d51e0 | 99 | #define RESET_PIN SDP_GPIO_2 |
ssmith73 | 1:bd8aea0d51e0 | 100 | #define LDAC_PIN SDP_GPIO_3 |
ssmith73 | 1:bd8aea0d51e0 | 101 | #define ADDR0_PIN SDP_GPIO_4 |
ssmith73 | 1:bd8aea0d51e0 | 102 | #endif |
ssmith73 | 1:bd8aea0d51e0 | 103 | |
ssmith73 | 1:bd8aea0d51e0 | 104 | #endif //_APP_CONFIG_H_ |