Example program for AD717x and AD411x family of products.
Dependencies: adi_console_menu platform_drivers
app_config.h
00001 /*************************************************************************//** 00002 * @file app_config.h 00003 * @brief Configuration file for AD717x/AD411x firmware example 00004 ****************************************************************************** 00005 * Copyright (c) 2020 Analog Devices, Inc. 00006 * 00007 * All rights reserved. 00008 * 00009 * This software is proprietary to Analog Devices, Inc. and its licensors. 00010 * By using this software you agree to the terms of the associated 00011 * Analog Devices Software License Agreement. 00012 *****************************************************************************/ 00013 #ifndef _APP_CONFIG_H_ 00014 #define _APP_CONFIG_H_ 00015 00016 /******************************************************************************/ 00017 /***************************** Include Files **********************************/ 00018 /******************************************************************************/ 00019 #include <stdint.h> 00020 #include <PinNames.h> 00021 00022 /******************************************************************************/ 00023 /********************** Macros and Constants Definitions **********************/ 00024 /******************************************************************************/ 00025 00026 // **** Note for User: ACTIVE_DEVICE selection ****// 00027 /* Define the device type here from the list of below device type defines 00028 * (one at a time. Defining more than one device can result into compile error). 00029 * e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE. 00030 * The ACTIVE_DEVICE is default set to AD4111, if device type is not defined. 00031 * */ 00032 //#define DEV_AD4111 00033 00034 // **** Note for User: Interface type selection (SDP-120/Arduino) ****// 00035 /* The ADI SDP_K1 can be used with both arduino headers or the 120-pin SDP 00036 * connector found on ADI evaluation boards. The default is the SDP connector. 00037 * */ 00038 //#define ARDUINO 00039 00040 00041 // Pin mapping of AD717x with SDP-K1/Arduino (reference: PinNames.h) 00042 #ifdef ARDUINO 00043 #define I2C_SCL D15 // I2C_SCL 00044 #define I2C_SDA D14 // I2C_SDA 00045 00046 #define SPI_SS D10 // SPI_CS 00047 #define SPI_MISO D12 // SPI_MISO 00048 #define SPI_MOSI D11 // SPI_MOSI 00049 #define SPI_SCK D13 // SPI_SCK 00050 #else 00051 #define I2C_SCL SDP_I2C_SCL // PH_7 00052 #define I2C_SDA SDP_I2C_SDA // PC_9 00053 00054 #define SPI_SS SDP_SPI_CS_A // PB_9 00055 #define SPI_MISO SDP_SPI_MISO // PF_8 00056 #define SPI_MOSI SDP_SPI_MOSI // PF_9 00057 #define SPI_SCK SDP_SPI_SCK // PH_6 00058 #endif 00059 00060 // Common pin mappings 00061 #define LED_GREEN LED3 00062 00063 00064 #if defined(DEV_AD4111) 00065 #define ACTIVE_DEVICE_NAME "AD4111" 00066 #elif defined(DEV_AD4112) 00067 #define ACTIVE_DEVICE_NAME "AD4112" 00068 #elif defined(DEV_AD4114) 00069 #define ACTIVE_DEVICE_NAME "AD4114" 00070 #elif defined(DEV_AD4115) 00071 #define ACTIVE_DEVICE_NAME "AD4115" 00072 #elif defined(DEV_AD7172_2) 00073 #define AD7172_2_INIT 00074 #define ACTIVE_DEVICE_NAME "AD7172-2" 00075 #elif defined(DEV_AD7172_4) 00076 #define AD7172_4_INIT 00077 #define ACTIVE_DEVICE_NAME "AD7172-4" 00078 #elif defined(DEV_AD7173_8) 00079 #define AD7173_8_INIT 00080 #define ACTIVE_DEVICE_NAME "AD7173-8" 00081 #elif defined(DEV_AD7175_2) 00082 #define AD7175_2_INIT 00083 #define ACTIVE_DEVICE_NAME "AD7175-2" 00084 #elif defined(DEV_AD7175_8) 00085 #define AD7175_8_INIT 00086 #define ACTIVE_DEVICE_NAME "AD7175-8" 00087 #elif defined(DEV_AD7176_2) 00088 #define AD7176_2_INIT 00089 #define ACTIVE_DEVICE_NAME "AD7176-2" 00090 #elif defined(DEV_AD7177_2) 00091 #define AD7177_2_INIT 00092 #define ACTIVE_DEVICE_NAME "AD7177-2" 00093 #else 00094 #warning No/Unsupported ADxxxxy symbol defined. AD4111 defined 00095 #define DEV_AD4111 00096 #define ACTIVE_DEVICE_NAME "AD4111" 00097 #endif 00098 00099 #endif //_APP_CONFIG_H_
Generated on Wed Jul 13 2022 14:09:09 by 1.7.2