Example program for EVAL-ADMX2001

Dependencies:   ADMX2001

Committer:
nsheth
Date:
Wed Oct 27 21:18:12 2021 +0000
Revision:
8:bd0b93e35392
Parent:
5:746e78113d7d
Child:
10:186e097fb1e3
Refactoring and restructuring

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nsheth 8:bd0b93e35392 1 /* Copyright (c) 2021 Analog Devices, Inc. All rights reserved.
nsheth 8:bd0b93e35392 2
nsheth 8:bd0b93e35392 3 Redistribution and use in source and binary forms, with or without modification,
nsheth 8:bd0b93e35392 4 are permitted provided that the following conditions are met:
nsheth 8:bd0b93e35392 5 - Redistributions of source code must retain the above copyright notice,
nsheth 8:bd0b93e35392 6 this list of conditions and the following disclaimer.
nsheth 8:bd0b93e35392 7 - Redistributions in binary form must reproduce the above copyright notice,
nsheth 8:bd0b93e35392 8 this list of conditions and the following disclaimer in the documentation
nsheth 8:bd0b93e35392 9 and/or other materials provided with the distribution.
nsheth 8:bd0b93e35392 10 - Modified versions of the software must be conspicuously marked as such.
nsheth 8:bd0b93e35392 11 - This software is licensed solely and exclusively for use with processors/products
nsheth 8:bd0b93e35392 12 manufactured by or for Analog Devices, Inc.
nsheth 8:bd0b93e35392 13 - This software may not be combined or merged with other code in any manner
nsheth 8:bd0b93e35392 14 that would cause the software to become subject to terms and conditions which
nsheth 8:bd0b93e35392 15 differ from those listed here.
nsheth 8:bd0b93e35392 16 - Neither the name of Analog Devices, Inc. nor the names of its contributors
nsheth 8:bd0b93e35392 17 may be used to endorse or promote products derived from this software without
nsheth 8:bd0b93e35392 18 specific prior written permission.
nsheth 8:bd0b93e35392 19 - The use of this software may or may not infringe the patent rights of one or
nsheth 8:bd0b93e35392 20 more patent holders. This license does not release you from the requirement
nsheth 8:bd0b93e35392 21 that you obtain separate licenses from these patent holders to use this software.
nsheth 8:bd0b93e35392 22
nsheth 8:bd0b93e35392 23 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND
nsheth 8:bd0b93e35392 24 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
nsheth 8:bd0b93e35392 25 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
nsheth 8:bd0b93e35392 26 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
nsheth 8:bd0b93e35392 27 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
nsheth 8:bd0b93e35392 28 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
nsheth 8:bd0b93e35392 29 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
nsheth 8:bd0b93e35392 30 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
nsheth 8:bd0b93e35392 31 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
nsheth 8:bd0b93e35392 32 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
nsheth 8:bd0b93e35392 33 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nsheth 8:bd0b93e35392 34
nsheth 8:bd0b93e35392 35 2021-01-10-7CBSD SLA
nsheth 8:bd0b93e35392 36 */
nsheth 4:e7e194f58f65 37
nsheth 4:e7e194f58f65 38 /**
nsheth 4:e7e194f58f65 39 * @file: app_config.h
nsheth 4:e7e194f58f65 40 * @brief: This file contains pin mappings for SDP_K1 board
nsheth 4:e7e194f58f65 41 * @details: Pin names for SDP_K1
nsheth 4:e7e194f58f65 42 */
nsheth 4:e7e194f58f65 43 #ifndef _APP_CONFIG_H_
nsheth 4:e7e194f58f65 44 #define _APP_CONFIG_H_
nsheth 4:e7e194f58f65 45
nsheth 4:e7e194f58f65 46 /******************************************************************************/
nsheth 4:e7e194f58f65 47 /***************************** Include Files **********************************/
nsheth 4:e7e194f58f65 48 /******************************************************************************/
nsheth 4:e7e194f58f65 49 #include <PinNames.h>
nsheth 4:e7e194f58f65 50 #include <stdint.h>
nsheth 4:e7e194f58f65 51
nsheth 4:e7e194f58f65 52 /******************************************************************************/
nsheth 4:e7e194f58f65 53 /********************** Macros and Constants Definitions **********************/
nsheth 4:e7e194f58f65 54 /******************************************************************************/
nsheth 4:e7e194f58f65 55
nsheth 4:e7e194f58f65 56 // **** Note for User: ACTIVE_DEVICE selection ****//
nsheth 4:e7e194f58f65 57 /* Define the device type here from the list of below device type defines
nsheth 4:e7e194f58f65 58 * (one at a time. Defining more than one device can result into compile error).
nsheth 4:e7e194f58f65 59 * e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE.
nsheth 4:e7e194f58f65 60 * The ACTIVE_DEVICE is default set to AD4111, if device type is not defined.
nsheth 4:e7e194f58f65 61 * */
nsheth 4:e7e194f58f65 62 //#define DEV_AD4111
nsheth 4:e7e194f58f65 63
nsheth 4:e7e194f58f65 64 // **** Note for User: Interface type selection (SDP-120/Arduino) ****//
nsheth 4:e7e194f58f65 65 /* The ADI SDP_K1 can be used with both arduino headers or the 120-pin SDP
nsheth 4:e7e194f58f65 66 * connector found on ADI evaluation boards. The default is the SDP connector.
nsheth 4:e7e194f58f65 67 * */
nsheth 4:e7e194f58f65 68
nsheth 4:e7e194f58f65 69 // FIXME: Enable pin mapping according to host header type
nsheth 5:746e78113d7d 70 #define ARDUINO
nsheth 4:e7e194f58f65 71 #ifdef ARDUINO
nsheth 4:e7e194f58f65 72 #define I2C_SCL D15 // I2C_SCL
nsheth 4:e7e194f58f65 73 #define I2C_SDA D14 // I2C_SDA
nsheth 4:e7e194f58f65 74
nsheth 4:e7e194f58f65 75 #define SPI_SS D10 // SPI_CS
nsheth 4:e7e194f58f65 76 #define SPI_MISO D12 // SPI_MISO
nsheth 4:e7e194f58f65 77 #define SPI_MOSI D11 // SPI_MOSI
nsheth 4:e7e194f58f65 78 #define SPI_SCK D13 // SPI_SCK
nsheth 4:e7e194f58f65 79
nsheth 4:e7e194f58f65 80 #else
nsheth 4:e7e194f58f65 81 #define I2C_SCL SDP_I2C_SCL // PH_7
nsheth 4:e7e194f58f65 82 #define I2C_SDA SDP_I2C_SDA // PC_9
nsheth 4:e7e194f58f65 83
nsheth 4:e7e194f58f65 84 #define SPI_SS SDP_SPI_CS_A // PB_9
nsheth 4:e7e194f58f65 85 #define SPI_MISO SDP_SPI_MISO // PF_8
nsheth 4:e7e194f58f65 86 #define SPI_MOSI SDP_SPI_MOSI // PF_9
nsheth 4:e7e194f58f65 87 #define SPI_SCK SDP_SPI_SCK // PH_6
nsheth 4:e7e194f58f65 88 #endif
nsheth 4:e7e194f58f65 89
nsheth 4:e7e194f58f65 90 /** Common pin mappings */
nsheth 4:e7e194f58f65 91 #define LED_GREEN LED3
nsheth 4:e7e194f58f65 92
nsheth 4:e7e194f58f65 93 #define TRIGGER_OUT A0 // Trig_in of ADMX2001 EVM
nsheth 4:e7e194f58f65 94 #define TRIGGER_IN A1 // Trig_out of ADMX2001 EVM
nsheth 4:e7e194f58f65 95
nsheth 4:e7e194f58f65 96 #endif //_APP_CONFIG_H_