precision-converters-firmware
Functions | Variables
app_config.c File Reference

Application configurations module (platform-agnostic) More...

#include "app_config.h"
#include "no_os_util.h"
#include "common.h"
#include "no_os_error.h"
#include "no_os_uart.h"
#include "no_os_i2c.h"
#include "no_os_eeprom.h"
#include "no_os_irq.h"
#include "no_os_pwm.h"
#include "ad7091r_support.h"
Include dependency graph for app_config.c:

Functions

int init_pwm_trigger (void)
 Initialize the PWM trigger controller. More...
 
int init_system (void)
 Initialize the 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_pwm_desc * cs_desc
 
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_dma_desc * ad7091r_dma_desc
 
struct no_os_pwm_desc * tx_trigger_desc
 
struct no_os_dma_init_param ad7091r_dma_init_param
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_pwm_desc * pwm_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 

Detailed Description

Application configurations module (platform-agnostic)

This module performs the system configurations

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

int init_pwm_trigger ( void  )

Initialize the PWM trigger controller.

Initialize the PWM trigger contoller.

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

◆ init_system()

int init_system ( void  )

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise

Variable Documentation

◆ ad7091r_dma_desc

struct no_os_dma_desc* ad7091r_dma_desc

◆ ad7091r_dma_init_param

struct no_os_dma_init_param ad7091r_dma_init_param
Initial value:
= {
.id = 0,
.platform_ops = &dma_ops,
.sg_handler = receivecomplete_callback,
}
void receivecomplete_callback(DMA_HandleTypeDef *hdma)
Callback function to flag the capture of number of requested samples.
Definition: app_config_stm32.c:345
#define dma_ops
Definition: app_config_stm32.h:113
#define AD7091R_DMA_NUM_CHANNELS
Definition: app_config_stm32.h:97

◆ cs_desc

struct no_os_pwm_desc* cs_desc

◆ cs_init_params

struct no_os_pwm_init_param cs_init_params
Initial value:
= {
.id = CS_TIMER_ID,
.duty_cycle_ns = CHIP_SELECT_DUTY_CYCLE_NS,
.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 CONV_TRIGGER_PERIOD_NSEC
Definition: app_config_mbed.h:57
#define MAX_SAMPLING_RATE
Definition: app_config_mbed.h:78
struct no_os_gpio_init_param cs_pwm_gpio_params
Definition: app_config.c:125
#define cs_extra_init_params
Definition: app_config_stm32.h:102
#define CS_TIMER_ID
Definition: app_config_stm32.h:82
#define CHIP_SELECT_DUTY_CYCLE_NS
Definition: app_config_stm32.h:142

◆ cs_pwm_gpio_params

struct no_os_gpio_init_param cs_pwm_gpio_params
Initial value:
= {
.port = SPI_CS_PORT_NUM,
.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 SPI_CS_PORT_NUM
Definition: app_config_stm32.h:47
#define cs_pwm_gpio_extra_init_params
Definition: app_config_stm32.h:111

◆ 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,
.number = CNV_PIN,
.platform_ops = &gpio_ops,
}
#define CNV_PIN
Definition: app_config_mbed.h:39
#define pwm_gpio_extra_init_params
Definition: app_config_stm32.h:97
#define CNV_PORT
Definition: app_config_stm32.h:50

◆ pwm_init_params

struct no_os_pwm_init_param pwm_init_params
Initial value:
= {
.id = CNV_PWM_ID,
.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 CNV_PWM_ID
Definition: app_config_stm32.h:75
#define PWM_DUTY_CYCLE_NSEC
Definition: app_config_stm32.h:144

◆ trigger_gpio_irq_params

struct no_os_irq_init_param trigger_gpio_irq_params
Initial value:
= {
.irq_ctrl_id = BSY_PIN,
.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 BSY_PIN
Definition: app_config_stm32.h:51

◆ 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 = TX_TRIGGER_PERIOD,
.duty_cycle_ns = TX_TRIGGER_DUTY_CYCLE_NS,
.polarity = NO_OS_PWM_POLARITY_LOW,
.platform_ops = &pwm_ops,
}
#define tx_trigger_extra_init_params
Definition: app_config_stm32.h:103
#define TIMER8_ID
Definition: app_config_stm32.h:84
#define TX_TRIGGER_PERIOD
Definition: app_config_stm32.h:115
#define TX_TRIGGER_DUTY_CYCLE_NS
Definition: app_config_stm32.h:149

◆ 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_ID,
.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_ID
Definition: app_config_mbed.h:57

◆ 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_ID,
.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 = &vcom_ops,
}
#define vcom_extra_init_params
Definition: app_config.h:79
#define vcom_ops
Definition: app_config.h:88