Example program for AD717x and AD411x family of products.
Dependencies: adi_console_menu platform_drivers
Diff: app/app_config.h
- Revision:
- 4:4592cc69bfa6
- Parent:
- 1:48914f9593f1
--- a/app/app_config.h Tue Apr 14 18:14:29 2020 +0000 +++ b/app/app_config.h Mon Aug 03 15:02:37 2020 +0530 @@ -10,14 +10,12 @@ * 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> @@ -25,13 +23,43 @@ /********************** 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. +// **** 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 + +// **** Note for User: Interface type selection (SDP-120/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. + * */ +//#define ARDUINO + -//#define DEV_AD4111 +// 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 D12 // SPI_MISO +#define SPI_MOSI D11 // 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 SDP_SPI_CS_A // PB_9 +#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 + #if defined(DEV_AD4111) #define ACTIVE_DEVICE_NAME "AD4111" @@ -41,8 +69,6 @@ #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" @@ -70,39 +96,4 @@ #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_