Analog Devices / Mbed OS EVAL-AD717x-AD411x-IIO

Dependencies:   sdp_k1_sdram

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers app_config_mbed.h Source File

app_config_mbed.h

Go to the documentation of this file.
00001 /***************************************************************************//**
00002  *   @file    app_config_mbed.h
00003  *   @brief   Header file for Mbed platform configurations.
00004 ********************************************************************************
00005  * Copyright (c) 2021-22 Analog Devices, Inc.
00006  * All rights reserved.
00007  *
00008  * This software is proprietary to Analog Devices, Inc. and its licensors.
00009  * By using this software you agree to the terms of the associated
00010  * Analog Devices Software License Agreement.
00011 *******************************************************************************/
00012 
00013 #ifndef APP_CONFIG_MBED_H_
00014 #define APP_CONFIG_MBED_H_
00015 
00016 /******************************************************************************/
00017 /***************************** Include Files **********************************/
00018 /******************************************************************************/
00019 
00020 #include <stdint.h>
00021 #include <PinNames.h>
00022 #include "mbed_spi.h"
00023 #include "mbed_uart.h"
00024 #include "mbed_irq.h"
00025 #include "mbed_gpio.h"
00026 #include "mbed_gpio_irq.h"
00027 #if defined(TARGET_SDP_K1)
00028 #include "sdram_sdpk1.h"
00029 #endif
00030 
00031 /******************************************************************************/
00032 /********************** Macros and Constants Definition ***********************/
00033 /******************************************************************************/
00034 /**
00035  * The ADI SDP_K1 can be used with either arduino headers
00036  * or the 120-pin SDP connector found on ADI evaluation
00037  * boards. The default is the SDP-120 connector.
00038  *
00039  * Uncomment the #define ARDUINO below to enable the Arduino connector for
00040  * EVAL-AD4114SDZ, EVAL-AD4115SDZ and the EVAL-AD4116ASDZ
00041 */
00042 
00043 /* NOTE: Only EVAL-AD4114SDZ, EVAL-AD4115SDZ and EVAL-AD4116ASDZ support Arduino and SDP_120
00044  * interface. The other EVAL Boadrds (EVAL-AD4111SDZ, EVAL-AD4112SDZ,
00045  * EVAL-AD7172-4SDZ, EVAL-AD7172-2SDZ , EVAL-AD7173-8SDZ, EVAL-AD7175-2SDZ,
00046  * EVAL-AD7175-8SDZ, EVAL-AD7176-2SDZ, EVAL-AD7177-2SDZ) support only the
00047  * SDP-120 interface.
00048  */
00049 
00050 //#define  ARDUINO
00051 
00052 #ifdef ARDUINO
00053 /* SPI Pins on SDP-K1-Arduino Interface */
00054 #define SPI_CSB         ARDUINO_UNO_D10     // SPI_CS
00055 #define SPI_HOST_SDO    ARDUINO_UNO_D11     // SPI_MOSI
00056 #define SPI_HOST_SDI    ARDUINO_UNO_D12     // SPI_MISO
00057 #define SPI_SCK         ARDUINO_UNO_D13     // SPI_SCK
00058 #else // Default- SDP_120 Interface
00059 /* SPI Pins on SDP-K1-SDP-120 Interface */
00060 #define SPI_CSB         SDP_SPI_CS_A
00061 #define SPI_HOST_SDI    SDP_SPI_MISO
00062 #define SPI_HOST_SDO    SDP_SPI_MOSI
00063 #define SPI_SCK         SDP_SPI_SCK
00064 #endif // ARDUINO
00065 
00066 /* UART Common Pin Mapping on SDP-K1 */
00067 #define UART_TX     CONSOLE_TX
00068 #define UART_RX     CONSOLE_RX
00069 
00070 /* RDY Pin indicates the end of conversion. This is also
00071 the MISO pin for SPI communications */
00072 #define RDY_PIN     SPI_HOST_SDI
00073 
00074 /******************************************************************************/
00075 /********************** Public/Extern Declarations ****************************/
00076 /******************************************************************************/
00077 
00078 extern struct mbed_uart_init_param  mbed_uart_extra_init_params;
00079 extern struct mbed_spi_init_param   mbed_spi_extra_init_params;
00080 extern struct mbed_gpio_irq_init_param mbed_ext_int_extra_init_params;
00081 
00082 #endif // APP_CONFIG_MBED_H_
00083