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