Analog Devices / Mbed OS EVAL-ADMX2001

Dependencies:   ADMX2001

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers app_config.h Source File

app_config.h

Go to the documentation of this file.
00001 /* Copyright (c) 2021 Analog Devices, Inc.  All rights reserved.
00002 
00003 Redistribution and use in source and binary forms, with or without modification,
00004 are permitted provided that the following conditions are met:
00005   - Redistributions of source code must retain the above copyright notice,
00006   this list of conditions and the following disclaimer.
00007   - Redistributions in binary form must reproduce the above copyright notice,
00008   this list of conditions and the following disclaimer in the documentation
00009   and/or other materials provided with the distribution.
00010   - Modified versions of the software must be conspicuously marked as such.
00011   - This software is licensed solely and exclusively for use with processors/products
00012   manufactured by or for Analog Devices, Inc.
00013   - This software may not be combined or merged with other code in any manner
00014   that would cause the software to become subject to terms and conditions which
00015   differ from those listed here.
00016   - Neither the name of Analog Devices, Inc. nor the names of its contributors
00017   may be used to endorse or promote products derived from this software without
00018   specific prior written permission.
00019   - The use of this software may or may not infringe the patent rights of one or
00020   more patent holders.  This license does not release you from the requirement
00021   that you obtain separate licenses from these patent holders to use this software.
00022 
00023 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND
00024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
00025 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
00026 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00027 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
00028 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
00029 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00030 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00031 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00032 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00033 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034 
00035 2021-01-10-7CBSD SLA
00036 */
00037 
00038 /**
00039  * @file:    app_config.h
00040  * @brief:   This file contains pin mappings for SDP_K1 board
00041  */
00042 #ifndef _APP_CONFIG_H_
00043 #define _APP_CONFIG_H_
00044 
00045 /*============= I N C L U D E S =============*/
00046 #include <PinNames.h>
00047 #include <stdint.h>
00048 
00049 /*=============  D E F I N I T I O N S  =============*/
00050 
00051 // **** Note for User: ACTIVE_DEVICE selection ****//
00052 /* Define the device type here from the list of below device type defines
00053  * (one at a time. Defining more than one device can result into compile error).
00054  * e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE.
00055  * The ACTIVE_DEVICE is default set to AD4111, if device type is not defined.
00056  * */
00057 //#define   DEV_AD4111
00058 
00059 // **** Note for User: Interface type selection (SDP-120/Arduino) ****//
00060 /* The ADI SDP_K1 can be used with both arduino headers or the 120-pin SDP
00061  * connector found on ADI evaluation boards. The default is the SDP connector.
00062  * */
00063 
00064 // FIXME: Enable pin mapping according to host header type
00065 #define ARDUINO
00066 #ifdef ARDUINO
00067 #define I2C_SCL D15 // I2C_SCL
00068 #define I2C_SDA D14 // I2C_SDA
00069 
00070 #define SPI_SS   D10 // SPI_CS
00071 #define SPI_MISO D12 // SPI_MISO
00072 #define SPI_MOSI D11 // SPI_MOSI
00073 #define SPI_SCK  D13 // SPI_SCK
00074 
00075 #else
00076 #define I2C_SCL SDP_I2C_SCL // PH_7
00077 #define I2C_SDA SDP_I2C_SDA // PC_9
00078 
00079 #define SPI_SS   SDP_SPI_CS_A // PB_9
00080 #define SPI_MISO SDP_SPI_MISO // PF_8
00081 #define SPI_MOSI SDP_SPI_MOSI // PF_9
00082 #define SPI_SCK  SDP_SPI_SCK  // PH_6
00083 #endif
00084 
00085 /** Common pin mappings */
00086 #define LED_GREEN LED3
00087 
00088 #define TRIGGER_OUT A0 // Trig_in of ADMX2001 EVM
00089 #define TRIGGER_IN  A1 // Trig_out of ADMX2001 EVM
00090 
00091 #endif //_APP_CONFIG_H_