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

Configuration file for AD579x device application. 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   1
 
#define CYCLIC_STREAM   0
 
#define ARBITRARY_STREAM   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_PLATFORM   MBED_PLATFORM
 
#define DATA_STREAM_MODE   CYCLIC_STREAM
 
#define USE_VIRTUAL_COM_PORT
 
#define DEV_AD5780
 
#define ACTIVE_DEVICE_NAME   "ad5780"
 
#define DEVICE_NAME   "DEV_AD5780"
 
#define ACTIVE_DEVICE   ID_AD5780
 
#define HW_MEZZANINE_NAME   "EVAL-AD5780ARDZ"
 
#define DAC_RESOLUTION   18
 
#define INT_REF_M10V_TO_10V
 
#define DAC_CH_SPAN   20
 
#define DAC_VREFN   -10.0
 
#define DAC_VREFN_GAIN_OF_TWO   -30.0
 
#define AD579X_NUM_CHANNELS   1
 
#define DAC_MAX_COUNT   (uint32_t)((1 << DAC_RESOLUTION) - 1)
 
#define DAC_MAX_COUNT_BIN_OFFSET   (uint32_t)((1 << DAC_RESOLUTION) - 1)
 
#define DAC_MAX_COUNT_2S_COMPL   (uint32_t)(1 << (DAC_RESOLUTION-1))
 
#define NUM_OF_V_SPANS   5
 
#define HW_CARRIER_NAME   TARGET_NAME
 
#define pwm_extra_init_params   mbed_pwm_extra_init_params
 
#define uart_extra_init_params   mbed_uart_extra_init_params
 
#define vcom_extra_init_params   mbed_vcom_extra_init_params
 
#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 gpio_ops   mbed_gpio_ops
 
#define spi_ops   mbed_spi_ops
 
#define i2c_ops   mbed_i2c_ops
 
#define uart_ops   mbed_uart_ops
 
#define vcom_ops   mbed_virtual_com_ops
 
#define pwm_ops   mbed_pwm_ops
 
#define trigger_gpio_irq_ops   mbed_gpio_irq_ops
 
#define IIO_UART_BAUD_RATE   (230400)
 
#define FIRMWARE_NAME   "ad579x_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 CONSOLE_STDIO_PORT_AVAILABLE
 
#define CONV_PERIOD_NSEC(x)   (((float)(1.0 / x) * 1000000) * 1000)
 
#define CONV_DUTY_CYCLE_NSEC(x)   (CONV_PERIOD_NSEC(x) / 2)
 

Functions

int32_t init_pwm_trigger (void)
 Initialize the PWM trigger contoller. More...
 
int32_t init_system (void)
 Initialize the system peripherals. More...
 

Variables

struct no_os_pwm_desc * pwm_desc
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_eeprom_desc * eeprom_desc
 

Detailed Description

Configuration file for AD579x device application.

Copyright (c) 2023-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_AD5780

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad5780"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   MBED_PLATFORM

◆ AD579X_NUM_CHANNELS

#define AD579X_NUM_CHANNELS   1

◆ ARBITRARY_STREAM

#define ARBITRARY_STREAM   1

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONV_DUTY_CYCLE_NSEC

#define CONV_DUTY_CYCLE_NSEC (   x)    (CONV_PERIOD_NSEC(x) / 2)

◆ CONV_PERIOD_NSEC

#define CONV_PERIOD_NSEC (   x)    (((float)(1.0 / x) * 1000000) * 1000)

◆ CYCLIC_STREAM

#define CYCLIC_STREAM   0

◆ DAC_CH_SPAN

#define DAC_CH_SPAN   20

◆ DAC_MAX_COUNT

#define DAC_MAX_COUNT   (uint32_t)((1 << DAC_RESOLUTION) - 1)

◆ DAC_MAX_COUNT_2S_COMPL

#define DAC_MAX_COUNT_2S_COMPL   (uint32_t)(1 << (DAC_RESOLUTION-1))

◆ DAC_MAX_COUNT_BIN_OFFSET

#define DAC_MAX_COUNT_BIN_OFFSET   (uint32_t)((1 << DAC_RESOLUTION) - 1)

◆ DAC_RESOLUTION

#define DAC_RESOLUTION   18

◆ DAC_VREFN

#define DAC_VREFN   -10.0

◆ DAC_VREFN_GAIN_OF_TWO

#define DAC_VREFN_GAIN_OF_TWO   -30.0

◆ DATA_STREAM_MODE

#define DATA_STREAM_MODE   CYCLIC_STREAM

◆ DEV_AD5780

#define DEV_AD5780

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD5780"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad579x_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   "EVAL-AD5780ARDZ"

◆ i2c_extra_init_params

#define i2c_extra_init_params   mbed_i2c_extra_init_params

◆ i2c_ops

#define i2c_ops   mbed_i2c_ops

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ INT_REF_M10V_TO_10V

#define INT_REF_M10V_TO_10V

◆ MBED_PLATFORM

#define MBED_PLATFORM   1

◆ NUM_OF_V_SPANS

#define NUM_OF_V_SPANS   5

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ pwm_extra_init_params

#define pwm_extra_init_params   mbed_pwm_extra_init_params

◆ pwm_ops

#define pwm_ops   mbed_pwm_ops

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

◆ 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

◆ uart_extra_init_params

#define uart_extra_init_params   mbed_uart_extra_init_params

◆ uart_ops

#define uart_ops   mbed_uart_ops

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ vcom_extra_init_params

#define vcom_extra_init_params   mbed_vcom_extra_init_params

◆ vcom_ops

#define vcom_ops   mbed_virtual_com_ops

◆ 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

◆ init_pwm_trigger()

int32_t init_pwm_trigger ( void  )

Initialize the PWM trigger contoller.

Returns
0 in case of success, negative error code otherwise

Initialize the PWM trigger contoller.

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

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ pwm_desc

struct no_os_pwm_desc* pwm_desc
extern

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ uart_console_stdio_desc

struct no_os_uart_desc* uart_console_stdio_desc
extern

◆ uart_iio_com_desc

struct no_os_uart_desc* uart_iio_com_desc
extern