precision-converters-firmware
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
app_config.c File Reference

Application configurations module for AD777x firmware application. More...

#include "app_config.h"
#include "common.h"
#include "no_os_gpio.h"
#include "no_os_irq.h"
#include "no_os_tdm.h"
#include "no_os_pwm.h"
Include dependency graph for app_config.c:

Functions

int32_t init_tdm (void)
 Initialize the TDM Peripheral.
 
int32_t init_system (void)
 Initialize the 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_gpio_init_param drdy_init_param
 
struct no_os_irq_init_param trigger_gpio_irq_params
 
struct no_os_tdm_init_param tdm_init_param
 
struct no_os_tdm_desc * ad777x_tdm_desc
 
struct no_os_gpio_init_param gpio_error_init_param
 
struct no_os_pwm_init_param mclk_pwm_init_param
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_gpio_desc * gpio_drdy_desc
 
struct no_os_gpio_desc * gpio_error_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_pwm_desc * ext_mclk_pwm_desc
 

Detailed Description

Application configurations module for AD777x firmware 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_system()

int32_t init_system ( void  )

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise

◆ init_tdm()

int32_t init_tdm ( void  )

Initialize the TDM Peripheral.

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

Variable Documentation

◆ ad777x_tdm_desc

struct no_os_tdm_desc* ad777x_tdm_desc

◆ drdy_init_param

struct no_os_gpio_init_param drdy_init_param
Initial value:
= {
.number = GPIO_DRDY_PIN,
.port = GPIO_DRDY_PORT,
.platform_ops = &gpio_platform_ops
}
#define gpio_platform_ops
Definition app_config.h:127
#define gpio_drdy_extra_init_params
Definition app_config.h:140
#define GPIO_DRDY_PORT
Definition app_config_mbed.h:60
#define GPIO_DRDY_PIN
Definition app_config_mbed.h:55

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc

◆ ext_mclk_pwm_desc

struct no_os_pwm_desc* ext_mclk_pwm_desc

◆ gpio_drdy_desc

struct no_os_gpio_desc* gpio_drdy_desc

◆ gpio_error_desc

struct no_os_gpio_desc* gpio_error_desc

◆ gpio_error_init_param

struct no_os_gpio_init_param gpio_error_init_param
Initial value:
= {
.number = GPIO_ERROR_LED,
.platform_ops = &gpio_platform_ops
}
#define gpio_error_extra_init_params
Definition app_config.h:141
#define GPIO_ERROR_LED_PORT
Definition app_config_mbed.h:71
#define GPIO_ERROR_LED
Definition app_config_mbed.h:56

◆ mclk_pwm_init_param

struct no_os_pwm_init_param mclk_pwm_init_param
Initial value:
= {
.id = MCLK_PWM_ID,
.period_ns = AD777x_MCLK_PERIOD,
.duty_cycle_ns = AD777x_MCLK_PERIOD / 2,
.platform_ops = &pwm_ops,
}
#define pwm_ops
Definition app_config.h:89
#define pwm_extra_init_params
Definition app_config.h:77
#define AD777x_MCLK_PERIOD
Definition app_config.h:267
#define MCLK_PWM_ID
Definition app_config_mbed.h:78

◆ tdm_init_param

struct no_os_tdm_init_param tdm_init_param
Initial value:
= {
.mode = NO_OS_TDM_SLAVE_RX,
.data_size = TDM_DATA_SIZE,
.data_offset = 0,
.data_lsb_first = false,
.slots_per_frame = TDM_SLOTS_PER_FRAME,
.fs_active_low = true,
.fs_active_length = TDM_FS_ACTIVE_LENGTH,
.fs_lastbit = false,
.rising_edge_sampling = true,
.irq_id = DMA_IRQ_ID,
.rx_complete_callback = ad777x_dma_rx_cplt,
.rx_half_complete_callback = ad777x_dma_rx_half_cplt,
.platform_ops = &tdm_platform_ops,
}
#define TDM_FS_ACTIVE_LENGTH
Definition app_config_stm32.h:124
#define TDM_SLOTS_PER_FRAME
Definition app_config_stm32.h:123
#define TDM_DATA_SIZE
Definition app_config_stm32.h:122
#define tdm_platform_ops
Definition app_config.h:113
#define tdm_extra_init_params
Definition app_config.h:109
#define DMA_IRQ_ID
Definition app_config_stm32.h:81
void ad777x_dma_rx_cplt(SAI_HandleTypeDef *hsai)
SAI DMA Receive Complete Callback function.
Definition app_config_stm32.c:210
void ad777x_dma_rx_half_cplt(SAI_HandleTypeDef *hsai)
SAI DMA Receive Half Complete Callback function.
Definition app_config_stm32.c:195

◆ trigger_gpio_irq_params

struct no_os_irq_init_param trigger_gpio_irq_params
Initial value:
= {
.irq_ctrl_id = DRDY_IRQ_CTRL_ID,
.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 DRDY_IRQ_CTRL_ID
Definition app_config_mbed.h:74

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_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_DEVICE_ID,
.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_DEVICE_ID
Definition app_config_mbed.h:83

◆ 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_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