precision-converters-firmware
Loading...
Searching...
No Matches
Macros | Functions | Variables
app_config.h File Reference

Header file for application configurations (platform-agnostic) More...

#include <stdint.h>
#include <common_macros.h>
#include "app_config_stm32.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 BURST_DATA_CAPTURE   0
 
#define CONTINUOUS_DATA_CAPTURE   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE
 
#define USE_VIRTUAL_COM_PORT
 
#define DEV_AD7606B
 
#define ACTIVE_DEVICE   ID_AD7606B
 
#define ACTIVE_DEVICE_NAME   "ad7606b"
 
#define DEVICE_NAME   "DEV_AD7606B"
 
#define AD7606X_ADC_CHANNELS   8
 
#define AD7606X_ADC_RESOLUTION   16
 
#define pwm_extra_init_params   stm32_pwm_extra_init_params
 
#define vcom_extra_init_params   stm32_vcom_extra_init_params
 
#define vcom_ops   stm32_usb_uart_ops
 
#define uart_extra_init_params   stm32_uart_extra_init_params
 
#define uart_ops   stm32_uart_ops
 
#define spi_extra_init_params   stm32_spi_extra_init_params
 
#define i2c_extra_init_params   stm32_i2c_extra_init_params
 
#define trigger_gpio_irq_extra_params   stm32_trigger_gpio_irq_init_params
 
#define trigger_gpio_extra_init_params   stm32_trigger_gpio_extra_init_params
 
#define reset_gpio_extra_init_params   stm32_reset_gpio_extra_init_params
 
#define convst_gpio_extra_init_params   stm32_convst_gpio_extra_init_params
 
#define busy_gpio_extra_init_params   stm32_busy_gpio_extra_init_params
 
#define osr0_gpio_extra_init_params   stm32_osr0_gpio_extra_init_params
 
#define osr1_gpio_extra_init_params   stm32_osr1_gpio_extra_init_params
 
#define osr2_gpio_extra_init_params   stm32_osr2_gpio_extra_init_params
 
#define range_gpio_extra_init_params   stm32_range_gpio_extra_init_params
 
#define stdby_gpio_extra_init_params   stm32_stdby_gpio_extra_init_params
 
#define pwm_gpio_extra_init_params   stm32_pwm_gpio_extra_init_params
 
#define trigger_gpio_ops   stm32_gpio_ops
 
#define irq_ops   stm32_gpio_irq_ops
 
#define gpio_ops   stm32_gpio_ops
 
#define spi_ops   stm32_spi_ops
 
#define i2c_ops   stm32_i2c_ops
 
#define pwm_ops   stm32_pwm_ops
 
#define trigger_gpio_irq_ops   stm32_gpio_irq_ops
 
#define trigger_gpio_handle   0
 
#define TRIGGER_GPIO_PIN   IRQ_INT_ID
 
#define TRIGGER_INT_ID   IRQ_INT_ID
 
#define CONV_TRIGGER_PERIOD_NSEC   (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000)
 
#define CONV_TRIGGER_DUTY_CYCLE_NSEC   (CONV_TRIGGER_PERIOD_NSEC / 2)
 
#define ADC_MAX_COUNT_UNIPOLAR   (uint32_t)((1 << AD7606X_ADC_RESOLUTION) - 1)
 
#define ADC_MAX_COUNT_BIPOLAR   (uint32_t)(1 << (AD7606X_ADC_RESOLUTION-1))
 
#define BYTES_PER_SAMPLE   sizeof(uint16_t)
 
#define FIRMWARE_NAME   "ad7606_iio"
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#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.
 
int32_t init_pwm_trigger (void)
 Initialize the PWM trigger contoller.
 

Variables

struct no_os_uart_desc * uart_desc
 
struct no_os_gpio_desc * led_gpio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 

Detailed Description

Header file for application configurations (platform-agnostic)

Copyright (c) 2020-2023, 2025 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_AD7606B

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad7606b"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ AD7606X_ADC_CHANNELS

#define AD7606X_ADC_CHANNELS   8

◆ AD7606X_ADC_RESOLUTION

#define AD7606X_ADC_RESOLUTION   16

◆ ADC_MAX_COUNT_BIPOLAR

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

◆ ADC_MAX_COUNT_UNIPOLAR

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

◆ BURST_DATA_CAPTURE

#define BURST_DATA_CAPTURE   0

◆ busy_gpio_extra_init_params

#define busy_gpio_extra_init_params   stm32_busy_gpio_extra_init_params

◆ BYTES_PER_SAMPLE

#define BYTES_PER_SAMPLE   sizeof(uint16_t)

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   1

◆ CONV_TRIGGER_DUTY_CYCLE_NSEC

#define CONV_TRIGGER_DUTY_CYCLE_NSEC   (CONV_TRIGGER_PERIOD_NSEC / 2)

◆ CONV_TRIGGER_PERIOD_NSEC

#define CONV_TRIGGER_PERIOD_NSEC   (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000)

◆ convst_gpio_extra_init_params

#define convst_gpio_extra_init_params   stm32_convst_gpio_extra_init_params

◆ DATA_CAPTURE_MODE

#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE

◆ DEV_AD7606B

#define DEV_AD7606B

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD7606B"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad7606_iio"

◆ gpio_ops

#define gpio_ops   stm32_gpio_ops

◆ i2c_extra_init_params

#define i2c_extra_init_params   stm32_i2c_extra_init_params

◆ i2c_ops

#define i2c_ops   stm32_i2c_ops

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ irq_ops

#define irq_ops   stm32_gpio_irq_ops

◆ osr0_gpio_extra_init_params

#define osr0_gpio_extra_init_params   stm32_osr0_gpio_extra_init_params

◆ osr1_gpio_extra_init_params

#define osr1_gpio_extra_init_params   stm32_osr1_gpio_extra_init_params

◆ osr2_gpio_extra_init_params

#define osr2_gpio_extra_init_params   stm32_osr2_gpio_extra_init_params

◆ pwm_extra_init_params

#define pwm_extra_init_params   stm32_pwm_extra_init_params

◆ pwm_gpio_extra_init_params

#define pwm_gpio_extra_init_params   stm32_pwm_gpio_extra_init_params

◆ pwm_ops

#define pwm_ops   stm32_pwm_ops

◆ range_gpio_extra_init_params

#define range_gpio_extra_init_params   stm32_range_gpio_extra_init_params

◆ reset_gpio_extra_init_params

#define reset_gpio_extra_init_params   stm32_reset_gpio_extra_init_params

◆ spi_extra_init_params

#define spi_extra_init_params   stm32_spi_extra_init_params

◆ spi_ops

#define spi_ops   stm32_spi_ops

◆ stdby_gpio_extra_init_params

#define stdby_gpio_extra_init_params   stm32_stdby_gpio_extra_init_params

◆ STR

#define STR (   s)    XSTR(s)

◆ trigger_gpio_extra_init_params

#define trigger_gpio_extra_init_params   stm32_trigger_gpio_extra_init_params

◆ trigger_gpio_handle

#define trigger_gpio_handle   0

◆ trigger_gpio_irq_extra_params

#define trigger_gpio_irq_extra_params   stm32_trigger_gpio_irq_init_params

◆ trigger_gpio_irq_ops

#define trigger_gpio_irq_ops   stm32_gpio_irq_ops

◆ trigger_gpio_ops

#define trigger_gpio_ops   stm32_gpio_ops

◆ TRIGGER_GPIO_PIN

#define TRIGGER_GPIO_PIN   IRQ_INT_ID

◆ TRIGGER_INT_ID

#define TRIGGER_INT_ID   IRQ_INT_ID

◆ uart_extra_init_params

#define uart_extra_init_params   stm32_uart_extra_init_params

◆ uart_ops

#define uart_ops   stm32_uart_ops

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ vcom_extra_init_params

#define vcom_extra_init_params   stm32_vcom_extra_init_params

◆ vcom_ops

#define vcom_ops   stm32_usb_uart_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

◆ led_gpio_desc

struct no_os_gpio_desc* led_gpio_desc
extern

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ uart_desc

struct no_os_uart_desc* uart_desc
extern