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

Application configurations module. More...

#include <stdbool.h>
#include "app_config.h"
#include "common.h"
#include "ad405x_iio.h"
#include "ad405x_user_config.h"
#include "no_os_delay.h"
#include "no_os_i2c.h"
#include "no_os_dma.h"
Include dependency graph for app_config.c:

Functions

int32_t init_pwm_irq (void)
 Initialize the PWM Completion Interrupt.
 
int32_t gpio_trigger_init (void)
 Initialize the trigger GPIO and associated IRQ event.
 
int32_t init_pwm (void)
 Initialize the PWM interface.
 
int32_t deinit_pwm (void)
 DeInitialize the PWM interface.
 
int32_t init_system (void)
 Initializing system peripherals.
 
int32_t init_system_post_verification (void)
 Initializing system peripherals.
 

Variables

struct no_os_uart_init_param uart_iio_comm_init_params
 
struct no_os_uart_init_param uart_console_stdio_init_params
 
struct no_os_irq_init_param trigger_gpio_irq_params
 
struct no_os_gpio_init_param pwm_gpio_params
 
struct no_os_pwm_init_param spi_dma_pwm_init_params
 
struct no_os_pwm_init_param spi_intr_pwm_init_params
 
struct no_os_pwm_init_param i3c_dma_pwm_init_params
 
struct no_os_pwm_init_param i3c_intr_pwm_init_params
 
uint32_t i3c_cr
 
struct no_os_dma_xfer_desc i3c_cr_dma_xfer
 
struct no_os_eeprom_init_param eeprom_init_params
 
struct no_os_pwm_desc * pwm_desc
 
struct no_os_irq_ctrl_desc * pwm_irq_desc
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_gpio_desc * trigger_gpio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_gpio_desc * cs_gpio_desc
 
struct no_os_dma_desc * ad405x_dma_desc
 
struct no_os_pwm_desc * tx_trigger_desc
 
struct no_os_pwm_desc * cs_pwm_desc
 
struct no_os_dma_init_param ad405x_dma_init_param
 

Detailed Description

Application configurations module.

This module contains the configurations needed for IIO application

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

Function Documentation

◆ deinit_pwm()

int32_t deinit_pwm ( void  )

DeInitialize the PWM interface.

Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ gpio_trigger_init()

int32_t gpio_trigger_init ( void  )

Initialize the trigger GPIO and associated IRQ event.

Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ init_pwm()

int32_t init_pwm ( void  )

Initialize the PWM interface.

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

◆ init_pwm_irq()

int32_t init_pwm_irq ( void  )

Initialize the PWM Completion Interrupt.

Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ init_system()

int32_t init_system ( void  )

Initializing system peripherals.

Initialize the system peripherals.

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

This function initializes system peripherals for the application

◆ init_system_post_verification()

int32_t init_system_post_verification ( void  )

Initializing system peripherals.

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

This function initializes system peripherals for the application

Here is the caller graph for this function:

Variable Documentation

◆ ad405x_dma_desc

struct no_os_dma_desc* ad405x_dma_desc

◆ ad405x_dma_init_param

struct no_os_dma_init_param ad405x_dma_init_param
Initial value:
= {
.id = 0,
.platform_ops = (struct no_os_dma_platform_ops *) &dma_ops,
.sg_handler = (void *)receivecomplete_callback,
}
void receivecomplete_callback(DMA_HandleTypeDef *hdma)
Callback function to flag the transfer of number of requested samples.
Definition app_config_stm32.c:340
#define dma_ops
Definition app_config_stm32.h:112
#define AD405x_DMA_NUM_CHANNELS
Definition app_config_stm32.h:49

◆ cs_gpio_desc

struct no_os_gpio_desc* cs_gpio_desc

◆ cs_pwm_desc

struct no_os_pwm_desc* cs_pwm_desc

◆ eeprom_init_params

struct no_os_eeprom_init_param eeprom_init_params
Initial value:
= {
.device_id = 0,
.platform_ops = &eeprom_24xx32a_ops,
.extra = &eeprom_extra_init_params
}

◆ i3c_cr

uint32_t i3c_cr

◆ i3c_cr_dma_xfer

struct no_os_dma_xfer_desc i3c_cr_dma_xfer
Initial value:
= {
.src = (uint8_t *)&i3c_cr,
.dst = NULL,
.length = sizeof(uint32_t),
.xfer_type = MEM_TO_MEM,
.xfer_complete_cb = NULL,
.xfer_complete_ctx = NULL,
.irq_priority = 0,
.periph = NO_OS_DMA_IRQ,
.extra = NULL
}
uint32_t i3c_cr
Definition app_config.c:180

◆ i3c_dma_pwm_init_params

struct no_os_pwm_init_param i3c_dma_pwm_init_params
Initial value:
= {
.id = CNV_TIMER_ID,
.polarity = NO_OS_PWM_POLARITY_LOW,
.platform_ops = &pwm_ops,
}
#define pwm_ops
Definition app_config.h:89
#define pwm_extra_init_params
Definition app_config.h:77
#define PWM_FREQUENCY_TO_PERIOD(x)
Definition app_config.h:170
#define SAMPLING_RATE_I3C_DMA
Definition app_config_stm32.h:250

◆ i3c_intr_pwm_init_params

struct no_os_pwm_init_param i3c_intr_pwm_init_params
Initial value:
= {
.id = CNV_TIMER_ID,
.irq_id = CNV_PWM_TIMER_IRQ_ID,
.platform_ops = &pwm_ops,
}
#define SAMPLING_RATE_I3C_INTR
Definition app_config_stm32.h:249

◆ pwm_desc

struct no_os_pwm_desc* pwm_desc

◆ pwm_gpio_params

struct no_os_gpio_init_param pwm_gpio_params
Initial value:
= {
.port = CNV_PORT_NUM,
.number = CNV_PIN_NUM,
.platform_ops = &gpio_ops,
}
#define gpio_ops
Definition app_config.h:85
#define CNV_PORT_NUM
Definition app_config_mbed.h:58
#define CNV_PIN_NUM
Definition app_config_mbed.h:57
#define pwm_gpio_extra_init_params
Definition app_config_stm32.h:203

◆ pwm_irq_desc

struct no_os_irq_ctrl_desc* pwm_irq_desc

◆ spi_dma_pwm_init_params

struct no_os_pwm_init_param spi_dma_pwm_init_params
Initial value:
= {
.id = CNV_TIMER_ID,
.polarity = NO_OS_PWM_POLARITY_LOW,
.pwm_gpio = &pwm_gpio_params,
.platform_ops = &pwm_ops,
}
struct no_os_gpio_init_param pwm_gpio_params
Definition app_config.c:87
#define SAMPLING_RATE_SPI_DMA
Definition app_config_stm32.h:248

◆ spi_intr_pwm_init_params

struct no_os_pwm_init_param spi_intr_pwm_init_params
Initial value:
= {
.id = CNV_TIMER_ID,
.polarity = NO_OS_PWM_POLARITY_HIGH,
.pwm_gpio = &pwm_gpio_params,
.platform_ops = &pwm_ops,
}
#define CONV_TRIGGER_DUTY_CYCLE_NSEC
Definition app_config_mbed.h:58
#define SAMPLING_RATE_SPI_INTR
Definition app_config_stm32.h:243

◆ trigger_gpio_desc

struct no_os_gpio_desc* trigger_gpio_desc

◆ trigger_gpio_irq_params

struct no_os_irq_init_param trigger_gpio_irq_params
Initial value:
= {
.irq_ctrl_id = GP1_PIN_NUM,
.platform_ops = &trigger_gpio_irq_ops,
}
#define trigger_gpio_irq_extra_params
Definition app_config.h:81
#define trigger_gpio_irq_ops
Definition app_config.h:90
#define GP1_PIN_NUM
Definition app_config_mbed.h:61

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc

◆ tx_trigger_desc

struct no_os_pwm_desc* tx_trigger_desc

◆ uart_console_stdio_desc

struct no_os_uart_desc* uart_console_stdio_desc

◆ uart_console_stdio_init_params

struct no_os_uart_init_param uart_console_stdio_init_params
Initial value:
= {
.device_id = UART_MODULE,
.asynchronous_rx = true,
.baud_rate = IIO_UART_BAUD_RATE,
.size = NO_OS_UART_CS_8,
.parity = NO_OS_UART_PAR_NO,
.stop = NO_OS_UART_STOP_1_BIT,
.platform_ops = &uart_ops,
}
#define uart_extra_init_params
Definition app_config.h:78
#define IIO_UART_BAUD_RATE
Definition app_config.h:164
#define uart_ops
Definition app_config.h:87
#define UART_MODULE
Definition app_config_mbed.h:54

◆ uart_iio_com_desc

struct no_os_uart_desc* uart_iio_com_desc

◆ uart_iio_comm_init_params

struct no_os_uart_init_param uart_iio_comm_init_params
Initial value:
= {
.device_id = UART_MODULE,
.asynchronous_rx = true,
.baud_rate = IIO_UART_BAUD_RATE,
.size = NO_OS_UART_CS_8,
.parity = NO_OS_UART_PAR_NO,
.stop = NO_OS_UART_STOP_1_BIT,
.irq_id = UART_IRQ,
.platform_ops = &vcom_ops,
}
#define vcom_extra_init_params
Definition app_config.h:79
#define vcom_ops
Definition app_config.h:88
#define UART_IRQ
Definition app_config_mbed.h:55