precision-converters-firmware
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
app_config.h File Reference

Configuration file for AD469x device applications. More...

#include <stdint.h>
#include "app_config_mbed.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   0
 
#define STM32_PLATFORM   1
 
#define CONTINUOUS_DATA_CAPTURE   0
 
#define BURST_DATA_CAPTURE   1
 
#define UNIPOLAR_MODE   0
 
#define PSEUDO_BIPOLAR_MODE   1
 
#define SPI_DMA   0
 
#define SPI_INTERRUPT   1
 
#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE
 
#define ACTIVE_PLATFORM   MBED_PLATFORM
 
#define INTERFACE_MODE   SPI_DMA
 
#define USE_VIRTUAL_COM_PORT
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define HW_CARRIER_NAME   TARGET_NAME
 
#define uart_extra_init_params   mbed_uart_extra_init_params
 
#define vcom_extra_init_params   mbed_vcom_extra_init_params
 
#define bsy_extra_init_params   mbed_gpio_bsy_extra_init_params
 
#define cnv_extra_init_params   mbed_gpio_cnv_extra_init_params
 
#define reset_extra_init_params   mbed_gpio_reset_extra_init_params
 
#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params
 
#define spi_extra_init_params   mbed_spi_extra_init_params
 
#define pwm_extra_init_params   mbed_pwm_extra_init_params
 
#define i2c_extra_init_params   mbed_i2c_extra_init_params
 
#define DEV_AD4696
 
#define ACTIVE_DEVICE   ID_AD4696
 
#define ACTIVE_DEVICE_NAME   "ad4696"
 
#define HW_MEZZANINE_NAME   "EVAL-AD4696-ARDZ"
 
#define NO_OF_CHANNELS   16
 
#define ADC_RESOLUTION   16
 
#define DEFAULT_POLARITY_MODE   UNIPOLAR_MODE
 
#define ADC_MAX_COUNT_UNIPOLAR   (uint32_t)((1 << ADC_RESOLUTION) - 1)
 
#define ADC_MAX_COUNT_BIPOLAR   (uint32_t)(1 << (ADC_RESOLUTION-1))
 
#define IIO_UART_BAUD_RATE   (230400)
 
#define DEVICE_NAME   "DEV_AD4696"
 
#define FIRMWARE_NAME   "ad469x_iio"
 
#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)
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#define BYTES_PER_SAMPLE   sizeof(uint16_t)
 
#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)
 

Functions

int32_t init_pwm (void)
 Initialize the PWM interface.
 
int32_t init_system (void)
 Initialize the system peripherals.
 
void burst_capture_callback (void *context)
 Interrupt Service Routine to monitor end of conversion event.
 

Variables

struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_pwm_desc * pwm_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_pwm_init_param cs_init_params
 
struct no_os_dma_init_param ad469x_dma_init_param
 
struct no_os_gpio_init_param pwm_gpio_params
 
struct no_os_gpio_init_param cs_pwm_gpio_params
 
volatile struct iio_device_data * global_iio_dev_data
 
struct no_os_pwm_init_param pwm_init_params
 
uint32_t global_nb_of_samples
 
volatile uint32_t * buff_start_addr
 
int32_t data_read
 
struct no_os_pwm_desc * tx_trigger_desc
 

Detailed Description

Configuration file for AD469x device applications.

Copyright (c) 2021-24 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_DEVICE

#define ACTIVE_DEVICE   ID_AD4696

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad4696"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   MBED_PLATFORM

◆ 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_RESOLUTION

#define ADC_RESOLUTION   16

◆ bsy_extra_init_params

#define bsy_extra_init_params   mbed_gpio_bsy_extra_init_params

◆ BURST_DATA_CAPTURE

#define BURST_DATA_CAPTURE   1

◆ BYTES_PER_SAMPLE

#define BYTES_PER_SAMPLE   sizeof(uint16_t)

◆ CHN_STORAGE_BITS

#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)

◆ cnv_extra_init_params

#define cnv_extra_init_params   mbed_gpio_cnv_extra_init_params

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   0

◆ DATA_CAPTURE_MODE

#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE

◆ DEFAULT_POLARITY_MODE

#define DEFAULT_POLARITY_MODE   UNIPOLAR_MODE

◆ DEV_AD4696

#define DEV_AD4696

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD4696"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad469x_iio"

◆ HW_CARRIER_NAME

#define HW_CARRIER_NAME   TARGET_NAME

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD4696-ARDZ"

◆ i2c_extra_init_params

#define i2c_extra_init_params   mbed_i2c_extra_init_params

◆ IIO_UART_BAUD_RATE [1/2]

#define IIO_UART_BAUD_RATE   (230400)

◆ IIO_UART_BAUD_RATE [2/2]

#define IIO_UART_BAUD_RATE   (230400)

◆ INTERFACE_MODE

#define INTERFACE_MODE   SPI_DMA

◆ MBED_PLATFORM

#define MBED_PLATFORM   0

◆ NO_OF_CHANNELS

#define NO_OF_CHANNELS   16

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ PSEUDO_BIPOLAR_MODE

#define PSEUDO_BIPOLAR_MODE   1

◆ pwm_extra_init_params

#define pwm_extra_init_params   mbed_pwm_extra_init_params

◆ reset_extra_init_params

#define reset_extra_init_params   mbed_gpio_reset_extra_init_params

◆ SPI_DMA

#define SPI_DMA   0

◆ spi_extra_init_params

#define spi_extra_init_params   mbed_spi_extra_init_params

◆ SPI_INTERRUPT

#define SPI_INTERRUPT   1

◆ STM32_PLATFORM

#define STM32_PLATFORM   1

◆ STR

#define STR (   s)    XSTR(s)

◆ trigger_gpio_irq_extra_params

#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params

◆ uart_extra_init_params

#define uart_extra_init_params   mbed_uart_extra_init_params

◆ UNIPOLAR_MODE

#define UNIPOLAR_MODE   0

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ vcom_extra_init_params

#define vcom_extra_init_params   mbed_vcom_extra_init_params

◆ 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

◆ burst_capture_callback()

void burst_capture_callback ( void *  context)
extern

Interrupt Service Routine to monitor end of conversion event.

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

Interrupt Service Routine to monitor end of conversion event.

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

◆ init_pwm()

int32_t init_pwm ( void  )

Initialize the PWM interface.

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

Initialize the PWM interface.

Returns
0 in case of success, negative error code otherwise

◆ 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

Variable Documentation

◆ ad469x_dma_init_param

struct no_os_dma_init_param ad469x_dma_init_param
extern

◆ buff_start_addr

volatile uint32_t* buff_start_addr
extern

◆ cs_init_params

struct no_os_pwm_init_param cs_init_params
extern

◆ cs_pwm_gpio_params

struct no_os_gpio_init_param cs_pwm_gpio_params
extern

◆ data_read

int32_t data_read
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ global_iio_dev_data

volatile struct iio_device_data* global_iio_dev_data
extern

◆ global_nb_of_samples

uint32_t global_nb_of_samples
extern

◆ pwm_desc

struct no_os_pwm_desc* pwm_desc
extern

◆ pwm_gpio_params

struct no_os_gpio_init_param pwm_gpio_params
extern

◆ pwm_init_params

struct no_os_pwm_init_param pwm_init_params
extern

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ tx_trigger_desc

struct no_os_pwm_desc* tx_trigger_desc
extern

◆ uart_iio_com_desc

struct no_os_uart_desc* uart_iio_com_desc
extern