22#include "no_os_uart.h" 
   23#include "no_os_gpio.h" 
   30#define STM32_PLATFORM      1 
   31#define MBED_PLATFORM       2 
   34#define BURST_DATA_CAPTURE      0 
   35#define CONTINUOUS_DATA_CAPTURE     1 
   45#if !defined (ACTIVE_PLATFORM) 
   46#define ACTIVE_PLATFORM     MBED_PLATFORM 
   51#define ADC_TYPE        SD_ADC 
   55#if !defined(DATA_CAPTURE_MODE) 
   57#if (ADC_TYPE == SAR_ADC) 
   58#define DATA_CAPTURE_MODE   BURST_DATA_CAPTURE 
   60#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE 
   83#if !defined(USE_PHY_COM_PORT) 
   84#define USE_VIRTUAL_COM_PORT 
   87#if defined(DEV_AD7770) 
   88#define ACTIVE_DEVICE       "ad7770" 
   89#define DEVICE_NAME         "DEV_AD7770" 
   90#define HW_MEZZANINE_NAME   "EVAL-AD7770ARDZ" 
   91#elif defined(DEV_AD7771) 
   92#define ACTIVE_DEVICE       "ad7771" 
   93#define DEVICE_NAME         "DEV_AD7771" 
   94#define HW_MEZZANINE_NAME   "EVAL-AD7771ARDZ" 
   95#elif defined(DEV_AD7779) 
   96#define ACTIVE_DEVICE       "ad7779" 
   97#define DEVICE_NAME         "DEV_AD7779" 
   98#define HW_MEZZANINE_NAME   "EVAL-AD7779ARDZ" 
  100#warning No/Unsupported ADxxxxy symbol defined. AD7770 defined 
  102#define ACTIVE_DEVICE   "ad7770" 
  103#define DEVICE_NAME     "DEV_AD7770" 
  104#define HW_MEZZANINE_NAME   "EVAL-AD7770ARDZ" 
  109#if !defined(INTERFACE_MODE) 
  110#if (ACTIVE_PLATFORM == STM32_PLATFORM) 
  111#define INTERFACE_MODE TDM_MODE 
  113#define INTERFACE_MODE SPI_MODE 
  117#if (ADC_TYPE == SD_ADC) 
  119#define BYTES_PER_SAMPLE    sizeof(uint32_t) 
  122#define BYTES_PER_SAMPLE    sizeof(uint16_t) 
  125#if (ACTIVE_PLATFORM == STM32_PLATFORM) 
  128#define uart_extra_init_params  stm32_uart_extra_init_params 
  129#define spi_extra_init_params   stm32_spi_extra_init_params 
  130#define gpio_reset_extra_init_params    stm32_gpio_reset_extra_init_params 
  131#define gpio_mode0_extra_init_params    stm32_gpio_mode0_extra_init_params 
  132#define gpio_mode1_extra_init_params    stm32_gpio_mode1_extra_init_params 
  133#define gpio_mode2_extra_init_params    stm32_gpio_mode2_extra_init_params 
  134#define gpio_mode3_extra_init_params    stm32_gpio_mode3_extra_init_params 
  135#define gpio_dclk0_extra_init_params    stm32_gpio_dclk0_extra_init_params 
  136#define gpio_dclk1_extra_init_params    stm32_gpio_dclk1_extra_init_params 
  137#define gpio_dclk2_extra_init_params    stm32_gpio_dclk2_extra_init_params 
  138#define gpio_sync_in_extra_init_params  stm32_gpio_sync_in_extra_init_params 
  139#define gpio_convst_sar_extra_init_params   stm32_gpio_convst_sar_extra_init_params 
  140#define gpio_drdy_extra_init_params     stm32_gpio_drdy_extra_init_params 
  141#define gpio_error_extra_init_params    stm32_gpio_error_extra_init_params 
  142#define trigger_gpio_irq_extra_params   stm32_trigger_gpio_irq_init_params 
  143#define tdm_extra_init_params           stm32_tdm_extra_init_params 
  144#define pwm_extra_init_params   stm32_pwm_extra_init_params 
  145#define i2c_extra_init_params   stm32_i2c_extra_init_params 
  147#define spi_platform_ops    stm32_spi_ops 
  148#define gpio_platform_ops   stm32_gpio_ops 
  149#define trigger_gpio_irq_ops stm32_gpio_irq_ops 
  150#define uart_ops             stm32_uart_ops 
  151#define tdm_platform_ops    stm32_tdm_platform_ops 
  152#define i2c_ops             stm32_i2c_ops 
  153#define pwm_ops             stm32_pwm_ops 
  155#define trigger_gpio_handle 0    
  157#define HW_CARRIER_NAME     NUCLEO-H563ZI 
  158#elif (ACTIVE_PLATFORM == MBED_PLATFORM) 
  159#include "app_config_mbed.h" 
  162#define uart_extra_init_params mbed_uart_extra_init_params 
  163#define vcom_extra_init_params mbed_vcom_extra_init_params 
  164#define spi_extra_init_params   mbed_spi_extra_init_params 
  165#define i2c_extra_init_params   mbed_i2c_extra_init_params 
  166#define gpio_reset_extra_init_params    mbed_gpio_reset_extra_init_params 
  167#define gpio_mode0_extra_init_params    mbed_gpio_mode0_extra_init_params 
  168#define gpio_mode1_extra_init_params    mbed_gpio_mode1_extra_init_params 
  169#define gpio_mode2_extra_init_params    mbed_gpio_mode2_extra_init_params 
  170#define gpio_mode3_extra_init_params    mbed_gpio_mode3_extra_init_params 
  171#define gpio_dclk0_extra_init_params    mbed_gpio_dclk0_extra_init_params 
  172#define gpio_dclk1_extra_init_params    mbed_gpio_dclk1_extra_init_params 
  173#define gpio_dclk2_extra_init_params    mbed_gpio_dclk2_extra_init_params 
  174#define gpio_sync_in_extra_init_params  mbed_gpio_sync_in_extra_init_params 
  175#define gpio_convst_sar_extra_init_params   mbed_gpio_convst_sar_extra_init_params 
  176#define gpio_drdy_extra_init_params mbed_gpio_drdy_extra_init_params 
  177#define gpio_error_extra_init_params    mbed_gpio_error_extra_init_params 
  178#define trigger_gpio_irq_extra_params mbed_trigger_gpio_irq_init_params 
  179#define pwm_extra_init_params   mbed_pwm_init_params 
  180#define spi_platform_ops    mbed_spi_ops 
  181#define i2c_ops     mbed_i2c_ops 
  182#define gpio_platform_ops   mbed_gpio_ops 
  183#define trigger_gpio_irq_ops    mbed_gpio_irq_ops 
  184#define uart_ops                mbed_uart_ops 
  185#define vcom_ops                mbed_virtual_com_ops 
  186#define pwm_ops                 mbed_pwm_ops 
  187#define trigger_gpio_handle 0    
  189#define HW_CARRIER_NAME     TARGET_NAME 
  196#if defined(USE_PHY_COM_PORT) 
  198#if (ACTIVE_PLATFORM == MBED_PLATFORM) 
  199#define CONSOLE_STDIO_PORT_AVAILABLE 
  203#define CONSOLE_STDIO_PORT_AVAILABLE 
  207#define FIRMWARE_NAME   "ad777x_iio" 
  209#if !defined(PLATFORM_NAME) 
  210#define PLATFORM_NAME   HW_CARRIER_NAME 
  216#define VIRTUAL_COM_PORT_VID    0x0456 
  217#define VIRTUAL_COM_PORT_PID    0xb66c 
  219#define VIRTUAL_COM_SERIAL_NUM  (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME)) 
  222#define IIO_UART_BAUD_RATE  230400 
  225#if (ADC_TYPE == SAR_ADC) 
  229#define SAR_MUX_CONF                    0 
  230#define AD777x_NUM_CHANNELS             1 
  232#define AD777x_NUM_CHANNELS             8 
  236#if (ADC_TYPE == SAR_ADC) 
  237#define ADC_RESOLUTION      12 
  239#define ADC_RESOLUTION      24 
  243#define ADC_MAX_COUNT_UNIPOLAR  (uint32_t)((1 << ADC_RESOLUTION) - 1) 
  246#define ADC_MAX_COUNT_BIPOLAR   (uint32_t)(1 << (ADC_RESOLUTION-1)) 
  254#if (ACTIVE_PLATFORM == MBED_PLATFORM) 
  255#define AD777X_EXT_MCLK_FREQ    500000 
  257#define AD777X_EXT_MCLK_FREQ    8192000 
  261#if !defined (ENABLE_EXT_MCLK) 
  262#define AD777x_MCLK_FREQ                8192000  
  264#define AD777x_MCLK_FREQ                AD777X_EXT_MCLK_FREQ 
  267#define AD777x_MCLK_PERIOD  (((float)(1.0 / AD777x_MCLK_FREQ) * 1000000) * 1000) 
struct no_os_irq_ctrl_desc * trigger_irq_desc
Definition app_config.c:103
 
int32_t init_system(void)
Initialize the system peripherals.
Definition app_config.c:185
 
struct no_os_eeprom_desc * eeprom_desc
Definition app_config.c:170
 
struct no_os_uart_desc * uart_iio_com_desc
Definition app_config.c:158
 
struct no_os_uart_desc * uart_console_stdio_desc
Definition app_config.c:100
 
void data_capture_callback(void *ctx)
Interrupt Service Routine to monitor data ready event.
Definition ad405x_iio.c:1029
 
struct no_os_gpio_desc * gpio_drdy_desc
Definition app_config.c:165
 
struct no_os_tdm_desc * ad777x_tdm_desc
Definition app_config.c:119
 
struct no_os_gpio_desc * gpio_error_desc
Definition app_config.c:168
 
Header file for STM32 platform configurations.