Example program for AD717x and AD411x family of products.
Dependencies: adi_console_menu platform_drivers
Diff: app/app_config.h
- Revision:
- 1:48914f9593f1
- Child:
- 4:4592cc69bfa6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/app_config.h Tue Mar 31 03:25:23 2020 +0000 @@ -0,0 +1,108 @@ +/*************************************************************************//** + * @file app_config.h + * @brief Configuration file for AD717x/AD411x firmware example +****************************************************************************** +* Copyright (c) 2020 Analog Devices, Inc. +* +* All rights reserved. +* +* This software is proprietary to Analog Devices, Inc. and its licensors. +* By using this software you agree to the terms of the associated +* Analog Devices Software License Agreement. +*****************************************************************************/ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + +/******************************************************************************/ +/***************************** Include Files **********************************/ +/******************************************************************************/ + +#include <stdint.h> +#include <PinNames.h> + +/******************************************************************************/ +/********************** Macros and Constants Definitions **********************/ +/******************************************************************************/ + +// **** Note for User: ACTIVE_DEVICE selection **** +// Define the device type here from the list of below device type defines +// (one at a time. Defining more than one device can result into compile error). +// e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE. +// The ACTIVE_DEVICE is default set to AD4111, if device type is not defined. + +//#define DEV_AD4111 + +#if defined(DEV_AD4111) +#define ACTIVE_DEVICE_NAME "AD4111" +#elif defined(DEV_AD4112) +#define ACTIVE_DEVICE_NAME "AD4112" +#elif defined(DEV_AD4114) +#define ACTIVE_DEVICE_NAME "AD4114" +#elif defined(DEV_AD4115) +#define ACTIVE_DEVICE_NAME "AD4115" +#elif defined(DEV_AD4116) +#define ACTIVE_DEVICE_NAME "AD4116" +#elif defined(DEV_AD7172_2) +#define AD7172_2_INIT +#define ACTIVE_DEVICE_NAME "AD7172-2" +#elif defined(DEV_AD7172_4) +#define AD7172_4_INIT +#define ACTIVE_DEVICE_NAME "AD7172-4" +#elif defined(DEV_AD7173_8) +#define AD7173_8_INIT +#define ACTIVE_DEVICE_NAME "AD7173-8" +#elif defined(DEV_AD7175_2) +#define AD7175_2_INIT +#define ACTIVE_DEVICE_NAME "AD7175-2" +#elif defined(DEV_AD7175_8) +#define AD7175_8_INIT +#define ACTIVE_DEVICE_NAME "AD7175-8" +#elif defined(DEV_AD7176_2) +#define AD7176_2_INIT +#define ACTIVE_DEVICE_NAME "AD7176-2" +#elif defined(DEV_AD7177_2) +#define AD7177_2_INIT +#define ACTIVE_DEVICE_NAME "AD7177-2" +#else +#warning No/Unsupported ADxxxxy symbol defined. AD4111 defined +#define DEV_AD4111 +#define ACTIVE_DEVICE_NAME "AD4111" +#endif + + +//#define ARDUINO + +/** + The ADI SDP_K1 can be used with both arduino headers + or the 120-pin SDP connector found on ADI evaluation + boards. The default is the SDP connector. + + Uncomment the ARDUINO #define above to enable the ARDUINO connector +*/ + +// Pin mapping of AD717x with SDP-K1/Arduino (reference: PinNames.h) +#ifdef ARDUINO +#define I2C_SCL D15 // I2C_SCL +#define I2C_SDA D14 // I2C_SDA + +#define SPI_SS D10 // SPI_CS +#define SPI_MISO D11 // SPI_MISO +#define SPI_MOSI D12 // SPI_MOSI +#define SPI_SCK D13 // SPI_SCK +#else +#define I2C_SCL SDP_I2C_SCL // PH_7 +#define I2C_SDA SDP_I2C_SDA // PC_9 + +#define SPI_SS_A SDP_SPI_CS_A // PB_9 +#define SPI_SS_B SDP_SPI_CS_B // PC_6 +#define SPI_SS_C SDP_SPI_CS_C // PC_7 +#define SPI_MISO SDP_SPI_MISO // PF_8 +#define SPI_MOSI SDP_SPI_MOSI // PF_9 +#define SPI_SCK SDP_SPI_SCK // PH_6 +#endif + +// Common pin mappings +#define LED_GREEN LED3 // PK_5 + +#endif //_APP_CONFIG_H_