precision-converters-firmware
Classes | Macros | Enumerations | Functions | Variables
ad7124_console_app.c File Reference

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

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
#include "app_config.h"
#include "mbed_platform_support.h"
#include "no_os_error.h"
#include "no_os_gpio.h"
#include "no_os_spi.h"
#include "mbed_spi.h"
#include "mbed_gpio.h"
#include "ad7124.h"
#include "ad7124_regs.h"
#include "ad7124_support.h"
#include "ad7124_regs_configs.h"
#include "ad7124_console_app.h"
Include dependency graph for ad7124_console_app.c:

Classes

struct  temp_loopup
 

Macros

#define AD7124_CHANNEL_COUNT   16
 
#define SHOW_ALL_CHANNELS   false
 
#define SHOW_ENABLED_CHANNELS   true
 
#define DISPLAY_DATA_TABULAR   0
 
#define DISPLAY_DATA_STREAM   1
 
#define AD7124_MAX_SETUPS   8
 
#define AD7124_MAX_CHANNELS   16
 
#define NUM_OF_FILTERS   5
 
#define MAX_FILTER_DATA_RATE_FS   2047
 
#define MIN_FILTER_DATA_RATE   1
 
#define MAX_GAIN_BITS_VALUE   7
 
#define MIN_PROGRAMMABLE_GAIN   1
 
#define MAX_PROGRAMMABLE_GAIN   128
 
#define MAX_ANALOG_INPUTS   32
 

Enumerations

enum  Chn_EnbleDisable_action {
  CHN_DISABLE ,
  CHN_ENABLE
}
 

Functions

int32_t ad7124_app_initialize (uint8_t configID)
 Initialize the AD7124 device and the SPI port as required. More...
 

Variables

console_menu ad7124_main_menu
 

Detailed Description

: Implementation for the menu functions that handle the AD7124

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

based on user selected console menu.

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

◆ AD7124_CHANNEL_COUNT

#define AD7124_CHANNEL_COUNT   16

◆ AD7124_MAX_CHANNELS

#define AD7124_MAX_CHANNELS   16

◆ AD7124_MAX_SETUPS

#define AD7124_MAX_SETUPS   8

◆ DISPLAY_DATA_STREAM

#define DISPLAY_DATA_STREAM   1

◆ DISPLAY_DATA_TABULAR

#define DISPLAY_DATA_TABULAR   0

◆ MAX_ANALOG_INPUTS

#define MAX_ANALOG_INPUTS   32

◆ MAX_FILTER_DATA_RATE_FS

#define MAX_FILTER_DATA_RATE_FS   2047

◆ MAX_GAIN_BITS_VALUE

#define MAX_GAIN_BITS_VALUE   7

◆ MAX_PROGRAMMABLE_GAIN

#define MAX_PROGRAMMABLE_GAIN   128

◆ MIN_FILTER_DATA_RATE

#define MIN_FILTER_DATA_RATE   1

◆ MIN_PROGRAMMABLE_GAIN

#define MIN_PROGRAMMABLE_GAIN   1

◆ NUM_OF_FILTERS

#define NUM_OF_FILTERS   5

◆ SHOW_ALL_CHANNELS

#define SHOW_ALL_CHANNELS   false

◆ SHOW_ENABLED_CHANNELS

#define SHOW_ENABLED_CHANNELS   true

Enumeration Type Documentation

◆ Chn_EnbleDisable_action

Enumerator
CHN_DISABLE 
CHN_ENABLE 

Function Documentation

◆ ad7124_app_initialize()

int32_t ad7124_app_initialize ( uint8_t  configID)

Initialize the AD7124 device and the SPI port as required.

Parameters
configID-Configuration ID
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:

Variable Documentation

◆ ad7124_main_menu

console_menu ad7124_main_menu
Initial value:
= {
.title = "AD7124 Main Menu",
.items = main_menu_items,
.itemCount = ARRAY_SIZE(main_menu_items),
.headerItem = NULL,
.footerItem = NULL,
.enableEscapeKey = false
}
console_menu_item main_menu_items[]
Definition: ad5592r_console_app.c:1057
#define ARRAY_SIZE(x)
Definition: adi_console_menu.h:49