precision-converters-firmware
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 "stm32_dma.h"
Include dependency graph for app_config.c:

Functions

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

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 pwm_init_params
 
struct no_os_gpio_init_param cs_pwm_gpio_params
 
struct no_os_pwm_init_param cs_init_params
 
struct no_os_pwm_init_param tx_trigger_init_params
 
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_gpio_desc * trigger_gpio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_pwm_desc * cs_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_dma_init_param ad405x_dma_init_param
 

Detailed Description

Application configurations module.

This module contains the configurations needed for IIO application

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

◆ init_pwm()

int32_t init_pwm ( void  )

Initialize the PWM interface.

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

◆ 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

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 = &dma_ops,
.sg_handler = (void *)receivecomplete_callback,
}
void receivecomplete_callback(DMA_HandleTypeDef *hdma)
Callback function to flag the capture of number of requested samples.
Definition: app_config_stm32.c:306
#define dma_ops
Definition: app_config_stm32.h:106
#define AD405x_DMA_NUM_CHANNELS
Definition: app_config_stm32.h:80

◆ cs_desc

struct no_os_pwm_desc* cs_desc

◆ cs_gpio_desc

struct no_os_gpio_desc* cs_gpio_desc

◆ cs_init_params

struct no_os_pwm_init_param cs_init_params
Initial value:
= {
.id = TIMER2_ID,
.duty_cycle_ns = CONV_TRIGGER_PERIOD_NSEC(SAMPLING_RATE) - 360,
.polarity = NO_OS_PWM_POLARITY_HIGH,
.platform_ops = &pwm_ops,
.pwm_gpio = &cs_pwm_gpio_params
}
#define pwm_ops
Definition: app_config.h:89
#define SAMPLING_RATE
Definition: app_config_mbed.h:56
#define CONV_TRIGGER_PERIOD_NSEC
Definition: app_config_mbed.h:57
struct no_os_gpio_init_param cs_pwm_gpio_params
Definition: app_config.c:125
#define TIMER2_ID
Definition: app_config_mbed.h:51
#define cs_extra_init_params
Definition: app_config_stm32.h:96

◆ cs_pwm_gpio_params

struct no_os_gpio_init_param cs_pwm_gpio_params
Initial value:
= {
.number = SPI_CS_PIN_NUM,
.platform_ops = &gpio_ops,
}
#define gpio_ops
Definition: app_config.h:85
#define SPI_CS_PIN_NUM
Definition: app_config_mbed.h:34
#define pwm_gpio_extra_init_params
Definition: app_config_stm32.h:91
#define STM32_SPI_CS_PORT_NUM
Definition: app_config_stm32.h:46

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc

◆ 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 CNV_PORT_NUM
Definition: app_config_mbed.h:58
#define CNV_PIN_NUM
Definition: app_config_mbed.h:57

◆ pwm_init_params

struct no_os_pwm_init_param pwm_init_params
Initial value:
= {
.id = TIMER1_ID,
.duty_cycle_ns = CONV_TRIGGER_PERIOD_NSEC(SAMPLING_RATE) - 360,
.polarity = NO_OS_PWM_POLARITY_LOW,
.pwm_gpio = &pwm_gpio_params,
.platform_ops = &pwm_ops,
}
#define pwm_extra_init_params
Definition: app_config.h:77
struct no_os_gpio_init_param pwm_gpio_params
Definition: app_config.c:99
#define TIMER1_ID
Definition: app_config_mbed.h:50

◆ 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 = TRIGGER_INT_ID,
.platform_ops = &stm32_irq_ops
}
#define TRIGGER_INT_ID
Definition: app_config.h:95

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc

◆ tx_trigger_desc

struct no_os_pwm_desc* tx_trigger_desc

◆ tx_trigger_init_params

struct no_os_pwm_init_param tx_trigger_init_params
Initial value:
= {
.id = TIMER8_ID,
.period_ns = 100,
.duty_cycle_ns = 0,
.polarity = NO_OS_PWM_POLARITY_LOW,
.platform_ops = &pwm_ops,
}
#define tx_trigger_extra_init_params
Definition: app_config_stm32.h:97
#define TIMER8_ID
Definition: app_config_stm32.h:78

◆ 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 = false,
.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 = false,
.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