Example program for AD717x and AD411x family of products.

Dependencies:   adi_console_menu platform_drivers

Committer:
Kjansen
Date:
Tue Aug 03 12:23:16 2021 +0100
Revision:
8:2e0e9b520392
Parent:
4:4592cc69bfa6
No-OS Adoption Changes:
* Updated the .lib files for adoption of no-OS repository as-is.
* Replaced platform_drivers.h with required header files.
* Updated the copyright year.

Mbed OS update changes:
1) Added the mbed_app.json file with custom parameters.
2) Updated the mbed-os version to 6.8.0

Updated the readme file.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mahphalke 1:48914f9593f1 1 /*************************************************************************//**
mahphalke 1:48914f9593f1 2 * @file app_config.h
mahphalke 1:48914f9593f1 3 * @brief Configuration file for AD717x/AD411x firmware example
mahphalke 1:48914f9593f1 4 ******************************************************************************
mahphalke 1:48914f9593f1 5 * Copyright (c) 2020 Analog Devices, Inc.
mahphalke 1:48914f9593f1 6 *
mahphalke 1:48914f9593f1 7 * All rights reserved.
mahphalke 1:48914f9593f1 8 *
mahphalke 1:48914f9593f1 9 * This software is proprietary to Analog Devices, Inc. and its licensors.
mahphalke 1:48914f9593f1 10 * By using this software you agree to the terms of the associated
mahphalke 1:48914f9593f1 11 * Analog Devices Software License Agreement.
mahphalke 1:48914f9593f1 12 *****************************************************************************/
mahphalke 1:48914f9593f1 13 #ifndef _APP_CONFIG_H_
mahphalke 1:48914f9593f1 14 #define _APP_CONFIG_H_
mahphalke 1:48914f9593f1 15
mahphalke 1:48914f9593f1 16 /******************************************************************************/
mahphalke 1:48914f9593f1 17 /***************************** Include Files **********************************/
mahphalke 1:48914f9593f1 18 /******************************************************************************/
mahphalke 1:48914f9593f1 19 #include <stdint.h>
mahphalke 1:48914f9593f1 20 #include <PinNames.h>
mahphalke 1:48914f9593f1 21
mahphalke 1:48914f9593f1 22 /******************************************************************************/
mahphalke 1:48914f9593f1 23 /********************** Macros and Constants Definitions **********************/
mahphalke 1:48914f9593f1 24 /******************************************************************************/
mahphalke 1:48914f9593f1 25
Mahesh Phalke 4:4592cc69bfa6 26 // **** Note for User: ACTIVE_DEVICE selection ****//
Mahesh Phalke 4:4592cc69bfa6 27 /* Define the device type here from the list of below device type defines
Mahesh Phalke 4:4592cc69bfa6 28 * (one at a time. Defining more than one device can result into compile error).
Mahesh Phalke 4:4592cc69bfa6 29 * e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE.
Mahesh Phalke 4:4592cc69bfa6 30 * The ACTIVE_DEVICE is default set to AD4111, if device type is not defined.
Mahesh Phalke 4:4592cc69bfa6 31 * */
Mahesh Phalke 4:4592cc69bfa6 32 //#define DEV_AD4111
Mahesh Phalke 4:4592cc69bfa6 33
Mahesh Phalke 4:4592cc69bfa6 34 // **** Note for User: Interface type selection (SDP-120/Arduino) ****//
Mahesh Phalke 4:4592cc69bfa6 35 /* The ADI SDP_K1 can be used with both arduino headers or the 120-pin SDP
Mahesh Phalke 4:4592cc69bfa6 36 * connector found on ADI evaluation boards. The default is the SDP connector.
Mahesh Phalke 4:4592cc69bfa6 37 * */
Mahesh Phalke 4:4592cc69bfa6 38 //#define ARDUINO
Mahesh Phalke 4:4592cc69bfa6 39
mahphalke 1:48914f9593f1 40
Mahesh Phalke 4:4592cc69bfa6 41 // Pin mapping of AD717x with SDP-K1/Arduino (reference: PinNames.h)
Mahesh Phalke 4:4592cc69bfa6 42 #ifdef ARDUINO
Mahesh Phalke 4:4592cc69bfa6 43 #define I2C_SCL D15 // I2C_SCL
Mahesh Phalke 4:4592cc69bfa6 44 #define I2C_SDA D14 // I2C_SDA
Mahesh Phalke 4:4592cc69bfa6 45
Mahesh Phalke 4:4592cc69bfa6 46 #define SPI_SS D10 // SPI_CS
Mahesh Phalke 4:4592cc69bfa6 47 #define SPI_MISO D12 // SPI_MISO
Mahesh Phalke 4:4592cc69bfa6 48 #define SPI_MOSI D11 // SPI_MOSI
Mahesh Phalke 4:4592cc69bfa6 49 #define SPI_SCK D13 // SPI_SCK
Mahesh Phalke 4:4592cc69bfa6 50 #else
Mahesh Phalke 4:4592cc69bfa6 51 #define I2C_SCL SDP_I2C_SCL // PH_7
Mahesh Phalke 4:4592cc69bfa6 52 #define I2C_SDA SDP_I2C_SDA // PC_9
Mahesh Phalke 4:4592cc69bfa6 53
Mahesh Phalke 4:4592cc69bfa6 54 #define SPI_SS SDP_SPI_CS_A // PB_9
Mahesh Phalke 4:4592cc69bfa6 55 #define SPI_MISO SDP_SPI_MISO // PF_8
Mahesh Phalke 4:4592cc69bfa6 56 #define SPI_MOSI SDP_SPI_MOSI // PF_9
Mahesh Phalke 4:4592cc69bfa6 57 #define SPI_SCK SDP_SPI_SCK // PH_6
Mahesh Phalke 4:4592cc69bfa6 58 #endif
Mahesh Phalke 4:4592cc69bfa6 59
Mahesh Phalke 4:4592cc69bfa6 60 // Common pin mappings
Mahesh Phalke 4:4592cc69bfa6 61 #define LED_GREEN LED3
Mahesh Phalke 4:4592cc69bfa6 62
mahphalke 1:48914f9593f1 63
mahphalke 1:48914f9593f1 64 #if defined(DEV_AD4111)
mahphalke 1:48914f9593f1 65 #define ACTIVE_DEVICE_NAME "AD4111"
mahphalke 1:48914f9593f1 66 #elif defined(DEV_AD4112)
mahphalke 1:48914f9593f1 67 #define ACTIVE_DEVICE_NAME "AD4112"
mahphalke 1:48914f9593f1 68 #elif defined(DEV_AD4114)
mahphalke 1:48914f9593f1 69 #define ACTIVE_DEVICE_NAME "AD4114"
mahphalke 1:48914f9593f1 70 #elif defined(DEV_AD4115)
mahphalke 1:48914f9593f1 71 #define ACTIVE_DEVICE_NAME "AD4115"
mahphalke 1:48914f9593f1 72 #elif defined(DEV_AD7172_2)
mahphalke 1:48914f9593f1 73 #define AD7172_2_INIT
mahphalke 1:48914f9593f1 74 #define ACTIVE_DEVICE_NAME "AD7172-2"
mahphalke 1:48914f9593f1 75 #elif defined(DEV_AD7172_4)
mahphalke 1:48914f9593f1 76 #define AD7172_4_INIT
mahphalke 1:48914f9593f1 77 #define ACTIVE_DEVICE_NAME "AD7172-4"
mahphalke 1:48914f9593f1 78 #elif defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 79 #define AD7173_8_INIT
mahphalke 1:48914f9593f1 80 #define ACTIVE_DEVICE_NAME "AD7173-8"
mahphalke 1:48914f9593f1 81 #elif defined(DEV_AD7175_2)
mahphalke 1:48914f9593f1 82 #define AD7175_2_INIT
mahphalke 1:48914f9593f1 83 #define ACTIVE_DEVICE_NAME "AD7175-2"
mahphalke 1:48914f9593f1 84 #elif defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 85 #define AD7175_8_INIT
mahphalke 1:48914f9593f1 86 #define ACTIVE_DEVICE_NAME "AD7175-8"
mahphalke 1:48914f9593f1 87 #elif defined(DEV_AD7176_2)
mahphalke 1:48914f9593f1 88 #define AD7176_2_INIT
mahphalke 1:48914f9593f1 89 #define ACTIVE_DEVICE_NAME "AD7176-2"
mahphalke 1:48914f9593f1 90 #elif defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 91 #define AD7177_2_INIT
mahphalke 1:48914f9593f1 92 #define ACTIVE_DEVICE_NAME "AD7177-2"
mahphalke 1:48914f9593f1 93 #else
mahphalke 1:48914f9593f1 94 #warning No/Unsupported ADxxxxy symbol defined. AD4111 defined
mahphalke 1:48914f9593f1 95 #define DEV_AD4111
mahphalke 1:48914f9593f1 96 #define ACTIVE_DEVICE_NAME "AD4111"
mahphalke 1:48914f9593f1 97 #endif
mahphalke 1:48914f9593f1 98
mahphalke 1:48914f9593f1 99 #endif //_APP_CONFIG_H_