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

: Implementation for the menu functions that handles the nanodac functionality More...

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include "app_config.h"
#include "ad5686.h"
#include "nanodac_console_app.h"
#include "no_os_error.h"
#include "no_os_delay.h"
#include "no_os_i2c.h"
#include "no_os_spi.h"
#include "mbed_platform_support.h"
#include "mbed_gpio.h"
#include "mbed_i2c.h"
#include "mbed_spi.h"
Include dependency graph for nanodac_console_app.c:

Macros

#define I2C_SLAVE_ADDRESS   0
 
#define INTERNAL_VREF_VOLTAGE   2.5
 
#define INTERNAL_VREF_SOURCE   0U
 
#define EXTERNAL_VREF_SOURCE   1U
 
#define GAIN_LOW   1
 
#define GAIN_HIGH   2
 

Functions

int32_t nanodac_app_initialize (void)
 

Variables

console_menu dac_channel_select_menu
 
console_menu vref_select_menu
 
console_menu gain_select_menu
 
console_menu dac_readback_select_menu
 
console_menu ldac_mask_select_menu
 
console_menu operating_mode_select_menu
 
console_menu ldac_pin_select_menu
 
console_menu nanodac_main_menu
 

Detailed Description

: Implementation for the menu functions that handles the nanodac functionality

: This file is specific to nanodac console menu application handle. The functions defined in this file performs the action

based on user selected console menu.

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

◆ EXTERNAL_VREF_SOURCE

#define EXTERNAL_VREF_SOURCE   1U

◆ GAIN_HIGH

#define GAIN_HIGH   2

◆ GAIN_LOW

#define GAIN_LOW   1

◆ I2C_SLAVE_ADDRESS

#define I2C_SLAVE_ADDRESS   0

◆ INTERNAL_VREF_SOURCE

#define INTERNAL_VREF_SOURCE   0U

◆ INTERNAL_VREF_VOLTAGE

#define INTERNAL_VREF_VOLTAGE   2.5

Function Documentation

◆ nanodac_app_initialize()

int32_t nanodac_app_initialize ( void  )
Here is the caller graph for this function:

Variable Documentation

◆ dac_channel_select_menu

console_menu dac_channel_select_menu
Initial value:
= {
.title = "Select DAC Channel",
.items = dac_channel_select_items,
.itemCount = ARRAY_SIZE(dac_channel_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}
#define ARRAY_SIZE(x)
Definition: adi_console_menu.h:49

◆ dac_readback_select_menu

console_menu dac_readback_select_menu
extern

◆ gain_select_menu

console_menu gain_select_menu
Initial value:
= {
.title = "Select Gain",
.items = gain_select_items,
.itemCount = ARRAY_SIZE(gain_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}

◆ ldac_mask_select_menu

console_menu ldac_mask_select_menu
Initial value:
= {
.title = "Select LDAC Mask",
.items = ldac_mask_select_items,
.itemCount = ARRAY_SIZE(ldac_mask_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}

◆ ldac_pin_select_menu

console_menu ldac_pin_select_menu
Initial value:
= {
.title = "Select LDAC Mask",
.items = ldac_pin_select_items,
.itemCount = ARRAY_SIZE(ldac_pin_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}

◆ nanodac_main_menu

console_menu nanodac_main_menu
Initial value:
= {
.title = "Main Menu",
.items = main_menu_items,
.itemCount = ARRAY_SIZE(main_menu_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = false
}
console_menu_item main_menu_items[]
Definition: ad5592r_console_app.c:1057

◆ operating_mode_select_menu

console_menu operating_mode_select_menu
Initial value:
= {
.title = "Select Operating Mode",
.items = operating_mode_select_items,
.itemCount = ARRAY_SIZE(operating_mode_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}

◆ vref_select_menu

console_menu vref_select_menu
Initial value:
= {
.title = "Select Vref Source",
.items = vref_select_items,
.itemCount = ARRAY_SIZE(vref_select_items),
.headerItem = display_menu_header,
.footerItem = display_menu_footer,
.enableEscapeKey = true
}