diff --git a/projects/ad7134_iio/STM32/.extSettings b/projects/ad7134_iio/STM32/.extSettings index 0686957f..7a62c46d 100644 --- a/projects/ad7134_iio/STM32/.extSettings +++ b/projects/ad7134_iio/STM32/.extSettings @@ -14,9 +14,7 @@ app/libraries/no-OS/drivers/adc/ad713x/=../../../libraries/no-OS/drivers/adc/ad7 app/libraries/no-OS/drivers/tdm=../../../libraries/no-OS/drivers/tdm/no_os_tdm.c; -app/libraries/no-OS/util/=../../../libraries/no-OS/util/no_os_util.c;../../../libraries/no-OS/util/no_os_list.c;../../../libraries/no-OS/util/no_os_circular_buffer.c;../../../libraries/no-OS/util/no_os_lf256fifo.c;../../../libraries/no-OS/util/no_os_alloc.c;../../../libraries/no-OS/util/no_os_mutex.c; - -app/libraries/no-OS/include/=../../../libraries/no-OS/include/no_os_list.h;../../../libraries/no-OS/include/no_os_gpio.h;../../../libraries/no-OS/include/no_os_delay.h;../../../libraries/no-OS/include/no_os_error.h;../../../libraries/no-OS/include/no_os_delay.h;../../../libraries/no-OS/include/no_os_spi.h;../../../libraries/no-OS/include/no_os_uart.h;../../../libraries/no-OS/include/no_os_util.h;../../../libraries/no-OS/include/no_os_circular_buffer.h;../../../libraries/no-OS/include/no_os_lf256fifo.h;../../../libraries/no-OS/include/no_os_irq.h;;../../../libraries/no-OS/include/no_os_tdm.h;../../../libraries/no-OS/include/no_os_alloc.h;../../../libraries/no-OS/include/no_os_mutex.h; +app/libraries/no-OS/=../../../libraries/no-OS/util/;../../../libraries/no-OS/include; app/libraries/no-OS/drivers/platform/stm32/=../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio_irq.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio_irq.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.c;../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.h;../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.c diff --git a/projects/ad7134_iio/app/ad7134_iio.c b/projects/ad7134_iio/app/ad7134_iio.c index 1cf37326..0ca5a529 100644 --- a/projects/ad7134_iio/app/ad7134_iio.c +++ b/projects/ad7134_iio/app/ad7134_iio.c @@ -318,16 +318,6 @@ static struct iio_attribute global_attributes[] = { END_ATTRIBUTES_ARRAY }; -/* IIOD debug attributes list */ -static struct iio_attribute debug_attributes[] = { - { - .name = "direct_reg_access", - .show = NULL, - .store = NULL, - }, - END_ATTRIBUTES_ARRAY -}; - /* IIOD channels configurations */ struct scan_type chn_scan = { .sign = 'u', @@ -662,7 +652,6 @@ static int32_t iio_ad7134_init(struct iio_device **desc) iio_ad7134_channels[0]); iio_ad7134_inst->channels = iio_ad7134_channels; iio_ad7134_inst->attributes = global_attributes; - iio_ad7134_inst->debug_attributes = debug_attributes; iio_ad7134_inst->debug_reg_read = debug_reg_read; iio_ad7134_inst->debug_reg_write = debug_reg_write; iio_ad7134_inst->pre_enable = iio_ad7134_prepare_transfer; diff --git a/projects/ad7134_iio/app/ad7134_user_config.c b/projects/ad7134_iio/app/ad7134_user_config.c index 5a743cc0..1ea023b2 100644 --- a/projects/ad7134_iio/app/ad7134_user_config.c +++ b/projects/ad7134_iio/app/ad7134_user_config.c @@ -62,7 +62,7 @@ struct ad713x_init_param ad713x_init_params = { .pnd = NO_OS_GPIO_HIGH, /* Define the device specific additional parameters */ - .dev_id = ID_AD7134, + .dev_id = ACTIVE_DEVICE_ID, /* Only 16-bit Frame + No CRC is supported for data capturing */ .adc_data_len = ADC_16_BIT_DATA, /* DO NOT CHANGE */ diff --git a/projects/ad7134_iio/app/app_config.h b/projects/ad7134_iio/app/app_config.h index 222d3b9c..2c714595 100644 --- a/projects/ad7134_iio/app/app_config.h +++ b/projects/ad7134_iio/app/app_config.h @@ -18,6 +18,7 @@ /******************************************************************************/ #include +#include "ad713x.h" /******************************************************************************/ /********************** Macros and Constants Definition ***********************/ @@ -42,10 +43,6 @@ /* Select the active platform from list of supported platforms */ #define ACTIVE_PLATFORM MBED_PLATFORM -/* Name of active device */ -#define ACTIVE_DEVICE_NAME "ad7134" -#define HW_MEZZANINE_NAME "EVAL-AD7134ARDZ" - /* Select the ADC data capture mode (default is CC mode) */ #if !defined(DATA_CAPTURE_MODE) #define DATA_CAPTURE_MODE CONTINUOUS_DATA_CAPTURE @@ -60,6 +57,30 @@ #define XSTR(s) #s #define STR(s) XSTR(s) +// **** Note for User: ACTIVE_DEVICE selection ****// +/* Define the device type from the list of below device type defines (one at a time) + * e.g. #define DEV_AD7134 -> This will make AD7134 as an active device. + * The active device is default set to AD7134 if device type is not defined. + * */ +//#define DEV_AD7134 + +/* Name of active device */ +#if defined (DEV_AD7134) +#define ACTIVE_DEVICE_NAME "ad7134" +#define HW_MEZZANINE_NAME "EVAL-AD7134ARDZ" +#define ACTIVE_DEVICE_ID ID_AD7134 +#elif defined (DEV_AD4134) +#define ACTIVE_DEVICE_NAME "ad4134" +#define HW_MEZZANINE_NAME "EVAL-AD4134ARDZ" +#define ACTIVE_DEVICE_ID ID_AD4134 +#else +#warning No / Unsupported ADxxxxy symbol defined.AD7134 defined +#define DEV_AD7134 +#define ACTIVE_DEVICE_NAME "ad7134" +#define HW_MEZZANINE_NAME "EVAL-AD7134ARDZ" +#define ACTIVE_DEVICE_ID ID_AD7134 +#endif + /* Enable the UART/VirtualCOM port connection (default VCOM) */ //#define USE_PHY_COM_PORT // Uncomment to select UART