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

Configuration file for AD5706R IIO firmware application. More...

#include <stdint.h>
#include "no_os_gpio.h"
#include "no_os_uart.h"
#include "no_os_pwm.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 SPI_INTERRUPT   1
 
#define SPI_DMA   2
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_DEVICE_NAME   "ad5706r"
 
#define AD5706_DAC_RESOLUTION   16
 
#define USE_VIRTUAL_COM_PORT
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define INTERFACE_MODE   SPI_DMA
 
#define IIO_UART_BAUD_RATE   (230400)
 
#define FIRMWARE_NAME   "ad5706r_iio"
 
#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 FREQ_TO_NSEC(x)   (((float)(1.0 / x) * 1000000) * 1000)
 
#define LDAC_DUTY_CYCLE_NSEC(x)   (x * 0.5)
 
#define DAC_UPDATE_DUTY_CYCLE_NSEC(x)   (x * 0.05)
 

Functions

int32_t init_system (void)
 Initialize the system peripherals.
 
int32_t init_pwm (void)
 Initialize the PWM interface.
 

Variables

struct no_os_uart_desc * uart_iio_comm_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_gpio_desc * gpio_ad0_desc
 
struct no_os_gpio_desc * gpio_ad1_desc
 
struct no_os_gpio_desc * gpio_ldac_tg_desc
 
struct no_os_pwm_desc * ldac_pwm_desc
 
struct no_os_pwm_desc * dac_update_pwm_desc
 
struct no_os_gpio_init_param gpio_ldac_tg_params
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_gpio_desc * gpio_shutdown_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_pwm_init_param cs_init_params
 
struct no_os_gpio_init_param csb_gpio_init_param
 
struct no_os_pwm_desc * tx_trigger_desc
 
struct no_os_pwm_init_param tx_trigger_init_params
 
struct no_os_gpio_init_param ldac_pwm_gpio_params
 

Detailed Description

Configuration file for AD5706R IIO firmware application.

Copyright (c) 2024-2026 Analog Devices, Inc.

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_NAME

#define ACTIVE_DEVICE_NAME   "ad5706r"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ AD5706_DAC_RESOLUTION

#define AD5706_DAC_RESOLUTION   16

◆ DAC_UPDATE_DUTY_CYCLE_NSEC

#define DAC_UPDATE_DUTY_CYCLE_NSEC (   x)    (x * 0.05)

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad5706r_iio"

◆ FREQ_TO_NSEC

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

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ INTERFACE_MODE

#define INTERFACE_MODE   SPI_DMA

◆ LDAC_DUTY_CYCLE_NSEC

#define LDAC_DUTY_CYCLE_NSEC (   x)    (x * 0.5)

◆ SPI_DMA

#define SPI_DMA   2

◆ SPI_INTERRUPT

#define SPI_INTERRUPT   1

◆ STR

#define STR (   s)    XSTR(s)

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

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

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

Initialize the system peripherals.

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

Variable Documentation

◆ cs_init_params

struct no_os_pwm_init_param cs_init_params
extern

◆ csb_gpio_init_param

struct no_os_gpio_init_param csb_gpio_init_param
extern

◆ dac_update_pwm_desc

struct no_os_pwm_desc* dac_update_pwm_desc
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ gpio_ad0_desc

struct no_os_gpio_desc* gpio_ad0_desc
extern

◆ gpio_ad1_desc

struct no_os_gpio_desc* gpio_ad1_desc
extern

◆ gpio_ldac_tg_desc

struct no_os_gpio_desc* gpio_ldac_tg_desc
extern

◆ gpio_ldac_tg_params

struct no_os_gpio_init_param gpio_ldac_tg_params
extern

◆ gpio_shutdown_desc

struct no_os_gpio_desc* gpio_shutdown_desc
extern

◆ ldac_pwm_desc

struct no_os_pwm_desc* ldac_pwm_desc
extern

◆ ldac_pwm_gpio_params

struct no_os_gpio_init_param ldac_pwm_gpio_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

◆ tx_trigger_init_params

struct no_os_pwm_init_param tx_trigger_init_params
extern

◆ uart_console_stdio_desc

struct no_os_uart_desc* uart_console_stdio_desc
extern

◆ uart_iio_comm_desc

struct no_os_uart_desc* uart_iio_comm_desc
extern