EVAL-AD7124 Mbed Example Program.

Dependencies:   adi_console_menu platform_drivers

Committer:
Kjansen45
Date:
Wed Dec 02 11:23:19 2020 +0000
Revision:
6:46c263287b2f
Parent:
5:ca3854efb1e9
Child:
7:3e1005bd4d41
Jira ticket (PCFW-392), resolved the issue regarding the pin mapping for Arduino

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mahphalke 3:779bb1e55f1a 1 /*************************************************************************//**
mahphalke 3:779bb1e55f1a 2 * @file app_config.h
mahphalke 3:779bb1e55f1a 3 * @brief Configuration file of AD7124 firmware example program
mahphalke 3:779bb1e55f1a 4 ******************************************************************************
mahphalke 3:779bb1e55f1a 5 * Copyright (c) 2020 Analog Devices, Inc.
mahphalke 3:779bb1e55f1a 6 *
mahphalke 3:779bb1e55f1a 7 * All rights reserved.
mahphalke 3:779bb1e55f1a 8 *
mahphalke 3:779bb1e55f1a 9 * This software is proprietary to Analog Devices, Inc. and its licensors.
mahphalke 3:779bb1e55f1a 10 * By using this software you agree to the terms of the associated
mahphalke 3:779bb1e55f1a 11 * Analog Devices Software License Agreement.
mahphalke 3:779bb1e55f1a 12 *****************************************************************************/
mahphalke 3:779bb1e55f1a 13
mahphalke 3:779bb1e55f1a 14 #ifndef _APP_CONFIG_H_
mahphalke 3:779bb1e55f1a 15 #define _APP_CONFIG_H_
mahphalke 3:779bb1e55f1a 16
mahphalke 3:779bb1e55f1a 17 #include <stdint.h>
mahphalke 5:ca3854efb1e9 18 #include <PinNames.h>
mahphalke 3:779bb1e55f1a 19
mahphalke 3:779bb1e55f1a 20 /**
mahphalke 3:779bb1e55f1a 21 The ADI SDP_K1 can be used with both arduino headers
mahphalke 3:779bb1e55f1a 22 or the 120-pin SDP connector found on ADI evaluation
mahphalke 3:779bb1e55f1a 23 boards. The default is the SDP connector.
mahphalke 3:779bb1e55f1a 24
Kjansen45 6:46c263287b2f 25 Uncomment the ARDUINO #define below to enable the ARDUINO connector
mahphalke 3:779bb1e55f1a 26 */
mahphalke 3:779bb1e55f1a 27
Kjansen45 6:46c263287b2f 28 //#define ARDUINO
Kjansen45 6:46c263287b2f 29
mahphalke 3:779bb1e55f1a 30 // Pin mapping of AD7124 with SDP-K1/Arduino (reference: PinNames.h)
mahphalke 3:779bb1e55f1a 31 #ifdef ARDUINO
mahphalke 5:ca3854efb1e9 32 #define I2C_SCL D15 // I2C_SCL
mahphalke 5:ca3854efb1e9 33 #define I2C_SDA D14 // I2C_SDA
mahphalke 3:779bb1e55f1a 34
Kjansen45 6:46c263287b2f 35 #define SPI_SS_A D10 // SPI_CS
Kjansen45 6:46c263287b2f 36 #define SPI_MISO D11 // SPI_MISO
Kjansen45 6:46c263287b2f 37 #define SPI_MOSI D12 // SPI_MOSI
mahphalke 5:ca3854efb1e9 38 #define SPI_SCK D13 // SPI_SCK
mahphalke 3:779bb1e55f1a 39 #else
mahphalke 5:ca3854efb1e9 40 #define I2C_SCL SDP_I2C_SCL // PH_7
mahphalke 5:ca3854efb1e9 41 #define I2C_SDA SDP_I2C_SDA // PC_9
mahphalke 3:779bb1e55f1a 42
mahphalke 5:ca3854efb1e9 43 #define SPI_SS_A SDP_SPI_CS_A // PB_9
mahphalke 5:ca3854efb1e9 44 #define SPI_MISO SDP_SPI_MISO // PF_8
mahphalke 5:ca3854efb1e9 45 #define SPI_MOSI SDP_SPI_MOSI // PF_9
mahphalke 5:ca3854efb1e9 46 #define SPI_SCK SDP_SPI_SCK // PH_6
mahphalke 3:779bb1e55f1a 47 #endif
mahphalke 3:779bb1e55f1a 48
mahphalke 3:779bb1e55f1a 49 // Common pin mappings
mahphalke 5:ca3854efb1e9 50 #define LED_GREEN LED3 // PK_5
mahphalke 3:779bb1e55f1a 51
mahphalke 3:779bb1e55f1a 52 #endif //_APP_CONFIG_H_