precision-converters-firmware
Macros | Functions | Variables
ad5770r_console_app.c File Reference

: Implementation for the menu functions that handle the AD5770R More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <assert.h>
#include "app_config.h"
#include "no_os_delay.h"
#include "no_os_error.h"
#include "no_os_gpio.h"
#include "no_os_spi.h"
#include "mbed_platform_support.h"
#include "mbed_gpio.h"
#include "ad5770r.h"
#include "ad5770r_console_app.h"
#include "ad5770r_user_config.h"
#include "ad5770r_reset_config.h"
Include dependency graph for ad5770r_console_app.c:

Macros

#define TOGGLE_MUX_BUFFER   1000
 
#define TOGGLE_DIODE_EXT_BIAS   1001
 
#define MENU_CHANNEL_OFFSET   100
 

Functions

int32_t ad5770r_app_initialize (void)
 Initialize the AD5770R device and the SPI port as required. More...
 
int32_t ad5770r_software_reset (struct ad5770r_dev *dev)
 Performs a software reset. More...
 

Variables

struct mbed_gpio_init_param hw_ldacb_extra_init_params
 
console_menu ad5770r_main_menu
 

Detailed Description

: Implementation for the menu functions that handle the AD5770R

:

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

Macro Definition Documentation

◆ MENU_CHANNEL_OFFSET

#define MENU_CHANNEL_OFFSET   100

◆ TOGGLE_DIODE_EXT_BIAS

#define TOGGLE_DIODE_EXT_BIAS   1001

◆ TOGGLE_MUX_BUFFER

#define TOGGLE_MUX_BUFFER   1000

Function Documentation

◆ ad5770r_app_initialize()

int32_t ad5770r_app_initialize ( void  )

Initialize the AD5770R device and the SPI port as required.

Returns
0 in case of success, negative error code otherwise

This resets and then writes the default register map value to the device. A call to init the SPI port is made, but may not actually do very much, depending on the platform

Here is the caller graph for this function:

◆ ad5770r_software_reset()

int32_t ad5770r_software_reset ( struct ad5770r_dev *  dev)

Performs a software reset.

Parameters
dev[in]- The device structure.
Returns
0 in case of success, negative error code otherwise

Variable Documentation

◆ ad5770r_main_menu

console_menu ad5770r_main_menu
Initial value:
= {
.title = "AD5770R Console App",
.items = main_menu_items,
.itemCount = ARRAY_SIZE(main_menu_items),
.headerItem = display_main_menu_header,
.footerItem = display_main_menu_footer,
.enableEscapeKey = false
}
console_menu_item main_menu_items[]
Definition: ad5592r_console_app.c:1057
#define ARRAY_SIZE(x)
Definition: adi_console_menu.h:49

◆ hw_ldacb_extra_init_params

struct mbed_gpio_init_param hw_ldacb_extra_init_params
Initial value:
= {
.pin_mode = 0
}