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

Application configurations module. More...

#include <stdint.h>
#include "app_config.h"
#include "common.h"
Include dependency graph for app_config.c:

Functions

int32_t set_timer_prescaler (struct no_os_pwm_desc *desc, uint32_t prescaler)
 Set prescaler for timer.
 
int32_t init_system (void)
 Initializing system peripherals.
 

Variables

struct no_os_spi_init_param spi_init_params
 
struct no_os_i2c_init_param i2c_init_params
 
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_gpio_init_param gpio_clear_n_init_params
 
struct no_os_gpio_init_param gpio_reset_n_init_params
 
struct no_os_gpio_init_param gpio_alarm_n_init_params
 
struct no_os_gpio_init_param gpio_md_addr0_init_params
 
struct no_os_gpio_init_param gpio_md_addr1_init_params
 
struct no_os_gpio_init_param gpio_ldac_tgpx_init_params [NUM_TGPx]
 
struct no_os_irq_init_param irq_iio_trigger_init_params
 
struct eeprom_24xx32a_init_param eeprom_extra_init_params
 
struct no_os_eeprom_init_param eeprom_init_params
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_uart_desc * uart_iio_comm_desc
 
struct no_os_uart_desc * uart_console_stdio_desc = NULL
 

Detailed Description

Application configurations module.

This module contains the configurations needed for IIO application

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

Function Documentation

◆ 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

◆ set_timer_prescaler()

int32_t set_timer_prescaler ( struct no_os_pwm_desc *  desc,
uint32_t  prescaler 
)

Set prescaler for timer.

Parameters
desc[in]- The PWM descriptor.
prescaler[in]- Prescaler to be set.
Returns
0 in case of success else negative error code.

Variable Documentation

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc

◆ eeprom_extra_init_params

struct eeprom_24xx32a_init_param eeprom_extra_init_params
Initial value:
= {
.i2c_init = &i2c_init_params
}
struct no_os_i2c_init_param i2c_init_params
Definition app_config.c:43

◆ eeprom_init_params

struct no_os_eeprom_init_param eeprom_init_params
Initial value:
= {
.device_id = 0,
.platform_ops = &eeprom_24xx32a_ops,
}
struct eeprom_24xx32a_init_param eeprom_extra_init_params
Definition app_config.c:186

◆ gpio_alarm_n_init_params

struct no_os_gpio_init_param gpio_alarm_n_init_params
Initial value:
= {
.number = GPIO_ALARM_N,
.platform_ops = &gpio_ops,
}
#define gpio_ops
Definition app_config.h:85
#define gpio_input_extra_init_params
Definition app_config.h:111
#define GPIO_ALARM_N
Definition app_config_stm32.h:62
#define GPIO_ALARM_N_PORT
Definition app_config_stm32.h:61

◆ gpio_clear_n_init_params

struct no_os_gpio_init_param gpio_clear_n_init_params
Initial value:
= {
.number = GPIO_CLEAR_N,
.platform_ops = &gpio_ops,
}
#define gpio_output_extra_init_params
Definition app_config.h:112
#define GPIO_CLEAR_N_PORT
Definition app_config_stm32.h:53
#define GPIO_CLEAR_N
Definition app_config_stm32.h:54

◆ gpio_ldac_tgpx_init_params

struct no_os_gpio_init_param gpio_ldac_tgpx_init_params[NUM_TGPx]
Initial value:
= {
{
.number = GPIO_LDAC_TOGGLE0,
.pull = NO_OS_PULL_DOWN,
.platform_ops = &gpio_ops,
},
{
.number = GPIO_LDAC_TOGGLE1,
.pull = NO_OS_PULL_DOWN,
.platform_ops = &gpio_ops,
},
{
.number = GPIO_LDAC_TOGGLE2,
.pull = NO_OS_PULL_DOWN,
.platform_ops = &gpio_ops,
},
{
.number = GPIO_LDAC_TOGGLE3,
.pull = NO_OS_PULL_DOWN,
.platform_ops = &gpio_ops,
},
}
#define GPIO_LDAC_TOGGLE2_PORT
Definition app_config_stm32.h:84
#define GPIO_LDAC_TOGGLE3
Definition app_config_stm32.h:89
#define GPIO_LDAC_TOGGLE1
Definition app_config_stm32.h:81
#define GPIO_LDAC_TOGGLE0_PORT
Definition app_config_stm32.h:76
#define GPIO_LDAC_TOGGLE3_PORT
Definition app_config_stm32.h:88
#define GPIO_LDAC_TOGGLE0
Definition app_config_stm32.h:77
#define GPIO_LDAC_TOGGLE2
Definition app_config_stm32.h:85
#define GPIO_LDAC_TOGGLE1_PORT
Definition app_config_stm32.h:80

◆ gpio_md_addr0_init_params

struct no_os_gpio_init_param gpio_md_addr0_init_params
Initial value:
= {
.number = GPIO_MD_ADDR0,
.platform_ops = &gpio_ops,
}
#define GPIO_MD_ADDR0_PORT
Definition app_config_stm32.h:65
#define GPIO_MD_ADDR0
Definition app_config_stm32.h:66

◆ gpio_md_addr1_init_params

struct no_os_gpio_init_param gpio_md_addr1_init_params
Initial value:
= {
.number = GPIO_MD_ADDR1,
.platform_ops = &gpio_ops,
}
#define GPIO_MD_ADDR1_PORT
Definition app_config_stm32.h:69
#define GPIO_MD_ADDR1
Definition app_config_stm32.h:70

◆ gpio_reset_n_init_params

struct no_os_gpio_init_param gpio_reset_n_init_params
Initial value:
= {
.number = GPIO_RESET_N,
.platform_ops = &gpio_ops,
}
#define GPIO_RESET_N_PORT
Definition app_config_stm32.h:57
#define GPIO_RESET_N
Definition app_config_stm32.h:58

◆ i2c_init_params

struct no_os_i2c_init_param i2c_init_params
Initial value:
= {
.device_id = I2C_DEVICE_ID,
.platform_ops = &i2c_ops,
.max_speed_hz = 100000,
}
#define i2c_extra_init_params
Definition app_config_stm32.h:95
#define i2c_ops
Definition app_config_stm32.h:111
#define I2C_DEVICE_ID
Definition app_config_stm32.h:59

◆ irq_iio_trigger_init_params

struct no_os_irq_init_param irq_iio_trigger_init_params
Initial value:
= {
.irq_ctrl_id = IRQ_IIO_TRIGGER_ID,
.platform_ops = &irq_ops,
}
#define irq_ops
Definition app_config.h:84
#define IRQ_IIO_TRIGGER_ID
Definition app_config_stm32.h:134

◆ spi_init_params

struct no_os_spi_init_param spi_init_params
Initial value:
= {
.device_id = SPI_DEVICE_ID,
.max_speed_hz = SPI_SPEED,
.mode = NO_OS_SPI_MODE_3,
.chip_select = SPI_CSB,
.bit_order = NO_OS_SPI_BIT_ORDER_MSB_FIRST,
.platform_ops = &spi_ops,
}
#define spi_ops
Definition app_config.h:86
#define spi_extra_init_params
Definition app_config.h:80
#define SPI_CSB
Definition app_config_mbed.h:33
#define SPI_DEVICE_ID
Definition app_config_stm32.h:54
#define SPI_SPEED
Definition app_config_stm32.h:40

◆ uart_console_stdio_desc

struct no_os_uart_desc* uart_console_stdio_desc = NULL

◆ uart_console_stdio_init_params

struct no_os_uart_init_param uart_console_stdio_init_params
Initial value:
= {
.device_id = UART_DEVICE_ID,
.asynchronous_rx = true,
.irq_id = UART_IRQ_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_IRQ_ID
Definition app_config_stm32.h:43
#define UART_DEVICE_ID
Definition app_config_stm32.h:130

◆ uart_iio_comm_desc

struct no_os_uart_desc* uart_iio_comm_desc

◆ uart_iio_comm_init_params

struct no_os_uart_init_param uart_iio_comm_init_params
Initial value:
= {
.device_id = UART_DEVICE_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,
.asynchronous_rx = true,
.irq_id = UART_IRQ_ID,
.platform_ops = &vcom_ops,
}
#define vcom_extra_init_params
Definition app_config.h:79
#define vcom_ops
Definition app_config.h:88