precision-converters-firmware
Macros | Functions | Variables
app_config.h File Reference

Configuration file for AD4130 device applications. More...

#include <stdint.h>
#include "app_config_mbed.h"
#include "ad4130_user_config.h"
Include dependency graph for app_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MBED_PLATFORM   1
 
#define BURST_DATA_CAPTURE   0
 
#define CONTINUOUS_DATA_CAPTURE   1
 
#define FIFO_DATA_CAPTURE   2
 
#define USER_DEFAULT_CONFIG   0
 
#define RTD_2WIRE_CONFIG   1
 
#define RTD_3WIRE_CONFIG   2
 
#define RTD_4WIRE_CONFIG   3
 
#define THERMISTOR_CONFIG   4
 
#define THERMOCOUPLE_CONFIG   5
 
#define LOADCELL_CONFIG   6
 
#define ECG_CONFIG   7
 
#define NOISE_TEST_CONFIG   8
 
#define POWER_TEST_CONFIG   9
 
#define IIO_CLIENT_REMOTE   0
 
#define IIO_CLIENT_LOCAL   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_DEVICE_NAME   "ad4130-8"
 
#define AD4130_WLCSP_PACKAGE_TYPE
 
#define ACTIVE_PLATFORM   MBED_PLATFORM
 
#define ACTIVE_IIO_CLIENT   IIO_CLIENT_REMOTE
 
#define ACTIVE_DEMO_MODE_CONFIG   USER_DEFAULT_CONFIG
 
#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE
 
#define USE_VIRTUAL_COM_PORT
 
#define HW_CARRIER_NAME   TARGET_NAME
 
#define ext_int_extra_init_params   mbed_ext_int_extra_init_params
 
#define ticker_int_extra_init_params   mbed_ticker_int_extra_init_params
 
#define uart_extra_init_params   mbed_vcom_extra_init_params
 
#define uart_ops   mbed_virtual_com_ops
 
#define spi_extra_init_params   mbed_spi_extra_init_params
 
#define i2c_extra_init_params   mbed_i2c_extra_init_params
 
#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params
 
#define trigger_gpio_extra_init_params   mbed_trigger_gpio_extra_init_params
 
#define trigger_gpio_ops   mbed_gpio_ops
 
#define irq_ops   mbed_irq_ops
 
#define gpio_ops   mbed_gpio_ops
 
#define spi_ops   mbed_spi_ops
 
#define i2c_ops   mbed_i2c_ops
 
#define trigger_gpio_irq_ops   mbed_gpio_irq_ops
 
#define trigger_gpio_handle   0
 
#define TRIGGER_GPIO_PORT   0
 
#define TRIGGER_GPIO_PIN   CONV_MON
 
#define TRIGGER_INT_ID   GPIO_IRQ_ID1
 
#define TICKER_ID   TICKER_INT_ID
 
#define HW_MEZZANINE_NAME   "EV-AD4130WASDZ-U1"
 
#define ad4130_init_params   ad4130_user_config_params
 
#define ADC_RESOLUTION   24
 
#define ADC_PRESETS   7
 
#define ADC_DIFFERENTIAL_CHNS   8
 
#define ADC_PSEUDO_DIFF_CHNS   16
 
#define AD4130_REFIN1_VOLTAGE   2.5
 
#define AD4130_REFIN2_VOLTAGE   2.5
 
#define AD4130_AVDD_VOLTAGE   3.3
 
#define AD4170_2_5V_INT_REF_VOLTAGE   2.5
 
#define AD4170_1_25V_INT_REF_VOLTAGE   1.25
 
#define ADC_MAX_COUNT_UNIPOLAR   (uint32_t)((1 << ADC_RESOLUTION) - 1)
 
#define ADC_MAX_COUNT_BIPOLAR   (uint32_t)(1 << (ADC_RESOLUTION-1))
 
#define FIRMWARE_NAME   "ad4130_iio"
 
#define DEVICE_NAME   "DEV_AD4130"
 
#define PLATFORM_NAME   HW_CARRIER_NAME
 
#define VIRTUAL_COM_PORT_VID   0x0456
 
#define VIRTUAL_COM_PORT_PID   0xb66c
 
#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
 
#define IIO_UART_BAUD_RATE   (230400)
 

Functions

int32_t init_system (void)
 Initialize the system peripherals. More...
 
uint8_t get_eeprom_detected_dev_addr (void)
 Get the EEPROM device address detected by firmware. More...
 
bool is_eeprom_valid_dev_addr_detected (void)
 Return the flag indicating if valid EEPROM address is detected. More...
 
void ad4130_fifo_event_handler (void *ctx)
 This is an ISR (Interrupt Service Routine) to monitor FIFO data available event. This function is expected to be called asynchronously when data from internal device FIFO is available to read. More...
 

Variables

struct no_os_uart_desc * uart_desc
 
struct no_os_gpio_desc * trigger_gpio_desc
 
struct no_os_spi_init_param spi_init_params
 
struct no_os_gpio_init_param trigger_gpio_param
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 

Detailed Description

Configuration file for AD4130 device applications.

Copyright (c) 2020-23 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.

Macro Definition Documentation

◆ ACTIVE_DEMO_MODE_CONFIG

#define ACTIVE_DEMO_MODE_CONFIG   USER_DEFAULT_CONFIG

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad4130-8"

◆ ACTIVE_IIO_CLIENT

#define ACTIVE_IIO_CLIENT   IIO_CLIENT_REMOTE

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   MBED_PLATFORM

◆ AD4130_AVDD_VOLTAGE

#define AD4130_AVDD_VOLTAGE   3.3

◆ ad4130_init_params

#define ad4130_init_params   ad4130_user_config_params

◆ AD4130_REFIN1_VOLTAGE

#define AD4130_REFIN1_VOLTAGE   2.5

◆ AD4130_REFIN2_VOLTAGE

#define AD4130_REFIN2_VOLTAGE   2.5

◆ AD4130_WLCSP_PACKAGE_TYPE

#define AD4130_WLCSP_PACKAGE_TYPE

◆ AD4170_1_25V_INT_REF_VOLTAGE

#define AD4170_1_25V_INT_REF_VOLTAGE   1.25

◆ AD4170_2_5V_INT_REF_VOLTAGE

#define AD4170_2_5V_INT_REF_VOLTAGE   2.5

◆ ADC_DIFFERENTIAL_CHNS

#define ADC_DIFFERENTIAL_CHNS   8

◆ ADC_MAX_COUNT_BIPOLAR

#define ADC_MAX_COUNT_BIPOLAR   (uint32_t)(1 << (ADC_RESOLUTION-1))

◆ ADC_MAX_COUNT_UNIPOLAR

#define ADC_MAX_COUNT_UNIPOLAR   (uint32_t)((1 << ADC_RESOLUTION) - 1)

◆ ADC_PRESETS

#define ADC_PRESETS   7

◆ ADC_PSEUDO_DIFF_CHNS

#define ADC_PSEUDO_DIFF_CHNS   16

◆ ADC_RESOLUTION

#define ADC_RESOLUTION   24

◆ BURST_DATA_CAPTURE

#define BURST_DATA_CAPTURE   0

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   1

◆ DATA_CAPTURE_MODE

#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD4130"

◆ ECG_CONFIG

#define ECG_CONFIG   7

◆ ext_int_extra_init_params

#define ext_int_extra_init_params   mbed_ext_int_extra_init_params

◆ FIFO_DATA_CAPTURE

#define FIFO_DATA_CAPTURE   2

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad4130_iio"

◆ gpio_ops

#define gpio_ops   mbed_gpio_ops

◆ HW_CARRIER_NAME

#define HW_CARRIER_NAME   TARGET_NAME

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EV-AD4130WASDZ-U1"

◆ i2c_extra_init_params

#define i2c_extra_init_params   mbed_i2c_extra_init_params

◆ i2c_ops

#define i2c_ops   mbed_i2c_ops

◆ IIO_CLIENT_LOCAL

#define IIO_CLIENT_LOCAL   1

◆ IIO_CLIENT_REMOTE

#define IIO_CLIENT_REMOTE   0

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ irq_ops

#define irq_ops   mbed_irq_ops

◆ LOADCELL_CONFIG

#define LOADCELL_CONFIG   6

◆ MBED_PLATFORM

#define MBED_PLATFORM   1

◆ NOISE_TEST_CONFIG

#define NOISE_TEST_CONFIG   8

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ POWER_TEST_CONFIG

#define POWER_TEST_CONFIG   9

◆ RTD_2WIRE_CONFIG

#define RTD_2WIRE_CONFIG   1

◆ RTD_3WIRE_CONFIG

#define RTD_3WIRE_CONFIG   2

◆ RTD_4WIRE_CONFIG

#define RTD_4WIRE_CONFIG   3

◆ spi_extra_init_params

#define spi_extra_init_params   mbed_spi_extra_init_params

◆ spi_ops

#define spi_ops   mbed_spi_ops

◆ STR

#define STR (   s)    XSTR(s)

◆ THERMISTOR_CONFIG

#define THERMISTOR_CONFIG   4

◆ THERMOCOUPLE_CONFIG

#define THERMOCOUPLE_CONFIG   5

◆ TICKER_ID

#define TICKER_ID   TICKER_INT_ID

◆ ticker_int_extra_init_params

#define ticker_int_extra_init_params   mbed_ticker_int_extra_init_params

◆ trigger_gpio_extra_init_params

#define trigger_gpio_extra_init_params   mbed_trigger_gpio_extra_init_params

◆ trigger_gpio_handle

#define trigger_gpio_handle   0

◆ trigger_gpio_irq_extra_params

#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params

◆ trigger_gpio_irq_ops

#define trigger_gpio_irq_ops   mbed_gpio_irq_ops

◆ trigger_gpio_ops

#define trigger_gpio_ops   mbed_gpio_ops

◆ TRIGGER_GPIO_PIN

#define TRIGGER_GPIO_PIN   CONV_MON

◆ TRIGGER_GPIO_PORT

#define TRIGGER_GPIO_PORT   0

◆ TRIGGER_INT_ID

#define TRIGGER_INT_ID   GPIO_IRQ_ID1

◆ uart_extra_init_params

#define uart_extra_init_params   mbed_vcom_extra_init_params

◆ uart_ops

#define uart_ops   mbed_virtual_com_ops

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ USER_DEFAULT_CONFIG

#define USER_DEFAULT_CONFIG   0

◆ VIRTUAL_COM_PORT_PID

#define VIRTUAL_COM_PORT_PID   0xb66c

◆ VIRTUAL_COM_PORT_VID

#define VIRTUAL_COM_PORT_VID   0x0456

◆ VIRTUAL_COM_SERIAL_NUM

#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ ad4130_fifo_event_handler()

void ad4130_fifo_event_handler ( void *  ctx)

This is an ISR (Interrupt Service Routine) to monitor FIFO data available event. This function is expected to be called asynchronously when data from internal device FIFO is available to read.

Parameters
ctx[in]- Callback context (unused)
Returns
none

◆ get_eeprom_detected_dev_addr()

uint8_t get_eeprom_detected_dev_addr ( void  )

Get the EEPROM device address detected by firmware.

Returns
EEPROM device address

◆ init_system()

int32_t init_system ( void  )

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise.

This function initializes system peripherals for the application

Returns
- 0 in case of success, negative error code otherwise

◆ is_eeprom_valid_dev_addr_detected()

bool is_eeprom_valid_dev_addr_detected ( void  )

Return the flag indicating if valid EEPROM address is detected.

Returns
EEPROM valid address detect flag (true/false)

Variable Documentation

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ spi_init_params

struct no_os_spi_init_param spi_init_params
extern

◆ trigger_gpio_desc

struct no_os_gpio_desc* trigger_gpio_desc
extern

◆ trigger_gpio_param

struct no_os_gpio_init_param trigger_gpio_param
extern

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ uart_desc

struct no_os_uart_desc* uart_desc
extern