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 "no_os_error.h"
#include "no_os_delay.h"
#include "no_os_gpio.h"
#include "no_os_spi.h"
Include dependency graph for app_config.c:

Functions

int32_t init_system ()
 Initializing system peripherals.
 

Variables

struct no_os_spi_init_param config_spi_init_params
 
struct no_os_spi_init_param data_spi_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_xtal_osc_en_init_params
 
struct no_os_gpio_init_param gpio_gp1_init_params
 
struct no_os_gpio_init_param gpio_gp2_init_params
 
struct no_os_gpio_init_param gpio_gp3_init_params
 
struct no_os_gpio_init_param gpio_40m_osc_init_params
 
struct no_os_gpio_init_param gpio_20m_osc_init_params
 
struct no_os_gpio_init_param gpio_10m_osc_init_params
 
struct no_os_gpio_init_param gpio_afe_ctrl_init_params
 
struct no_os_i2c_init_param no_os_i2c_init_params
 
struct eeprom_24xx32a_init_param eeprom_extra_init_params
 
struct no_os_eeprom_init_param eeprom_init_params
 
struct no_os_uart_desc * uart_iio_comm_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_gpio_desc * gpio_afe_ctrl_desc
 
struct no_os_gpio_desc * gpio_gp1_desc
 
struct no_os_gpio_desc * gpio_gp2_desc
 
struct no_os_gpio_desc * gpio_gp3_desc
 
struct no_os_gpio_desc * gpio_xtal_osc_en_desc
 
struct no_os_gpio_desc * gpio_osc_en_40m_desc
 
struct no_os_gpio_desc * gpio_osc_en_20m_desc
 
struct no_os_gpio_desc * gpio_osc_en_10m_desc
 
struct no_os_eeprom_desc * eeprom_desc
 

Detailed Description

Application configurations module.

This module contains the configurations needed for IIO application

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

Variable Documentation

◆ config_spi_init_params

struct no_os_spi_init_param config_spi_init_params
Initial value:
= {
.device_id = SPI_DEVICE_ID,
.max_speed_hz = SPI_CFG_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_CSB
Definition app_config_mbed.h:33
#define SPI_DEVICE_ID
Definition app_config_stm32.h:54
#define config_spi_extra_init_params
Definition app_config.h:88
#define SPI_CFG_SPEED
Definition app_config_stm32.h:107

◆ data_spi_init_params

struct no_os_spi_init_param data_spi_init_params
Initial value:
= {
.device_id = SPI_DEVICE_ID,
.max_speed_hz = SPI_DATA_SPEED,
.mode = NO_OS_SPI_MODE_3,
.chip_select = SPI_DCS_CSB,
.bit_order = NO_OS_SPI_BIT_ORDER_MSB_FIRST,
.platform_ops = &spi_ops,
}
#define data_spi_extra_init_params
Definition app_config.h:89
#define SPI_DATA_SPEED
Definition app_config_stm32.h:108
#define SPI_DCS_CSB
Definition app_config_stm32.h:106

◆ 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 = &no_os_i2c_init_params
}
struct no_os_i2c_init_param no_os_i2c_init_params
Definition app_config.c:179

◆ eeprom_init_params

struct no_os_eeprom_init_param eeprom_init_params
Initial value:
= {
.device_id = I2C_DEVICE_ID,
.platform_ops = &eeprom_24xx32a_ops,
}
#define I2C_DEVICE_ID
Definition app_config_stm32.h:59
struct eeprom_24xx32a_init_param eeprom_extra_init_params
Definition app_config.c:187

◆ gpio_10m_osc_init_params

struct no_os_gpio_init_param gpio_10m_osc_init_params
Initial value:
= {
.number = GPIO_OSC_EN_10M,
.platform_ops = &gpio_ops,
}
#define gpio_ops
Definition app_config.h:85
#define gpio_10m_osc_extra_init_params
Definition app_config.h:99
#define GPIO_OSC_EN_10M_PORT
Definition app_config_stm32.h:163
#define GPIO_OSC_EN_10M
Definition app_config_stm32.h:164

◆ gpio_20m_osc_init_params

struct no_os_gpio_init_param gpio_20m_osc_init_params
Initial value:
= {
.number = GPIO_OSC_EN_20M,
.platform_ops = &gpio_ops,
}
#define gpio_20m_osc_extra_init_params
Definition app_config.h:98
#define GPIO_OSC_EN_20M_PORT
Definition app_config_stm32.h:161
#define GPIO_OSC_EN_20M
Definition app_config_stm32.h:162

◆ gpio_40m_osc_init_params

struct no_os_gpio_init_param gpio_40m_osc_init_params
Initial value:
= {
.number = GPIO_OSC_EN_40M,
.platform_ops = &gpio_ops,
}
#define gpio_40m_osc_extra_init_params
Definition app_config.h:97
#define GPIO_OSC_EN_40M
Definition app_config_stm32.h:160
#define GPIO_OSC_EN_40M_PORT
Definition app_config_stm32.h:159

◆ gpio_afe_ctrl_desc

struct no_os_gpio_desc* gpio_afe_ctrl_desc

◆ gpio_afe_ctrl_init_params

struct no_os_gpio_init_param gpio_afe_ctrl_init_params
Initial value:
= {
.number = GPIO_AFE_CTRL,
.platform_ops = &gpio_ops,
}
#define gpio_afe_ctrl_extra_init_params
Definition app_config.h:100
#define GPIO_AFE_CTRL_PORT
Definition app_config_stm32.h:139
#define GPIO_AFE_CTRL
Definition app_config_stm32.h:140

◆ gpio_gp1_desc

struct no_os_gpio_desc* gpio_gp1_desc

◆ gpio_gp1_init_params

struct no_os_gpio_init_param gpio_gp1_init_params
Initial value:
= {
.port = GPIO_GP1_PORT,
.number = GPIO_GP1,
.platform_ops = &gpio_ops,
}
#define gpio_gp1_extra_init_params
Definition app_config.h:94
#define GPIO_GP1_PORT
Definition app_config_stm32.h:143
#define GPIO_GP1
Definition app_config_stm32.h:144

◆ gpio_gp2_desc

struct no_os_gpio_desc* gpio_gp2_desc

◆ gpio_gp2_init_params

struct no_os_gpio_init_param gpio_gp2_init_params
Initial value:
= {
.port = GPIO_GP2_PORT,
.number = GPIO_GP2,
.platform_ops = &gpio_ops,
}
#define gpio_gp2_extra_init_params
Definition app_config.h:95
#define GPIO_GP2
Definition app_config_stm32.h:148
#define GPIO_GP2_PORT
Definition app_config_stm32.h:147

◆ gpio_gp3_desc

struct no_os_gpio_desc* gpio_gp3_desc

◆ gpio_gp3_init_params

struct no_os_gpio_init_param gpio_gp3_init_params
Initial value:
= {
.port = GPIO_GP3_PORT,
.number = GPIO_GP3,
.platform_ops = &gpio_ops,
}
#define gpio_gp3_extra_init_params
Definition app_config.h:96
#define GPIO_GP3_PORT
Definition app_config_stm32.h:155
#define GPIO_GP3
Definition app_config_stm32.h:156

◆ gpio_osc_en_10m_desc

struct no_os_gpio_desc* gpio_osc_en_10m_desc

◆ gpio_osc_en_20m_desc

struct no_os_gpio_desc* gpio_osc_en_20m_desc

◆ gpio_osc_en_40m_desc

struct no_os_gpio_desc* gpio_osc_en_40m_desc

◆ gpio_xtal_osc_en_desc

struct no_os_gpio_desc* gpio_xtal_osc_en_desc

◆ gpio_xtal_osc_en_init_params

struct no_os_gpio_init_param gpio_xtal_osc_en_init_params
Initial value:
= {
.number = GPIO_XTAL_OSC_EN,
.platform_ops = &gpio_ops,
}
#define gpio_xtal_osc_en_extra_init_params
Definition app_config.h:93
#define GPIO_XTAL_OSC_EN_PORT
Definition app_config_stm32.h:151
#define GPIO_XTAL_OSC_EN
Definition app_config_stm32.h:152

◆ no_os_i2c_init_params

struct no_os_i2c_init_param no_os_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

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

◆ 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
#define UART_IRQ_ID
Definition app_config_stm32.h:43
#define UART_DEVICE_ID
Definition app_config_stm32.h:130