Example program for AD717x and AD411x family of products.

Dependencies:   adi_console_menu platform_drivers

Committer:
Mahesh Phalke
Date:
Mon Aug 03 15:02:37 2020 +0530
Revision:
4:4592cc69bfa6
Parent:
3:6c7324997606
Child:
6:28e40a21857f
Added support for AD4114/15 devices

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mahphalke 1:48914f9593f1 1 /*!
mahphalke 1:48914f9593f1 2 *****************************************************************************
mahphalke 1:48914f9593f1 3 @file: ad717x_menu_defines_app.h
mahphalke 1:48914f9593f1 4
mahphalke 1:48914f9593f1 5 @brief: Header for AD717x/AD411x console menu definitions.
mahphalke 1:48914f9593f1 6
mahphalke 1:48914f9593f1 7 @details:
mahphalke 1:48914f9593f1 8 -----------------------------------------------------------------------------
mahphalke 1:48914f9593f1 9 Copyright (c) 2020 Analog Devices, Inc.
mahphalke 1:48914f9593f1 10 All rights reserved.
mahphalke 1:48914f9593f1 11
mahphalke 1:48914f9593f1 12 This software is proprietary to Analog Devices, Inc. and its licensors.
mahphalke 1:48914f9593f1 13 By using this software you agree to the terms of the associated
mahphalke 1:48914f9593f1 14 Analog Devices Software License Agreement.
mahphalke 1:48914f9593f1 15 *****************************************************************************/
mahphalke 1:48914f9593f1 16
mahphalke 1:48914f9593f1 17 #ifndef AD717X_MENU_DEFINES_H_
mahphalke 1:48914f9593f1 18 #define AD717X_MENU_DEFINES_H_
mahphalke 1:48914f9593f1 19
mahphalke 1:48914f9593f1 20 /******************************************************************************/
mahphalke 1:48914f9593f1 21 /***************************** Include Files **********************************/
mahphalke 1:48914f9593f1 22 /******************************************************************************/
mahphalke 1:48914f9593f1 23
mahphalke 1:48914f9593f1 24 #include "adi_console_menu.h"
mahphalke 1:48914f9593f1 25
mahphalke 1:48914f9593f1 26 /******************************************************************************/
mahphalke 1:48914f9593f1 27 /********************** Macros and Constants Definitions **********************/
mahphalke 1:48914f9593f1 28 /******************************************************************************/
mahphalke 1:48914f9593f1 29
mahphalke 1:48914f9593f1 30 // Prototypes for the console menu functions defined in ad717x_console_app.c file
mahphalke 1:48914f9593f1 31 void display_main_menu_header(void);
mahphalke 1:48914f9593f1 32 int32_t menu_read_id(uint32_t menu_id);
mahphalke 1:48914f9593f1 33 int32_t menu_read_status(uint32_t menu_id);
mahphalke 1:48914f9593f1 34 int32_t menu_sample_channels(uint32_t menu_id);
mahphalke 1:48914f9593f1 35 int32_t menu_chn_enable_disable_display(uint32_t menu_id);
mahphalke 1:48914f9593f1 36 int32_t menu_input_chn_connect_display(uint32_t menu_id);
mahphalke 1:48914f9593f1 37 int32_t menu_config_and_assign_setup(uint32_t menu_id);
mahphalke 1:48914f9593f1 38 int32_t menu_display_setup(uint32_t menu_id);
mahphalke 1:48914f9593f1 39 int32_t menu_read_temperature(uint32_t menu_id);
mahphalke 1:48914f9593f1 40 int32_t menu_calibrate_adc(uint32_t menu_id);
mahphalke 1:48914f9593f1 41 int32_t menu_read_write_device_regs(uint32_t menu_id);
mahphalke 1:48914f9593f1 42 int32_t menu_channels_enable_disable(uint32_t action);
mahphalke 1:48914f9593f1 43 int32_t menu_analog_input_connect(uint32_t user_analog_input);
mahphalke 3:6c7324997606 44 int32_t menu_input_type_selection(uint32_t input_type_id);
mahphalke 3:6c7324997606 45 int32_t menu_select_chn_pair(uint32_t user_channel_pair);
mahphalke 3:6c7324997606 46 int32_t menu_select_input_pair(uint32_t user_input_pair);
mahphalke 3:6c7324997606 47 int32_t menu_open_wire_detection(uint32_t menu_id);
mahphalke 1:48914f9593f1 48 int32_t menu_rw_ad717x_register(uint32_t rw_id);
mahphalke 1:48914f9593f1 49 int32_t menu_single_conversion(uint32_t channel_id);
mahphalke 1:48914f9593f1 50 int32_t menu_continuous_conversion_tabular(uint32_t channel_id);
mahphalke 1:48914f9593f1 51 int32_t menu_continuous_conversion_stream(uint32_t channel_id);
mahphalke 1:48914f9593f1 52 int32_t menu_filter_select(uint32_t user_input_filter_type);
mahphalke 1:48914f9593f1 53 int32_t menu_postfiler_enable_disable(uint32_t user_action);
mahphalke 1:48914f9593f1 54 int32_t menu_postfiler_select(uint32_t user_input_post_filter_type);
mahphalke 1:48914f9593f1 55 int32_t menu_odr_select(uint32_t user_input_odr_val);
mahphalke 1:48914f9593f1 56 int32_t menu_polarity_select(uint32_t user_input_polarity);
mahphalke 1:48914f9593f1 57 int32_t menu_reference_source_select(uint32_t user_input_reference);
mahphalke 3:6c7324997606 58 int32_t menu_ref_buffer_enable_disable(uint32_t user_action);
mahphalke 1:48914f9593f1 59 int32_t menu_input_buffer_enable_disable(uint32_t user_action);
mahphalke 1:48914f9593f1 60
mahphalke 1:48914f9593f1 61
mahphalke 1:48914f9593f1 62 // Define the standard ODR values for the AD717x/AD414x devices
mahphalke 1:48914f9593f1 63 // ODRx value, ODRx string name and ODRx bits
mahphalke 1:48914f9593f1 64
mahphalke 1:48914f9593f1 65 #define ODR_250000 250000.00
mahphalke 1:48914f9593f1 66 #define ODR_250000_STR "250000.00"
mahphalke 1:48914f9593f1 67 #define ODR_250000_BITS 0x00
mahphalke 1:48914f9593f1 68
mahphalke 1:48914f9593f1 69 #define ODR_125000 125000.00
mahphalke 1:48914f9593f1 70 #define ODR_125000_STR "125000.00"
mahphalke 1:48914f9593f1 71 #define ODR_125000_BITS 0x01
mahphalke 1:48914f9593f1 72
mahphalke 1:48914f9593f1 73 #define ODR_62500 62500.00
mahphalke 1:48914f9593f1 74 #define ODR_62500_STR "62500.00"
mahphalke 1:48914f9593f1 75 #define ODR_62500_BITS 0x02
mahphalke 1:48914f9593f1 76
mahphalke 1:48914f9593f1 77 #define ODR_50000 50000.00
mahphalke 1:48914f9593f1 78 #define ODR_50000_STR "50000.00"
mahphalke 1:48914f9593f1 79 #define ODR_50000_BITS 0x03
mahphalke 1:48914f9593f1 80
mahphalke 1:48914f9593f1 81 #define ODR_31250 31250.00
mahphalke 1:48914f9593f1 82 #define ODR_31250_STR "31250.00"
mahphalke 1:48914f9593f1 83 #define ODR_31250_BITS 0x04
mahphalke 1:48914f9593f1 84
mahphalke 1:48914f9593f1 85 #define ODR_25000 25000.00
mahphalke 1:48914f9593f1 86 #define ODR_25000_STR "25000.00"
mahphalke 1:48914f9593f1 87 #define ODR_25000_BITS 0x05
mahphalke 1:48914f9593f1 88
mahphalke 1:48914f9593f1 89 #define ODR_15625 15625.00
mahphalke 1:48914f9593f1 90 #define ODR_15625_STR "15625.00"
mahphalke 1:48914f9593f1 91 #define ODR_15625_BITS 0x06
mahphalke 1:48914f9593f1 92
mahphalke 1:48914f9593f1 93 #define ODR_10417 10417.00
mahphalke 1:48914f9593f1 94 #define ODR_10417_STR "10417.00"
mahphalke 1:48914f9593f1 95 #define ODR_10417_BITS 0x07
mahphalke 1:48914f9593f1 96
mahphalke 1:48914f9593f1 97 #define ODR_10000 10000.00
mahphalke 1:48914f9593f1 98 #define ODR_10000_STR "10000.00"
mahphalke 1:48914f9593f1 99 #define ODR_10000_BITS 0x07
mahphalke 1:48914f9593f1 100
mahphalke 1:48914f9593f1 101 #define ODR_5208 5208.00
mahphalke 1:48914f9593f1 102 #define ODR_5208_STR "5208.00"
mahphalke 1:48914f9593f1 103 #define ODR_5208_BITS 0x08
mahphalke 1:48914f9593f1 104
mahphalke 1:48914f9593f1 105 #define ODR_5000 5000.00
mahphalke 1:48914f9593f1 106 #define ODR_5000_STR "5000.00"
mahphalke 1:48914f9593f1 107 #define ODR_5000_BITS 0x08
mahphalke 1:48914f9593f1 108
mahphalke 1:48914f9593f1 109 #define ODR_3906 3906.00
mahphalke 1:48914f9593f1 110 #define ODR_3906_STR "3906.00"
mahphalke 1:48914f9593f1 111 #define ODR_3906_BITS 0x09
mahphalke 1:48914f9593f1 112
mahphalke 1:48914f9593f1 113 #define ODR_2604 2604.00
mahphalke 1:48914f9593f1 114 #define ODR_2604_STR "2604.00"
mahphalke 1:48914f9593f1 115 #define ODR_2604_BITS 0x09
mahphalke 1:48914f9593f1 116
mahphalke 1:48914f9593f1 117 #define ODR_2597 2597.00
mahphalke 1:48914f9593f1 118 #define ODR_2597_STR "2597.00"
mahphalke 1:48914f9593f1 119 #define ODR_2597_BITS 0x09
mahphalke 1:48914f9593f1 120
mahphalke 1:48914f9593f1 121 #define ODR_2500 2500.00
mahphalke 1:48914f9593f1 122 #define ODR_2500_STR "2500.00"
mahphalke 1:48914f9593f1 123 #define ODR_2500_BITS 0x09
mahphalke 1:48914f9593f1 124
mahphalke 1:48914f9593f1 125 #define ODR_1157 1157.00
mahphalke 1:48914f9593f1 126 #define ODR_1157_STR "1157.00"
mahphalke 1:48914f9593f1 127 #define ODR_1157_BITS 0x0A
mahphalke 1:48914f9593f1 128
mahphalke 1:48914f9593f1 129 #define ODR_1008 1008.00
mahphalke 1:48914f9593f1 130 #define ODR_1008_STR "1008.00"
mahphalke 1:48914f9593f1 131 #define ODR_1008_BITS 0x0A
mahphalke 1:48914f9593f1 132
mahphalke 1:48914f9593f1 133 #define ODR_1007 1007.00
mahphalke 1:48914f9593f1 134 #define ODR_1007_STR "1007.00"
mahphalke 1:48914f9593f1 135 #define ODR_1007_BITS 0x0A
mahphalke 1:48914f9593f1 136
mahphalke 1:48914f9593f1 137 #define ODR_1000 1000.00
mahphalke 1:48914f9593f1 138 #define ODR_1000_STR "1000.00"
mahphalke 1:48914f9593f1 139 #define ODR_1000_BITS 0x0A
mahphalke 1:48914f9593f1 140
mahphalke 1:48914f9593f1 141 #define ODR_539 539.00
mahphalke 1:48914f9593f1 142 #define ODR_539_STR "539.00"
mahphalke 1:48914f9593f1 143 #define ODR_539_BITS 0x0B
mahphalke 1:48914f9593f1 144
mahphalke 1:48914f9593f1 145 #define ODR_504 504.00
mahphalke 1:48914f9593f1 146 #define ODR_504_STR "504.00"
mahphalke 1:48914f9593f1 147 #define ODR_504_BITS 0x0B
mahphalke 1:48914f9593f1 148
mahphalke 1:48914f9593f1 149 #define ODR_503_8 503.80
mahphalke 1:48914f9593f1 150 #define ODR_503_8_STR "503.80"
mahphalke 1:48914f9593f1 151 #define ODR_503_8_BITS 0x0B
mahphalke 1:48914f9593f1 152
mahphalke 1:48914f9593f1 153 #define ODR_500 500.00
mahphalke 1:48914f9593f1 154 #define ODR_500_STR "500.00"
mahphalke 1:48914f9593f1 155 #define ODR_500_BITS 0x0B
mahphalke 1:48914f9593f1 156
mahphalke 1:48914f9593f1 157 #define ODR_401 401.00
mahphalke 1:48914f9593f1 158 #define ODR_401_STR "401.00"
mahphalke 1:48914f9593f1 159 #define ODR_401_BITS 0x0C
mahphalke 1:48914f9593f1 160
mahphalke 1:48914f9593f1 161 #define ODR_400_6 400.60
mahphalke 1:48914f9593f1 162 #define ODR_400_6_STR "400.60"
mahphalke 1:48914f9593f1 163 #define ODR_400_6_BITS 0x0C
mahphalke 1:48914f9593f1 164
mahphalke 1:48914f9593f1 165 #define ODR_400 400.00
mahphalke 1:48914f9593f1 166 #define ODR_400_STR "400.00"
mahphalke 1:48914f9593f1 167 #define ODR_400_BITS 0x0C
mahphalke 1:48914f9593f1 168
mahphalke 1:48914f9593f1 169 #define ODR_397_5 397.50
mahphalke 1:48914f9593f1 170 #define ODR_397_5_STR "397.50"
mahphalke 1:48914f9593f1 171 #define ODR_397_5_BITS 0x0C
mahphalke 1:48914f9593f1 172
mahphalke 1:48914f9593f1 173 #define ODR_397 397.00
mahphalke 1:48914f9593f1 174 #define ODR_397_STR "397.00"
mahphalke 1:48914f9593f1 175 #define ODR_397_BITS 0x0C
mahphalke 1:48914f9593f1 176
mahphalke 1:48914f9593f1 177 #define ODR_381 381.00
mahphalke 1:48914f9593f1 178 #define ODR_381_STR "381.00"
mahphalke 1:48914f9593f1 179 #define ODR_381_BITS 0x0C
mahphalke 1:48914f9593f1 180
mahphalke 1:48914f9593f1 181 #define ODR_206 206.00
mahphalke 1:48914f9593f1 182 #define ODR_206_STR "206.00"
mahphalke 1:48914f9593f1 183 #define ODR_206_BITS 0x0D
mahphalke 1:48914f9593f1 184
mahphalke 1:48914f9593f1 185 #define ODR_200_3 200.3
mahphalke 1:48914f9593f1 186 #define ODR_200_3_STR "200.30"
mahphalke 1:48914f9593f1 187 #define ODR_200_3_BITS 0x0D
mahphalke 1:48914f9593f1 188
mahphalke 1:48914f9593f1 189 #define ODR_200 200.00
mahphalke 1:48914f9593f1 190 #define ODR_200_STR "200.00"
mahphalke 1:48914f9593f1 191 #define ODR_200_BITS 0x0D
mahphalke 1:48914f9593f1 192
mahphalke 1:48914f9593f1 193 #define ODR_102 102.00
mahphalke 1:48914f9593f1 194 #define ODR_102_STR "102.00"
mahphalke 1:48914f9593f1 195 #define ODR_102_BITS 0x0E
mahphalke 1:48914f9593f1 196
mahphalke 1:48914f9593f1 197 #define ODR_100_2 100.20
mahphalke 1:48914f9593f1 198 #define ODR_100_2_STR "100.20"
mahphalke 1:48914f9593f1 199 #define ODR_100_2_BITS 0x0E
mahphalke 1:48914f9593f1 200
mahphalke 1:48914f9593f1 201 #define ODR_100 100.00
mahphalke 1:48914f9593f1 202 #define ODR_100_STR "100.00"
mahphalke 1:48914f9593f1 203 #define ODR_100_BITS 0x0E
mahphalke 1:48914f9593f1 204
mahphalke 1:48914f9593f1 205 #define ODR_60 60.00
mahphalke 1:48914f9593f1 206 #define ODR_60_STR "60.00"
mahphalke 1:48914f9593f1 207 #define ODR_60_BITS 0x0F
mahphalke 1:48914f9593f1 208
mahphalke 1:48914f9593f1 209 #define ODR_59_98 59.98
mahphalke 1:48914f9593f1 210 #define ODR_59_98_STR "59.98"
mahphalke 1:48914f9593f1 211 #define ODR_59_98_BITS 0x0F
mahphalke 1:48914f9593f1 212
mahphalke 1:48914f9593f1 213 #define ODR_59_94 59.94
mahphalke 1:48914f9593f1 214 #define ODR_59_94_STR "59.94"
mahphalke 1:48914f9593f1 215 #define ODR_59_94_BITS 0x0F
mahphalke 1:48914f9593f1 216
mahphalke 1:48914f9593f1 217 #define ODR_59_52 59.52
mahphalke 1:48914f9593f1 218 #define ODR_59_52_STR "59.52"
mahphalke 1:48914f9593f1 219 #define ODR_59_52_BITS 0x0F
mahphalke 1:48914f9593f1 220
mahphalke 1:48914f9593f1 221 #define ODR_50 50.00
mahphalke 1:48914f9593f1 222 #define ODR_50_STR "50.00"
mahphalke 1:48914f9593f1 223 #define ODR_50_BITS 0x10
mahphalke 1:48914f9593f1 224
mahphalke 1:48914f9593f1 225 #define ODR_49_96 49.96
mahphalke 1:48914f9593f1 226 #define ODR_49_96_STR "49.96"
mahphalke 1:48914f9593f1 227 #define ODR_49_96_BITS 0x10
mahphalke 1:48914f9593f1 228
mahphalke 1:48914f9593f1 229 #define ODR_49_68 49.68
mahphalke 1:48914f9593f1 230 #define ODR_49_68_STR "49.68"
mahphalke 1:48914f9593f1 231 #define ODR_49_68_BITS 0x10
mahphalke 1:48914f9593f1 232
mahphalke 1:48914f9593f1 233 #define ODR_20_01 20.01
mahphalke 1:48914f9593f1 234 #define ODR_20_01_STR "20.01"
mahphalke 1:48914f9593f1 235 #define ODR_20_01_BITS 0x11
mahphalke 1:48914f9593f1 236
mahphalke 1:48914f9593f1 237 #define ODR_20 20.00
mahphalke 1:48914f9593f1 238 #define ODR_20_STR "20.00"
mahphalke 1:48914f9593f1 239 #define ODR_20_BITS 0x11
mahphalke 1:48914f9593f1 240
mahphalke 1:48914f9593f1 241 #define ODR_16_63 16.63
mahphalke 1:48914f9593f1 242 #define ODR_16_63_STR "16.63"
mahphalke 1:48914f9593f1 243 #define ODR_16_63_BITS 0x12
mahphalke 1:48914f9593f1 244
mahphalke 1:48914f9593f1 245 #define ODR_16_67 16.67
mahphalke 1:48914f9593f1 246 #define ODR_16_67_STR "16.67"
mahphalke 1:48914f9593f1 247 #define ODR_16_67_BITS 0x12
mahphalke 1:48914f9593f1 248
mahphalke 1:48914f9593f1 249 #define ODR_10 10.00
mahphalke 1:48914f9593f1 250 #define ODR_10_STR "10.00"
mahphalke 1:48914f9593f1 251 #define ODR_10_BITS 0x13
mahphalke 1:48914f9593f1 252
mahphalke 1:48914f9593f1 253 #define ODR_5 5.00
mahphalke 1:48914f9593f1 254 #define ODR_5_STR "5.00"
mahphalke 1:48914f9593f1 255 #define ODR_5_BITS 0x14
mahphalke 1:48914f9593f1 256
mahphalke 1:48914f9593f1 257 #define ODR_2_5 2.50
mahphalke 1:48914f9593f1 258 #define ODR_2_5_STR "2.50"
mahphalke 1:48914f9593f1 259 #define ODR_2_5_BITS 0x15
mahphalke 1:48914f9593f1 260
mahphalke 1:48914f9593f1 261 #define ODR_1_25 1.25
mahphalke 1:48914f9593f1 262 #define ODR_1_25_STR "1.25"
mahphalke 1:48914f9593f1 263 #define ODR_1_25_BITS 0x16
mahphalke 1:48914f9593f1 264
mahphalke 1:48914f9593f1 265 #define ODR_RES_STR "RES"
mahphalke 1:48914f9593f1 266 #define ODR_RES_BITS 0x17
mahphalke 1:48914f9593f1 267
mahphalke 1:48914f9593f1 268
mahphalke 1:48914f9593f1 269 // Analog input bits (0:9) for the AD717x/AD414x devices
mahphalke 1:48914f9593f1 270 #define VIN0_INPUT_BITS 0x00
mahphalke 1:48914f9593f1 271 #define VIN1_INPUT_BITS 0x01
mahphalke 1:48914f9593f1 272 #define VIN2_INPUT_BITS 0x02
mahphalke 1:48914f9593f1 273 #define VIN3_INPUT_BITS 0x03
mahphalke 1:48914f9593f1 274 #define VIN4_INPUT_BITS 0x04
mahphalke 1:48914f9593f1 275 #define VIN5_INPUT_BITS 0x05
mahphalke 1:48914f9593f1 276 #define VIN6_INPUT_BITS 0x06
mahphalke 1:48914f9593f1 277 #define VIN7_INPUT_BITS 0x07
mahphalke 1:48914f9593f1 278 #define VIN8_INPUT_BITS 0x08
mahphalke 1:48914f9593f1 279 #define VIN9_INPUT_BITS 0x09
mahphalke 1:48914f9593f1 280 #define VIN10_INPUT_BITS 0x0A
mahphalke 1:48914f9593f1 281 #define VIN11_INPUT_BITS 0x0B
mahphalke 1:48914f9593f1 282 #define VIN12_INPUT_BITS 0x0C
mahphalke 1:48914f9593f1 283 #define VIN13_INPUT_BITS 0x0D
mahphalke 1:48914f9593f1 284 #define VIN14_INPUT_BITS 0x0E
mahphalke 1:48914f9593f1 285 #define VIN15_INPUT_BITS 0x0F
mahphalke 1:48914f9593f1 286 #define VIN16_INPUT_BITS 0x10
mahphalke 1:48914f9593f1 287 #define VINCOM_INPUT_BITS 0x10
mahphalke 1:48914f9593f1 288 #define IN0N_INPUT_BITS 0x08
mahphalke 1:48914f9593f1 289 #define IN1N_INPUT_BITS 0x09
mahphalke 1:48914f9593f1 290 #define IN2N_INPUT_BITS 0x0A
mahphalke 1:48914f9593f1 291 #define IN3N_INPUT_BITS 0x0B
mahphalke 1:48914f9593f1 292 #define IN3P_INPUT_BITS 0x0C
mahphalke 1:48914f9593f1 293 #define IN2P_INPUT_BITS 0x0D
mahphalke 1:48914f9593f1 294 #define IN1P_INPUT_BITS 0x0E
mahphalke 1:48914f9593f1 295 #define IN0P_INPUT_BITS 0x0F
mahphalke 1:48914f9593f1 296 #define TEMP_SENSOR_POS_INP_BITS 0x11
mahphalke 1:48914f9593f1 297 #define TEMP_SENSOR_NEG_INP_BITS 0x12
mahphalke 1:48914f9593f1 298 #define AVDD1_AVSS_P_BITS 0x13
mahphalke 1:48914f9593f1 299 #define AVDD1_AVSS_N_BITS 0x14
mahphalke 1:48914f9593f1 300 #define REFP_INPUT_BITS 0x15
mahphalke 1:48914f9593f1 301 #define REFN_INPUT_BITS 0x16
mahphalke 1:48914f9593f1 302
mahphalke 1:48914f9593f1 303 // Offset to form VIN+ and VIN- pairs
mahphalke 1:48914f9593f1 304 #define VIN_PAIR_OFFSET 5
mahphalke 1:48914f9593f1 305
mahphalke 1:48914f9593f1 306
mahphalke 3:6c7324997606 307 // Channels define for the AD717x/AD414x devices
mahphalke 3:6c7324997606 308 #define ADC_CHN(x) (x)
mahphalke 3:6c7324997606 309
mahphalke 3:6c7324997606 310 // Offset to form Channel pairs
mahphalke 3:6c7324997606 311 #define CHN_PAIR_OFFSET 4
mahphalke 3:6c7324997606 312 #define CHN_PAIR_MASK 0x0F
mahphalke 3:6c7324997606 313
mahphalke 3:6c7324997606 314
mahphalke 1:48914f9593f1 315 // Device register read/write identifiers
mahphalke 1:48914f9593f1 316 #define DEVICE_REG_READ_ID (uint32_t)1
mahphalke 1:48914f9593f1 317 #define DEVICE_REG_WRITE_ID (uint32_t)2
mahphalke 1:48914f9593f1 318
mahphalke 1:48914f9593f1 319 // Enable/Disable selection identifiers
mahphalke 1:48914f9593f1 320 #define SELECT_DISBLE (uint32_t)0
mahphalke 1:48914f9593f1 321 #define SELECT_ENABLE (uint32_t)1
mahphalke 1:48914f9593f1 322
mahphalke 3:6c7324997606 323 // Input Type selection identifiers
mahphalke 3:6c7324997606 324 #define SINGLE_ENDED_INPUT (uint32_t)0
mahphalke 3:6c7324997606 325 #define DIFF_ENDED_INPUT (uint32_t)1
mahphalke 3:6c7324997606 326
mahphalke 1:48914f9593f1 327 // Analog input select identifiers
mahphalke 1:48914f9593f1 328 #define ANALOG_INP_PAIR_SELECT (uint32_t)0
mahphalke 1:48914f9593f1 329 #define POS_ANALOG_INP_SELECT (uint32_t)1
mahphalke 1:48914f9593f1 330 #define NEG_ANALOG_INP_SELECT (uint32_t)2
mahphalke 1:48914f9593f1 331
mahphalke 1:48914f9593f1 332
mahphalke 1:48914f9593f1 333 // Digital filter type (ORDER0) bits
mahphalke 1:48914f9593f1 334 #define SINC5_SINC1_FILTER (uint32_t)0
mahphalke 1:48914f9593f1 335 #define SINC3_FILTER (uint32_t)1
mahphalke 1:48914f9593f1 336
mahphalke 1:48914f9593f1 337 // SINC5+SINC1 post filter type bits
mahphalke 1:48914f9593f1 338 #define POST_FILTER_NA (uint32_t)0
mahphalke 1:48914f9593f1 339 #define POST_FLTR_27_SPS (uint32_t)2
mahphalke 1:48914f9593f1 340 #define POST_FLTR_25_SPS (uint32_t)3
mahphalke 1:48914f9593f1 341 #define POST_FLTR_20_SPS (uint32_t)5
mahphalke 1:48914f9593f1 342 #define POST_FLTR_16_67_SPS (uint32_t)6
mahphalke 1:48914f9593f1 343
mahphalke 1:48914f9593f1 344 // Reference source type bits
mahphalke 1:48914f9593f1 345 #define EXTERNAL (uint32_t)0
mahphalke 1:48914f9593f1 346 #define INTERNAL (uint32_t)2
mahphalke 1:48914f9593f1 347 #define AVDD_AVSS (uint32_t)3
mahphalke 1:48914f9593f1 348
mahphalke 1:48914f9593f1 349 // Polarity selection bits
mahphalke 1:48914f9593f1 350 #define UNIPOLAR (uint32_t)0
mahphalke 1:48914f9593f1 351 #define BIPOLAR (uint32_t)1
mahphalke 1:48914f9593f1 352
mahphalke 1:48914f9593f1 353 /******************************************************************************/
mahphalke 1:48914f9593f1 354 /********************** Variables and User Defined Data Types *****************/
mahphalke 1:48914f9593f1 355 /******************************************************************************/
mahphalke 1:48914f9593f1 356
mahphalke 1:48914f9593f1 357 // Enable/Disable status names
mahphalke 1:48914f9593f1 358 const char *enable_disable_status[] = {
mahphalke 1:48914f9593f1 359 "Disable",
mahphalke 1:48914f9593f1 360 "Enable"
mahphalke 1:48914f9593f1 361 };
mahphalke 1:48914f9593f1 362
mahphalke 1:48914f9593f1 363 // Polarity names
mahphalke 1:48914f9593f1 364 const char *polarity_status[] = {
mahphalke 1:48914f9593f1 365 "Unipolar",
mahphalke 1:48914f9593f1 366 "Bipolar"
mahphalke 1:48914f9593f1 367 };
mahphalke 1:48914f9593f1 368
mahphalke 1:48914f9593f1 369 // Filter names
mahphalke 1:48914f9593f1 370 const char *filter_name[] = {
mahphalke 1:48914f9593f1 371 "Sinc5+1",
mahphalke 1:48914f9593f1 372 "Sinc3",
mahphalke 1:48914f9593f1 373 };
mahphalke 1:48914f9593f1 374
mahphalke 1:48914f9593f1 375 // Post filter names
mahphalke 1:48914f9593f1 376 const char *postfilter_name[] = {
mahphalke 1:48914f9593f1 377 "NA",
mahphalke 1:48914f9593f1 378 "NA",
mahphalke 1:48914f9593f1 379 "27_SPS",
mahphalke 1:48914f9593f1 380 "25_SPS",
mahphalke 1:48914f9593f1 381 "NA",
mahphalke 1:48914f9593f1 382 "20_SPS",
mahphalke 1:48914f9593f1 383 "16_SPS",
mahphalke 1:48914f9593f1 384 };
mahphalke 1:48914f9593f1 385
mahphalke 1:48914f9593f1 386 // Reference source names
mahphalke 1:48914f9593f1 387 const char *reference_name[] = {
mahphalke 1:48914f9593f1 388 "External",
mahphalke 1:48914f9593f1 389 "External",
mahphalke 1:48914f9593f1 390 "Internal",
mahphalke 1:48914f9593f1 391 "AVDD-AVSS"
mahphalke 1:48914f9593f1 392 };
mahphalke 1:48914f9593f1 393
mahphalke 1:48914f9593f1 394
mahphalke 1:48914f9593f1 395 // Analog Input pin map
mahphalke 1:48914f9593f1 396 const char *input_pin_map[] = {
mahphalke 1:48914f9593f1 397 #if defined(DEV_AD4111) || defined(DEV_AD4112)
mahphalke 1:48914f9593f1 398 "VIN0", "VIN1", "VIN2", "VIN3", "VIN4", "VIN5",
mahphalke 1:48914f9593f1 399 "VIN6", "VIN7", "IN0-", "IN1-", "IN2-", "IN3-",
mahphalke 1:48914f9593f1 400 "IN3+", "IN2+", "IN1+", "IN0+", "VINCOM",
mahphalke 1:48914f9593f1 401 "TEMP+", "TEMP-", "RES", "RES", "REF+", "REF-"
Mahesh Phalke 4:4592cc69bfa6 402 #elif defined(DEV_AD4114) || defined(DEV_AD4115)
Mahesh Phalke 4:4592cc69bfa6 403 "VIN0", "VIN1", "VIN2", "VIN3", "VIN4", "VIN5",
Mahesh Phalke 4:4592cc69bfa6 404 "VIN6", "VIN7", "VIN8", "VIN9", "VIN10", "VIN11",
Mahesh Phalke 4:4592cc69bfa6 405 "VIN12", "VIN13", "VIN14", "VIN15", "VINCOM",
Mahesh Phalke 4:4592cc69bfa6 406 "TEMP+", "TEMP-", "RES", "RES", "REF+", "REF-"
mahphalke 1:48914f9593f1 407 #elif defined(DEV_AD7173_8) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 408 "AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5",
mahphalke 1:48914f9593f1 409 "AIN6", "AIN7", "AIN8", "AIN9", "AIN10", "AIN11",
mahphalke 1:48914f9593f1 410 "AIN12", "AIN13", "AIN14", "AIN15", "AIN16",
mahphalke 1:48914f9593f1 411 "TEMP+", "TEMP-",
mahphalke 1:48914f9593f1 412 #if defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 413 "RES", "RES",
mahphalke 1:48914f9593f1 414 #else
mahphalke 1:48914f9593f1 415 "((AVDD1 ? AVSS)/5)+", "((AVDD1 ? AVSS)/5)-",
mahphalke 1:48914f9593f1 416 #endif
mahphalke 1:48914f9593f1 417 "REF+", "REF-"
mahphalke 1:48914f9593f1 418 #elif defined(DEV_AD7172_2) || defined(DEV_AD7177_2) || defined(DEV_AD7175_2)
mahphalke 1:48914f9593f1 419 "AIN0", "AIN1", "AIN2", "AIN3", "AIN4",
mahphalke 1:48914f9593f1 420 "RES", "RES", "RES", "RES", "RES", "RES",
mahphalke 1:48914f9593f1 421 "RES", "RES", "RES", "RES", "RES", "RES",
mahphalke 1:48914f9593f1 422 "TEMP+", "TEMP-", "((AVDD1 ? AVSS)/5)+", "((AVDD1 ? AVSS)/5)-",
mahphalke 1:48914f9593f1 423 "REF+", "REF-"
mahphalke 1:48914f9593f1 424 #elif defined(DEV_AD7172_4)
mahphalke 1:48914f9593f1 425 "AIN0", "AIN1", "AIN2", "AIN3", "AIN4",
mahphalke 1:48914f9593f1 426 "AIN5", "AIN6", "AIN7", "AIN8",
mahphalke 1:48914f9593f1 427 "RES", "RES", "RES", "RES", "RES", "RES",
mahphalke 1:48914f9593f1 428 "TEMP+", "TEMP-", "((AVDD1 ? AVSS)/5)+", "((AVDD1 ? AVSS)/5)-",
mahphalke 1:48914f9593f1 429 "REF+", "REF-"
mahphalke 1:48914f9593f1 430 #elif defined(DEV_AD7176_2)
mahphalke 1:48914f9593f1 431 "AIN0", "AIN1", "AIN2", "AIN3", "AIN4",
mahphalke 1:48914f9593f1 432 "RES", "RES", "RES", "RES", "RES", "RES",
mahphalke 1:48914f9593f1 433 "RES", "RES", "RES", "RES", "RES", "RES",
mahphalke 1:48914f9593f1 434 "RES", "RES", "RES", "RES", "REF+", "REF-"
mahphalke 1:48914f9593f1 435 #endif
mahphalke 1:48914f9593f1 436 };
mahphalke 1:48914f9593f1 437
mahphalke 1:48914f9593f1 438
mahphalke 1:48914f9593f1 439 // SIN5+SINC1 Filter ODR map
mahphalke 1:48914f9593f1 440 const float sinc5_sinc1_odr_map[] = {
Mahesh Phalke 4:4592cc69bfa6 441 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || \
Mahesh Phalke 4:4592cc69bfa6 442 defined(DEV_AD4115) || defined(DEV_AD7172_2) || \
mahphalke 1:48914f9593f1 443 defined(DEV_AD7172_4) || defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 444 ODR_31250, ODR_31250, ODR_31250, ODR_31250, ODR_31250, ODR_31250,
mahphalke 1:48914f9593f1 445 ODR_15625, ODR_10417, ODR_5208, ODR_2597, ODR_1007, ODR_503_8,
mahphalke 1:48914f9593f1 446 ODR_381, ODR_200_3, ODR_100_2, ODR_59_52, ODR_49_68, ODR_20_01,
mahphalke 1:48914f9593f1 447 ODR_16_63, ODR_10, ODR_5, ODR_2_5, ODR_1_25,
mahphalke 1:48914f9593f1 448 #elif defined(DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8) ||\
mahphalke 1:48914f9593f1 449 defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 450 #if (DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 451 ODR_250000, ODR_125000, ODR_62500, ODR_50000, ODR_31250, ODR_25000, ODR_15625,
mahphalke 1:48914f9593f1 452 #elif defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 453 ODR_0, ODR_0, ODR_0, ODR_0, ODR_0, ODR_0, ODR_0,
mahphalke 1:48914f9593f1 454 #endif
mahphalke 1:48914f9593f1 455 ODR_10000, ODR_5000, ODR_2500, ODR_1000, ODR_500, ODR_397_5, ODR_200,
mahphalke 1:48914f9593f1 456 ODR_100, ODR_59_94, ODR_49_96, ODR_20, ODR_16_67, ODR_10, ODR_5,
mahphalke 1:48914f9593f1 457 ODR_0, ODR_0,
mahphalke 1:48914f9593f1 458 #endif
mahphalke 1:48914f9593f1 459 };
mahphalke 1:48914f9593f1 460
mahphalke 1:48914f9593f1 461 const float sinc3_odr_map[] = {
Mahesh Phalke 4:4592cc69bfa6 462 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || \
Mahesh Phalke 4:4592cc69bfa6 463 defined(DEV_AD4115) || defined(DEV_AD7172_2) || \
mahphalke 1:48914f9593f1 464 defined(DEV_AD7172_4) || defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 465 ODR_31250, ODR_31250, ODR_31250,
mahphalke 1:48914f9593f1 466 ODR_31250, ODR_31250, ODR_31250,
mahphalke 1:48914f9593f1 467 ODR_15625, ODR_10417, ODR_5208,
Mahesh Phalke 4:4592cc69bfa6 468 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || defined(DEV_AD4115)
mahphalke 1:48914f9593f1 469 ODR_3906, ODR_1157, ODR_539,
mahphalke 1:48914f9593f1 470 ODR_401, ODR_206, ODR_102,
mahphalke 1:48914f9593f1 471 #else
mahphalke 1:48914f9593f1 472 ODR_2604, ODR_1008, ODR_504,
mahphalke 1:48914f9593f1 473 ODR_400_6, ODR_200_3, ODR_100_2,
mahphalke 1:48914f9593f1 474 #endif
mahphalke 1:48914f9593f1 475 ODR_59_98, ODR_50, ODR_20_01,
mahphalke 1:48914f9593f1 476 ODR_16_67, ODR_10, ODR_5,
mahphalke 1:48914f9593f1 477 ODR_2_5, ODR_1_25,
mahphalke 1:48914f9593f1 478 #elif defined(DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8) ||\
mahphalke 1:48914f9593f1 479 defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 480 #if (DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 481 ODR_250000, ODR_125000, ODR_62500,
mahphalke 1:48914f9593f1 482 ODR_50000, ODR_31250, ODR_25000,
mahphalke 1:48914f9593f1 483 ODR_15625,
mahphalke 1:48914f9593f1 484 #elif defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 485 ODR_0, ODR_0, ODR_0, ODR_0,
mahphalke 1:48914f9593f1 486 ODR_0, ODR_0, ODR_0,
mahphalke 1:48914f9593f1 487 #endif
mahphalke 1:48914f9593f1 488 ODR_10000, ODR_5000, ODR_2500, ODR_1000, ODR_500, ODR_400, ODR_200,
mahphalke 1:48914f9593f1 489 ODR_100, ODR_60, ODR_50, ODR_20, ODR_16_67, ODR_10, ODR_5,
mahphalke 1:48914f9593f1 490 ODR_0, ODR_0,
mahphalke 1:48914f9593f1 491 #endif
mahphalke 1:48914f9593f1 492 };
mahphalke 1:48914f9593f1 493
mahphalke 1:48914f9593f1 494
mahphalke 1:48914f9593f1 495 /*
mahphalke 1:48914f9593f1 496 * Definition of the channel enable/disable menu items and menu itself
mahphalke 1:48914f9593f1 497 */
mahphalke 1:48914f9593f1 498 console_menu_item chn_enable_disable_items[] = {
mahphalke 1:48914f9593f1 499 { "Enable Channels", 'E', menu_channels_enable_disable, SELECT_ENABLE },
mahphalke 1:48914f9593f1 500 { "Disable Channels", 'D', menu_channels_enable_disable, SELECT_DISBLE },
mahphalke 1:48914f9593f1 501 };
mahphalke 1:48914f9593f1 502
mahphalke 1:48914f9593f1 503 console_menu chn_enable_disable_menu = {
mahphalke 1:48914f9593f1 504 .title = "Channel Enable/Disable Menu",
mahphalke 1:48914f9593f1 505 .items = chn_enable_disable_items,
mahphalke 1:48914f9593f1 506 .itemCount = ARRAY_SIZE(chn_enable_disable_items),
mahphalke 1:48914f9593f1 507 .headerItem = NULL,
mahphalke 1:48914f9593f1 508 .footerItem = NULL,
mahphalke 1:48914f9593f1 509 .enableEscapeKey = true
mahphalke 1:48914f9593f1 510 };
mahphalke 1:48914f9593f1 511
mahphalke 1:48914f9593f1 512
mahphalke 1:48914f9593f1 513 /*
mahphalke 1:48914f9593f1 514 * Definition of the analog input connection menu items and menu itself
mahphalke 1:48914f9593f1 515 */
mahphalke 1:48914f9593f1 516 console_menu_item analog_input_connect_items[] = {
Mahesh Phalke 4:4592cc69bfa6 517 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || defined(DEV_AD4115)
mahphalke 1:48914f9593f1 518 // Input pin name/pair Key Menu Function AINP/AINM Bits
mahphalke 1:48914f9593f1 519 //
mahphalke 1:48914f9593f1 520 { "VIN0, VIN1", 'A', menu_analog_input_connect, ((VIN0_INPUT_BITS << VIN_PAIR_OFFSET) | VIN1_INPUT_BITS) },
mahphalke 1:48914f9593f1 521 { "VIN0, VINCOM", 'B', menu_analog_input_connect, ((VIN0_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 522 { "VIN1, VIN0", 'C', menu_analog_input_connect, ((VIN1_INPUT_BITS << VIN_PAIR_OFFSET) | VIN0_INPUT_BITS) },
mahphalke 1:48914f9593f1 523 { "VIN1, VINCOM", 'D', menu_analog_input_connect, ((VIN1_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 524 { "VIN2, VIN3", 'E', menu_analog_input_connect, ((VIN2_INPUT_BITS << VIN_PAIR_OFFSET) | VIN3_INPUT_BITS) },
mahphalke 1:48914f9593f1 525 { "VIN2, VINCOM", 'F', menu_analog_input_connect, ((VIN2_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 526 { "VIN3, VIN2", 'G', menu_analog_input_connect, ((VIN3_INPUT_BITS << VIN_PAIR_OFFSET) | VIN2_INPUT_BITS) },
mahphalke 1:48914f9593f1 527 { "VIN3, VINCOM", 'H', menu_analog_input_connect, ((VIN3_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 528 { "VIN4, VIN5", 'I', menu_analog_input_connect, ((VIN4_INPUT_BITS << VIN_PAIR_OFFSET) | VIN5_INPUT_BITS) },
mahphalke 1:48914f9593f1 529 { "VIN4, VINCOM", 'J', menu_analog_input_connect, ((VIN4_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 530 { "VIN5, VIN4", 'K', menu_analog_input_connect, ((VIN5_INPUT_BITS << VIN_PAIR_OFFSET) | VIN4_INPUT_BITS) },
mahphalke 1:48914f9593f1 531 { "VIN5, VINCOM", 'L', menu_analog_input_connect, ((VIN5_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 532 { "VIN6, VIN7", 'M', menu_analog_input_connect, ((VIN6_INPUT_BITS << VIN_PAIR_OFFSET) | VIN7_INPUT_BITS) },
mahphalke 1:48914f9593f1 533 { "VIN6, VINCOM", 'N', menu_analog_input_connect, ((VIN6_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 1:48914f9593f1 534 { "VIN7, VIN6", 'O', menu_analog_input_connect, ((VIN7_INPUT_BITS << VIN_PAIR_OFFSET) | VIN6_INPUT_BITS) },
mahphalke 1:48914f9593f1 535 { "VIN7, VINCOM", 'P', menu_analog_input_connect, ((VIN7_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 536 #if defined(DEV_AD4111) || defined(DEV_AD4112)
mahphalke 1:48914f9593f1 537 { "IN3+, IN3-", 'Q', menu_analog_input_connect, ((IN3P_INPUT_BITS << VIN_PAIR_OFFSET) | IN3N_INPUT_BITS) },
mahphalke 1:48914f9593f1 538 { "IN2+, IN2-", 'R', menu_analog_input_connect, ((IN2P_INPUT_BITS << VIN_PAIR_OFFSET) | IN2N_INPUT_BITS) },
mahphalke 1:48914f9593f1 539 { "IN1+, IN1-", 'S', menu_analog_input_connect, ((IN1P_INPUT_BITS << VIN_PAIR_OFFSET) | IN1N_INPUT_BITS) },
mahphalke 1:48914f9593f1 540 { "IN0+, IN0-", 'T', menu_analog_input_connect, ((IN0P_INPUT_BITS << VIN_PAIR_OFFSET) | IN0N_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 541 #else // mapping for AD4114/15
Mahesh Phalke 4:4592cc69bfa6 542 { "VIN8, VIN9", 'Q', menu_analog_input_connect, ((VIN8_INPUT_BITS << VIN_PAIR_OFFSET) | VIN9_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 543 { "VIN8, VINCOM", 'R', menu_analog_input_connect, ((VIN8_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 544 { "VIN9, VIN8", 'S', menu_analog_input_connect, ((VIN9_INPUT_BITS << VIN_PAIR_OFFSET) | VIN8_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 545 { "VIN9, VINCOM", 'T', menu_analog_input_connect, ((VIN9_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 546 { "VIN10, VIN11", 'U', menu_analog_input_connect, ((VIN10_INPUT_BITS << VIN_PAIR_OFFSET) | VIN11_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 547 { "VIN10, VINCOM", 'V', menu_analog_input_connect, ((VIN10_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 548 { "VIN11, VIN10", 'W', menu_analog_input_connect, ((VIN11_INPUT_BITS << VIN_PAIR_OFFSET) | VIN10_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 549 { "VIN11, VINCOM", 'X', menu_analog_input_connect, ((VIN11_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 550 { "VIN12, VIN13", 'Y', menu_analog_input_connect, ((VIN12_INPUT_BITS << VIN_PAIR_OFFSET) | VIN13_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 551 { "VIN12, VINCOM", 'Z', menu_analog_input_connect, ((VIN12_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 552 { "VIN13, VIN12", '1', menu_analog_input_connect, ((VIN13_INPUT_BITS << VIN_PAIR_OFFSET) | VIN12_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 553 { "VIN13, VINCOM", '2', menu_analog_input_connect, ((VIN13_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 554 { "VIN14, VIN15", '3', menu_analog_input_connect, ((VIN14_INPUT_BITS << VIN_PAIR_OFFSET) | VIN15_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 555 { "VIN14, VINCOM", '4', menu_analog_input_connect, ((VIN14_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 556 { "VIN15, VIN14", '5', menu_analog_input_connect, ((VIN15_INPUT_BITS << VIN_PAIR_OFFSET) | VIN14_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 557 { "VIN15, VINCOM", '6', menu_analog_input_connect, ((VIN15_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
Mahesh Phalke 4:4592cc69bfa6 558 #endif
Mahesh Phalke 4:4592cc69bfa6 559 { "Temperature Sensor", '7', menu_analog_input_connect, ((TEMP_SENSOR_POS_INP_BITS << VIN_PAIR_OFFSET) | TEMP_SENSOR_NEG_INP_BITS) },
Mahesh Phalke 4:4592cc69bfa6 560 { "Reference", '8', menu_analog_input_connect, ((REFP_INPUT_BITS << VIN_PAIR_OFFSET) | REFN_INPUT_BITS) },
mahphalke 1:48914f9593f1 561 #else
mahphalke 1:48914f9593f1 562 { "AIN0", 'A', menu_analog_input_connect, VIN0_INPUT_BITS },
mahphalke 1:48914f9593f1 563 { "AIN1", 'B', menu_analog_input_connect, VIN1_INPUT_BITS },
mahphalke 1:48914f9593f1 564 { "AIN2", 'C', menu_analog_input_connect, VIN2_INPUT_BITS },
mahphalke 1:48914f9593f1 565 { "AIN3", 'D', menu_analog_input_connect, VIN3_INPUT_BITS },
mahphalke 1:48914f9593f1 566 { "AIN4", 'E', menu_analog_input_connect, VIN4_INPUT_BITS },
mahphalke 1:48914f9593f1 567 #if defined(DEV_AD7172_2) || defined(DEV_AD7177_2) || defined(DEV_AD7175_2)
mahphalke 1:48914f9593f1 568 { "Temperature Sensor+", 'F', menu_analog_input_connect, TEMP_SENSOR_POS_INP_BITS },
mahphalke 1:48914f9593f1 569 { "Temperature Sensor-", 'G', menu_analog_input_connect, TEMP_SENSOR_NEG_INP_BITS },
mahphalke 1:48914f9593f1 570 { "((AVDD1 - AVSS)/5)+ ", 'H', menu_analog_input_connect, AVDD1_AVSS_P_BITS },
mahphalke 1:48914f9593f1 571 { "((AVDD1 - AVSS)/5)-", 'I', menu_analog_input_connect, AVDD1_AVSS_N_BITS },
mahphalke 1:48914f9593f1 572 { "REF+", 'J', menu_analog_input_connect, REFP_INPUT_BITS },
mahphalke 1:48914f9593f1 573 { "REF-", 'K', menu_analog_input_connect, REFN_INPUT_BITS },
mahphalke 1:48914f9593f1 574 #elif defined(DEV_AD7172_4)
mahphalke 1:48914f9593f1 575 { "AIN5", 'F', menu_analog_input_connect, VIN5_INPUT_BITS },
mahphalke 1:48914f9593f1 576 { "AIN6", 'G', menu_analog_input_connect, VIN6_INPUT_BITS },
mahphalke 1:48914f9593f1 577 { "AIN7", 'H', menu_analog_input_connect, VIN7_INPUT_BITS },
mahphalke 1:48914f9593f1 578 { "AIN8", 'I', menu_analog_input_connect, VIN8_INPUT_BITS },
mahphalke 1:48914f9593f1 579 { "((AVDD1 - AVSS)/5)+ ", 'J', menu_analog_input_connect, AVDD1_AVSS_P_BITS },
mahphalke 1:48914f9593f1 580 { "((AVDD1 - AVSS)/5)-", 'K', menu_analog_input_connect, AVDD1_AVSS_N_BITS },
mahphalke 1:48914f9593f1 581 { "REF+", 'L', menu_analog_input_connect, REFP_INPUT_BITS },
mahphalke 1:48914f9593f1 582 { "REF-", 'M', menu_analog_input_connect, REFN_INPUT_BITS },
mahphalke 1:48914f9593f1 583 #elif defined(DEV_AD7176_2)
mahphalke 1:48914f9593f1 584 { "REF+", 'F', menu_analog_input_connect, REFP_INPUT_BITS },
mahphalke 1:48914f9593f1 585 { "REF-", 'G', menu_analog_input_connect, REFN_INPUT_BITS },
mahphalke 1:48914f9593f1 586 #elif defined(DEV_AD7173_8) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 587 { "AIN5", 'F', menu_analog_input_connect, VIN5_INPUT_BITS },
mahphalke 1:48914f9593f1 588 { "AIN6", 'G', menu_analog_input_connect, VIN6_INPUT_BITS },
mahphalke 1:48914f9593f1 589 { "AIN7", 'H', menu_analog_input_connect, VIN7_INPUT_BITS },
mahphalke 1:48914f9593f1 590 { "AIN8", 'I', menu_analog_input_connect, VIN8_INPUT_BITS },
mahphalke 1:48914f9593f1 591 { "AIN9", 'J', menu_analog_input_connect, VIN9_INPUT_BITS },
mahphalke 1:48914f9593f1 592 { "AIN10", 'K', menu_analog_input_connect, VIN10_INPUT_BITS },
mahphalke 1:48914f9593f1 593 { "AIN11", 'L', menu_analog_input_connect, VIN11_INPUT_BITS },
mahphalke 1:48914f9593f1 594 { "AIN12", 'M', menu_analog_input_connect, VIN12_INPUT_BITS },
mahphalke 1:48914f9593f1 595 { "AIN13", 'N', menu_analog_input_connect, VIN13_INPUT_BITS },
mahphalke 1:48914f9593f1 596 { "AIN14", 'O', menu_analog_input_connect, VIN14_INPUT_BITS },
mahphalke 1:48914f9593f1 597 { "AIN15", 'P', menu_analog_input_connect, VIN15_INPUT_BITS },
mahphalke 1:48914f9593f1 598 { "AIN16", 'Q', menu_analog_input_connect, VIN16_INPUT_BITS },
mahphalke 1:48914f9593f1 599 { "Temperature Sensor+", 'R', menu_analog_input_connect, TEMP_SENSOR_POS_INP_BITS },
mahphalke 1:48914f9593f1 600 { "Temperature Sensor-", 'S', menu_analog_input_connect, TEMP_SENSOR_NEG_INP_BITS },
mahphalke 1:48914f9593f1 601 #if (DEV_AD7175_8)
mahphalke 1:48914f9593f1 602 { "((AVDD1 - AVSS)/5)+ ", 'T', menu_analog_input_connect, AVDD1_AVSS_P_BITS },
mahphalke 1:48914f9593f1 603 { "((AVDD1 - AVSS)/5)-", 'U', menu_analog_input_connect, AVDD1_AVSS_N_BITS },
mahphalke 1:48914f9593f1 604 #endif
mahphalke 1:48914f9593f1 605 { "REF+", 'V', menu_analog_input_connect, REFP_INPUT_BITS },
mahphalke 1:48914f9593f1 606 { "REF-", 'W', menu_analog_input_connect, REFN_INPUT_BITS },
mahphalke 1:48914f9593f1 607 #endif
mahphalke 1:48914f9593f1 608 #endif
mahphalke 1:48914f9593f1 609 };
mahphalke 1:48914f9593f1 610
mahphalke 1:48914f9593f1 611 console_menu analog_input_connect_menu = {
mahphalke 1:48914f9593f1 612 .title = "Select Analog Input",
mahphalke 1:48914f9593f1 613 .items = analog_input_connect_items,
mahphalke 1:48914f9593f1 614 .itemCount = ARRAY_SIZE(analog_input_connect_items),
mahphalke 1:48914f9593f1 615 .headerItem = NULL,
mahphalke 1:48914f9593f1 616 .footerItem = NULL,
mahphalke 1:48914f9593f1 617 .enableEscapeKey = true
mahphalke 1:48914f9593f1 618 };
mahphalke 1:48914f9593f1 619
mahphalke 1:48914f9593f1 620
mahphalke 1:48914f9593f1 621 /*
mahphalke 3:6c7324997606 622 * Definition of the open wire detect inputs type menu items and menu itself
mahphalke 3:6c7324997606 623 */
mahphalke 3:6c7324997606 624 console_menu_item open_wire_detect_input_type_items[] = {
mahphalke 3:6c7324997606 625 { "Single Ended Input", 'S', menu_input_type_selection, SINGLE_ENDED_INPUT },
mahphalke 3:6c7324997606 626 { "Differential Ended Input", 'D', menu_input_type_selection, DIFF_ENDED_INPUT },
mahphalke 3:6c7324997606 627 };
mahphalke 3:6c7324997606 628
mahphalke 3:6c7324997606 629 console_menu open_wire_detect_input_type_menu = {
mahphalke 3:6c7324997606 630 .title = "Select Analog Input Type",
mahphalke 3:6c7324997606 631 .items = open_wire_detect_input_type_items,
mahphalke 3:6c7324997606 632 .itemCount = ARRAY_SIZE(open_wire_detect_input_type_items),
mahphalke 3:6c7324997606 633 .headerItem = NULL,
mahphalke 3:6c7324997606 634 .footerItem = NULL,
mahphalke 3:6c7324997606 635 .enableEscapeKey = true
mahphalke 3:6c7324997606 636 };
mahphalke 3:6c7324997606 637
mahphalke 3:6c7324997606 638
mahphalke 3:6c7324997606 639 /*
mahphalke 3:6c7324997606 640 * Definition of the open wire detect single ended input channel pair menu items and menu itself
mahphalke 3:6c7324997606 641 */
mahphalke 3:6c7324997606 642 console_menu_item open_wire_detect_se_channel_items[] = {
mahphalke 3:6c7324997606 643 { "CHN0, CHN15", 'A', menu_select_chn_pair, ((ADC_CHN(0) << CHN_PAIR_OFFSET) | ADC_CHN(15)) },
mahphalke 3:6c7324997606 644 { "CHN1, CHN2", 'B', menu_select_chn_pair, ((ADC_CHN(1) << CHN_PAIR_OFFSET) | ADC_CHN(2)) },
mahphalke 3:6c7324997606 645 { "CHN3, CHN4", 'C', menu_select_chn_pair, ((ADC_CHN(3) << CHN_PAIR_OFFSET) | ADC_CHN(4)) },
mahphalke 3:6c7324997606 646 { "CHN5, CHN6", 'D', menu_select_chn_pair, ((ADC_CHN(5) << CHN_PAIR_OFFSET) | ADC_CHN(6)) },
mahphalke 3:6c7324997606 647 { "CHN7, CHN8", 'E', menu_select_chn_pair, ((ADC_CHN(7) << CHN_PAIR_OFFSET) | ADC_CHN(8)) },
mahphalke 3:6c7324997606 648 { "CHN9, CHN10", 'F', menu_select_chn_pair, ((ADC_CHN(9) << CHN_PAIR_OFFSET) | ADC_CHN(10)) },
mahphalke 3:6c7324997606 649 { "CHN11, CHN12", 'G', menu_select_chn_pair, ((ADC_CHN(11) << CHN_PAIR_OFFSET) | ADC_CHN(12)) },
mahphalke 3:6c7324997606 650 { "CHN13, CHN14", 'H', menu_select_chn_pair, ((ADC_CHN(13) << CHN_PAIR_OFFSET) | ADC_CHN(14)) },
mahphalke 3:6c7324997606 651 };
mahphalke 3:6c7324997606 652
mahphalke 3:6c7324997606 653 console_menu open_wire_detect_se_channel_menu = {
mahphalke 3:6c7324997606 654 .title = "Select Channel Pair",
mahphalke 3:6c7324997606 655 .items = open_wire_detect_se_channel_items,
mahphalke 3:6c7324997606 656 .itemCount = ARRAY_SIZE(open_wire_detect_se_channel_items),
mahphalke 3:6c7324997606 657 .headerItem = NULL,
mahphalke 3:6c7324997606 658 .footerItem = NULL,
mahphalke 3:6c7324997606 659 .enableEscapeKey = true
mahphalke 3:6c7324997606 660 };
mahphalke 3:6c7324997606 661
mahphalke 3:6c7324997606 662
mahphalke 3:6c7324997606 663 /*
mahphalke 3:6c7324997606 664 * Definition of the open wire detect differential ended input channel pair menu items and menu itself
mahphalke 3:6c7324997606 665 */
mahphalke 3:6c7324997606 666 console_menu_item open_wire_detect_de_channel_items[] = {
mahphalke 3:6c7324997606 667 { "CHN1, CHN2", 'A', menu_select_chn_pair, ((ADC_CHN(1) << CHN_PAIR_OFFSET) | ADC_CHN(2)) },
mahphalke 3:6c7324997606 668 { "CHN5, CHN6", 'B', menu_select_chn_pair, ((ADC_CHN(5) << CHN_PAIR_OFFSET) | ADC_CHN(6)) },
mahphalke 3:6c7324997606 669 { "CHN9, CHN10", 'C', menu_select_chn_pair, ((ADC_CHN(9) << CHN_PAIR_OFFSET) | ADC_CHN(10)) },
mahphalke 3:6c7324997606 670 { "CHN13, CHN14", 'D', menu_select_chn_pair, ((ADC_CHN(13) << CHN_PAIR_OFFSET) | ADC_CHN(14)) },
mahphalke 3:6c7324997606 671 };
mahphalke 3:6c7324997606 672
mahphalke 3:6c7324997606 673 console_menu open_wire_detect_de_channel_menu = {
mahphalke 3:6c7324997606 674 .title = "Select Channel Pair",
mahphalke 3:6c7324997606 675 .items = open_wire_detect_de_channel_items,
mahphalke 3:6c7324997606 676 .itemCount = ARRAY_SIZE(open_wire_detect_de_channel_items),
mahphalke 3:6c7324997606 677 .headerItem = NULL,
mahphalke 3:6c7324997606 678 .footerItem = NULL,
mahphalke 3:6c7324997606 679 .enableEscapeKey = true
mahphalke 3:6c7324997606 680 };
mahphalke 3:6c7324997606 681
mahphalke 3:6c7324997606 682
mahphalke 3:6c7324997606 683 /*
mahphalke 3:6c7324997606 684 * Definition of the open wire detect single ended analog inputs menu items and menu itself
mahphalke 3:6c7324997606 685 */
mahphalke 3:6c7324997606 686 console_menu_item open_wire_detect_se_analog_input_items[] = {
mahphalke 3:6c7324997606 687 { "VIN0, VINCOM", 'A', menu_select_input_pair, ((VIN0_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 688 { "VIN1, VINCOM", 'B', menu_select_input_pair, ((VIN1_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 689 { "VIN2, VINCOM", 'C', menu_select_input_pair, ((VIN2_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 690 { "VIN3, VINCOM", 'D', menu_select_input_pair, ((VIN3_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 691 { "VIN4, VINCOM", 'E', menu_select_input_pair, ((VIN4_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 692 { "VIN5, VINCOM", 'F', menu_select_input_pair, ((VIN5_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 693 { "VIN6, VINCOM", 'G', menu_select_input_pair, ((VIN6_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 694 { "VIN7, VINCOM", 'H', menu_select_input_pair, ((VIN7_INPUT_BITS << VIN_PAIR_OFFSET) | VINCOM_INPUT_BITS) },
mahphalke 3:6c7324997606 695 };
mahphalke 3:6c7324997606 696
mahphalke 3:6c7324997606 697 console_menu open_wire_detect_se_analog_input_menu = {
mahphalke 3:6c7324997606 698 .title = "Select Analog Inputs",
mahphalke 3:6c7324997606 699 .items = open_wire_detect_se_analog_input_items,
mahphalke 3:6c7324997606 700 .itemCount = ARRAY_SIZE(open_wire_detect_se_analog_input_items),
mahphalke 3:6c7324997606 701 .headerItem = NULL,
mahphalke 3:6c7324997606 702 .footerItem = NULL,
mahphalke 3:6c7324997606 703 .enableEscapeKey = true
mahphalke 3:6c7324997606 704 };
mahphalke 3:6c7324997606 705
mahphalke 3:6c7324997606 706
mahphalke 3:6c7324997606 707 /*
mahphalke 3:6c7324997606 708 * Definition of the open wire detect differential ended analog inputs menu items and menu itself
mahphalke 3:6c7324997606 709 */
mahphalke 3:6c7324997606 710 console_menu_item open_wire_detect_de_analog_input_items[] = {
mahphalke 3:6c7324997606 711 { "VIN0, VIN1", 'A', menu_select_input_pair, ((VIN0_INPUT_BITS << VIN_PAIR_OFFSET) | VIN1_INPUT_BITS) },
mahphalke 3:6c7324997606 712 { "VIN2, VIN3", 'B', menu_select_input_pair, ((VIN2_INPUT_BITS << VIN_PAIR_OFFSET) | VIN3_INPUT_BITS) },
mahphalke 3:6c7324997606 713 { "VIN4, VIN5", 'C', menu_select_input_pair, ((VIN4_INPUT_BITS << VIN_PAIR_OFFSET) | VIN5_INPUT_BITS) },
mahphalke 3:6c7324997606 714 { "VIN6, VIN7", 'D', menu_select_input_pair, ((VIN6_INPUT_BITS << VIN_PAIR_OFFSET) | VIN7_INPUT_BITS) },
mahphalke 3:6c7324997606 715 };
mahphalke 3:6c7324997606 716
mahphalke 3:6c7324997606 717 console_menu open_wire_detect_de_analog_input_menu = {
mahphalke 3:6c7324997606 718 .title = "Select Analog Inputs",
mahphalke 3:6c7324997606 719 .items = open_wire_detect_de_analog_input_items,
mahphalke 3:6c7324997606 720 .itemCount = ARRAY_SIZE(open_wire_detect_de_analog_input_items),
mahphalke 3:6c7324997606 721 .headerItem = NULL,
mahphalke 3:6c7324997606 722 .footerItem = NULL,
mahphalke 3:6c7324997606 723 .enableEscapeKey = true
mahphalke 3:6c7324997606 724 };
mahphalke 3:6c7324997606 725
mahphalke 3:6c7324997606 726
mahphalke 3:6c7324997606 727 /*
mahphalke 1:48914f9593f1 728 * Definition of the adc register read/write menu items and menu itself
mahphalke 1:48914f9593f1 729 */
mahphalke 1:48914f9593f1 730 console_menu_item reg_read_write_items[] = {
mahphalke 1:48914f9593f1 731 { "Read Device Register", 'R', menu_rw_ad717x_register, DEVICE_REG_READ_ID },
mahphalke 1:48914f9593f1 732 { "Write Device Register", 'W', menu_rw_ad717x_register, DEVICE_REG_WRITE_ID },
mahphalke 1:48914f9593f1 733 };
mahphalke 1:48914f9593f1 734
mahphalke 1:48914f9593f1 735 console_menu reg_read_write_menu = {
mahphalke 1:48914f9593f1 736 .title = "Register Read/Write Menu",
mahphalke 1:48914f9593f1 737 .items = reg_read_write_items,
mahphalke 1:48914f9593f1 738 .itemCount = ARRAY_SIZE(reg_read_write_items),
mahphalke 1:48914f9593f1 739 .headerItem = NULL,
mahphalke 1:48914f9593f1 740 .footerItem = NULL,
mahphalke 1:48914f9593f1 741 .enableEscapeKey = true
mahphalke 1:48914f9593f1 742 };
mahphalke 1:48914f9593f1 743
mahphalke 1:48914f9593f1 744
mahphalke 1:48914f9593f1 745 /*
mahphalke 1:48914f9593f1 746 * Definition of the sampling menu items and menu itself
mahphalke 1:48914f9593f1 747 */
mahphalke 1:48914f9593f1 748 console_menu_item acquisition_menu_items[] = {
mahphalke 1:48914f9593f1 749 { "Single Conversion Mode", 'S', menu_single_conversion },
mahphalke 1:48914f9593f1 750 { "Continuous Conversion Mode - Table View", 'T', menu_continuous_conversion_tabular },
mahphalke 1:48914f9593f1 751 { "Continuous Conversion Mode - Stream Data", 'C', menu_continuous_conversion_stream },
mahphalke 1:48914f9593f1 752 };
mahphalke 1:48914f9593f1 753
mahphalke 1:48914f9593f1 754 console_menu acquisition_menu = {
mahphalke 1:48914f9593f1 755 .title = "Data Acquisition Menu",
mahphalke 1:48914f9593f1 756 .items = acquisition_menu_items,
mahphalke 1:48914f9593f1 757 .itemCount = ARRAY_SIZE(acquisition_menu_items),
mahphalke 1:48914f9593f1 758 .headerItem = NULL,
mahphalke 1:48914f9593f1 759 .footerItem = NULL,
mahphalke 1:48914f9593f1 760 .enableEscapeKey = true
mahphalke 1:48914f9593f1 761 };
mahphalke 1:48914f9593f1 762
mahphalke 1:48914f9593f1 763
mahphalke 1:48914f9593f1 764 /*
mahphalke 1:48914f9593f1 765 * Definition of the filter select menu items and menu itself
mahphalke 1:48914f9593f1 766 */
mahphalke 1:48914f9593f1 767 console_menu_item filter_select_items[] = {
mahphalke 1:48914f9593f1 768 { "Sinc5+1", 'A', menu_filter_select, SINC5_SINC1_FILTER },
mahphalke 1:48914f9593f1 769 { "Sinc3", 'B', menu_filter_select, SINC3_FILTER },
mahphalke 1:48914f9593f1 770 };
mahphalke 1:48914f9593f1 771
mahphalke 1:48914f9593f1 772 console_menu filter_select_menu = {
mahphalke 1:48914f9593f1 773 .title = "Filter Selection Menu",
mahphalke 1:48914f9593f1 774 .items = filter_select_items,
mahphalke 1:48914f9593f1 775 .itemCount = ARRAY_SIZE(filter_select_items),
mahphalke 1:48914f9593f1 776 .headerItem = NULL,
mahphalke 1:48914f9593f1 777 .footerItem = NULL,
mahphalke 1:48914f9593f1 778 .enableEscapeKey = true
mahphalke 1:48914f9593f1 779 };
mahphalke 1:48914f9593f1 780
mahphalke 1:48914f9593f1 781
mahphalke 1:48914f9593f1 782 /*
mahphalke 1:48914f9593f1 783 * Definition of the postfilter enable/disable menu items and menu itself
mahphalke 1:48914f9593f1 784 */
mahphalke 1:48914f9593f1 785 console_menu_item postfilter_enable_disable_items[] = {
mahphalke 1:48914f9593f1 786 { "Enable", 'E', menu_postfiler_enable_disable, SELECT_ENABLE },
mahphalke 1:48914f9593f1 787 { "Disable", 'D', menu_postfiler_enable_disable, SELECT_DISBLE },
mahphalke 1:48914f9593f1 788 };
mahphalke 1:48914f9593f1 789
mahphalke 1:48914f9593f1 790 console_menu postfilter_enable_disable_menu = {
mahphalke 1:48914f9593f1 791 .title = "Post-filter Enable/Disable Menu",
mahphalke 1:48914f9593f1 792 .items = postfilter_enable_disable_items,
mahphalke 1:48914f9593f1 793 .itemCount = ARRAY_SIZE(postfilter_enable_disable_items),
mahphalke 1:48914f9593f1 794 .headerItem = NULL,
mahphalke 1:48914f9593f1 795 .footerItem = NULL,
mahphalke 1:48914f9593f1 796 .enableEscapeKey = true
mahphalke 1:48914f9593f1 797 };
mahphalke 1:48914f9593f1 798
mahphalke 1:48914f9593f1 799
mahphalke 1:48914f9593f1 800 /*
mahphalke 1:48914f9593f1 801 * Definition of the post-filter select menu items and menu itself
mahphalke 1:48914f9593f1 802 */
mahphalke 1:48914f9593f1 803 console_menu_item postfilter_select_items[] = {
mahphalke 1:48914f9593f1 804 { "27 SPS, 47 dB reject, 36.7 ms settling ",'A', menu_postfiler_select, POST_FLTR_27_SPS },
mahphalke 1:48914f9593f1 805 { "25 SPS, 62 dB reject, 40 ms settling", 'B', menu_postfiler_select, POST_FLTR_25_SPS },
mahphalke 1:48914f9593f1 806 { "20 SPS, 86 dB reject, 50 ms settling", 'C', menu_postfiler_select, POST_FLTR_20_SPS },
mahphalke 1:48914f9593f1 807 { "16.67 SPS, 92 dB reject, 60 ms settling",'D', menu_postfiler_select, POST_FLTR_16_67_SPS },
mahphalke 1:48914f9593f1 808 };
mahphalke 1:48914f9593f1 809
mahphalke 1:48914f9593f1 810 console_menu postfilter_select_menu = {
mahphalke 1:48914f9593f1 811 .title = "Post-filter Selection Menu",
mahphalke 1:48914f9593f1 812 .items = postfilter_select_items,
mahphalke 1:48914f9593f1 813 .itemCount = ARRAY_SIZE(postfilter_select_items),
mahphalke 1:48914f9593f1 814 .headerItem = NULL,
mahphalke 1:48914f9593f1 815 .footerItem = NULL,
mahphalke 1:48914f9593f1 816 .enableEscapeKey = true
mahphalke 1:48914f9593f1 817 };
mahphalke 1:48914f9593f1 818
mahphalke 1:48914f9593f1 819
mahphalke 1:48914f9593f1 820 /*
mahphalke 1:48914f9593f1 821 * Definition of the SINC5+SINC1 ODR select menu items and menu itself
mahphalke 1:48914f9593f1 822 */
mahphalke 1:48914f9593f1 823 console_menu_item sinc5_1_data_rate_select_items[] = {
Mahesh Phalke 4:4592cc69bfa6 824 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || \
Mahesh Phalke 4:4592cc69bfa6 825 defined(DEV_AD4115) || defined(DEV_AD7172_2) || \
mahphalke 1:48914f9593f1 826 defined(DEV_AD7172_4) || defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 827 { ODR_31250_STR, 'A', menu_odr_select, ODR_31250_BITS },
mahphalke 1:48914f9593f1 828 { ODR_15625_STR, 'B', menu_odr_select, ODR_15625_BITS },
mahphalke 1:48914f9593f1 829 { ODR_10417_STR, 'C', menu_odr_select, ODR_10417_BITS },
mahphalke 1:48914f9593f1 830 { ODR_5208_STR, 'D', menu_odr_select, ODR_5208_BITS },
mahphalke 1:48914f9593f1 831 { ODR_2597_STR, 'E', menu_odr_select, ODR_2597_BITS },
mahphalke 1:48914f9593f1 832 { ODR_1007_STR, 'F', menu_odr_select, ODR_1007_BITS },
mahphalke 1:48914f9593f1 833 { ODR_503_8_STR, 'G', menu_odr_select, ODR_503_8_BITS },
mahphalke 1:48914f9593f1 834 { ODR_381_STR, 'H', menu_odr_select, ODR_381_BITS },
mahphalke 1:48914f9593f1 835 { ODR_200_3_STR, 'I', menu_odr_select, ODR_200_3_BITS },
mahphalke 1:48914f9593f1 836 { ODR_100_2_STR, 'J', menu_odr_select, ODR_100_2_BITS },
mahphalke 1:48914f9593f1 837 { ODR_59_52_STR, 'K', menu_odr_select, ODR_59_52_BITS },
mahphalke 1:48914f9593f1 838 { ODR_49_68_STR, 'L', menu_odr_select, ODR_49_68_BITS },
mahphalke 1:48914f9593f1 839 { ODR_20_01_STR, 'M', menu_odr_select, ODR_20_01_BITS },
mahphalke 1:48914f9593f1 840 { ODR_16_63_STR, 'N', menu_odr_select, ODR_16_63_BITS },
mahphalke 1:48914f9593f1 841 { ODR_10_STR, 'O', menu_odr_select, ODR_10_BITS },
mahphalke 1:48914f9593f1 842 { ODR_5_STR, 'P', menu_odr_select, ODR_5_BITS },
mahphalke 1:48914f9593f1 843 { ODR_2_5_STR, 'Q', menu_odr_select, ODR_2_5_BITS },
mahphalke 1:48914f9593f1 844 { ODR_1_25_STR, 'R', menu_odr_select, ODR_1_25_BITS },
mahphalke 1:48914f9593f1 845 #elif defined(DEV_AD7176_2) || defined(DEV_AD7175_2) || \
mahphalke 1:48914f9593f1 846 defined(DEV_AD7175_8) || defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 847 #if (DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 848 { ODR_250000_STR, 'A', menu_odr_select, ODR_250000_BITS },
mahphalke 1:48914f9593f1 849 { ODR_125000_STR, 'B', menu_odr_select, ODR_125000_BITS },
mahphalke 1:48914f9593f1 850 { ODR_62500_STR, 'C', menu_odr_select, ODR_62500_BITS },
mahphalke 1:48914f9593f1 851 { ODR_50000_STR, 'D', menu_odr_select, ODR_50000_BITS },
mahphalke 1:48914f9593f1 852 { ODR_31250_STR, 'E', menu_odr_select, ODR_31250_BITS },
mahphalke 1:48914f9593f1 853 { ODR_25000_STR, 'F', menu_odr_select, ODR_25000_BITS },
mahphalke 1:48914f9593f1 854 { ODR_15625_STR, 'G', menu_odr_select, ODR_15625_BITS },
mahphalke 1:48914f9593f1 855 #endif
mahphalke 1:48914f9593f1 856 { ODR_10000_STR, 'H', menu_odr_select, ODR_10000_BITS },
mahphalke 1:48914f9593f1 857 { ODR_5000_STR, 'I', menu_odr_select, ODR_5000_BITS },
mahphalke 1:48914f9593f1 858 { ODR_2500_STR, 'J', menu_odr_select, ODR_2500_BITS },
mahphalke 1:48914f9593f1 859 { ODR_1000_STR, 'K', menu_odr_select, ODR_1000_BITS },
mahphalke 1:48914f9593f1 860 { ODR_500_STR, 'L', menu_odr_select, ODR_500_BITS },
mahphalke 1:48914f9593f1 861 { ODR_397_5_STR, 'M', menu_odr_select, ODR_397_5_BITS },
mahphalke 1:48914f9593f1 862 { ODR_200_STR, 'N', menu_odr_select, ODR_200_BITS },
mahphalke 1:48914f9593f1 863 { ODR_100_STR, 'O', menu_odr_select, ODR_100_BITS },
mahphalke 1:48914f9593f1 864 { ODR_59_94_STR, 'P', menu_odr_select, ODR_59_94_BITS },
mahphalke 1:48914f9593f1 865 { ODR_49_96_STR, 'Q', menu_odr_select, ODR_49_96_BITS },
mahphalke 1:48914f9593f1 866 { ODR_20_STR, 'R', menu_odr_select, ODR_20_BITS },
mahphalke 1:48914f9593f1 867 { ODR_16_67_STR, 'S', menu_odr_select, ODR_16_67_BITS },
mahphalke 1:48914f9593f1 868 { ODR_10_STR, 'T', menu_odr_select, ODR_10_BITS },
mahphalke 1:48914f9593f1 869 { ODR_5_STR, 'U', menu_odr_select, ODR_5_BITS },
mahphalke 1:48914f9593f1 870 #endif
mahphalke 1:48914f9593f1 871 };
mahphalke 1:48914f9593f1 872
mahphalke 1:48914f9593f1 873 console_menu sinc5_1_data_rate_select_menu = {
mahphalke 1:48914f9593f1 874 .title = "ODR Selection Menu",
mahphalke 1:48914f9593f1 875 .items = sinc5_1_data_rate_select_items,
mahphalke 1:48914f9593f1 876 .itemCount = ARRAY_SIZE(sinc5_1_data_rate_select_items),
mahphalke 1:48914f9593f1 877 .headerItem = NULL,
mahphalke 1:48914f9593f1 878 .footerItem = NULL,
mahphalke 1:48914f9593f1 879 .enableEscapeKey = true
mahphalke 1:48914f9593f1 880 };
mahphalke 1:48914f9593f1 881
mahphalke 1:48914f9593f1 882
mahphalke 1:48914f9593f1 883 /*
mahphalke 1:48914f9593f1 884 * Definition of the SINC3 ODR select menu items and menu itself
mahphalke 1:48914f9593f1 885 */
mahphalke 1:48914f9593f1 886 console_menu_item sinc3_data_rate_select_items[] = {
Mahesh Phalke 4:4592cc69bfa6 887 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || \
Mahesh Phalke 4:4592cc69bfa6 888 defined(DEV_AD4115) || defined(DEV_AD7172_2) || \
mahphalke 1:48914f9593f1 889 defined(DEV_AD7172_4) || defined(DEV_AD7173_8)
mahphalke 1:48914f9593f1 890 { ODR_31250_STR, 'A', menu_odr_select, ODR_31250_BITS },
mahphalke 1:48914f9593f1 891 { ODR_15625_STR, 'B', menu_odr_select, ODR_15625_BITS },
mahphalke 1:48914f9593f1 892 { ODR_10417_STR, 'C', menu_odr_select, ODR_10417_BITS },
mahphalke 1:48914f9593f1 893 { ODR_5208_STR, 'D', menu_odr_select, ODR_5208_BITS },
Mahesh Phalke 4:4592cc69bfa6 894 #if defined(DEV_AD4111) || defined(DEV_AD4112) || defined(DEV_AD4114) || \
Mahesh Phalke 4:4592cc69bfa6 895 defined(DEV_AD4115)
mahphalke 1:48914f9593f1 896 { ODR_3906_STR, 'E', menu_odr_select, ODR_3906_BITS },
mahphalke 1:48914f9593f1 897 { ODR_1157_STR, 'F', menu_odr_select, ODR_1157_BITS },
mahphalke 1:48914f9593f1 898 { ODR_539_STR, 'G', menu_odr_select, ODR_539_BITS },
mahphalke 1:48914f9593f1 899 { ODR_401_STR, 'H', menu_odr_select, ODR_401_BITS },
mahphalke 1:48914f9593f1 900 { ODR_206_STR, 'H', menu_odr_select, ODR_206_BITS },
mahphalke 1:48914f9593f1 901 { ODR_102_STR, 'I', menu_odr_select, ODR_102_BITS },
mahphalke 1:48914f9593f1 902 #else
mahphalke 1:48914f9593f1 903 { ODR_2604_STR, 'E', menu_odr_select, ODR_2604_BITS },
mahphalke 1:48914f9593f1 904 { ODR_1008_STR, 'F', menu_odr_select, ODR_1008_BITS },
mahphalke 1:48914f9593f1 905 { ODR_504_STR, 'G', menu_odr_select, ODR_504_BITS },
mahphalke 1:48914f9593f1 906 { ODR_400_6_STR, 'H', menu_odr_select, ODR_400_6_BITS },
mahphalke 1:48914f9593f1 907 { ODR_200_3_STR, 'H', menu_odr_select, ODR_200_3_BITS },
mahphalke 1:48914f9593f1 908 { ODR_100_2_STR, 'I', menu_odr_select, ODR_100_2_BITS },
mahphalke 1:48914f9593f1 909 #endif
mahphalke 1:48914f9593f1 910 { ODR_59_98_STR, 'J', menu_odr_select, ODR_59_98_BITS },
mahphalke 1:48914f9593f1 911 { ODR_50_STR, 'K', menu_odr_select, ODR_50_BITS },
mahphalke 1:48914f9593f1 912 { ODR_20_01_STR, 'L', menu_odr_select, ODR_20_01_BITS },
mahphalke 1:48914f9593f1 913 { ODR_16_67_STR, 'M', menu_odr_select, ODR_16_67_BITS },
mahphalke 1:48914f9593f1 914 { ODR_10_STR, 'N', menu_odr_select, ODR_10_BITS },
mahphalke 1:48914f9593f1 915 { ODR_5_STR, 'O', menu_odr_select, ODR_5_BITS },
mahphalke 1:48914f9593f1 916 { ODR_2_5_STR, 'P', menu_odr_select, ODR_2_5_BITS },
mahphalke 1:48914f9593f1 917 { ODR_1_25_STR, 'Q', menu_odr_select, ODR_1_25_BITS },
mahphalke 1:48914f9593f1 918 #elif defined(DEV_AD7176_2) || defined(DEV_AD7175_2) || \
mahphalke 1:48914f9593f1 919 defined(DEV_AD7175_8) || defined(DEV_AD7177_2)
mahphalke 1:48914f9593f1 920 #if (DEV_AD7176_2) || defined(DEV_AD7175_2) || defined(DEV_AD7175_8)
mahphalke 1:48914f9593f1 921 { ODR_250000_STR, 'A', menu_odr_select, ODR_250000_BITS },
mahphalke 1:48914f9593f1 922 { ODR_125000_STR, 'B', menu_odr_select, ODR_125000_BITS },
mahphalke 1:48914f9593f1 923 { ODR_62500_STR, 'C', menu_odr_select, ODR_62500_BITS },
mahphalke 1:48914f9593f1 924 { ODR_50000_STR, 'D', menu_odr_select, ODR_50000_BITS },
mahphalke 1:48914f9593f1 925 { ODR_31250_STR, 'E', menu_odr_select, ODR_31250_BITS },
mahphalke 1:48914f9593f1 926 { ODR_25000_STR, 'F', menu_odr_select, ODR_25000_BITS },
mahphalke 1:48914f9593f1 927 { ODR_15625_STR, 'G', menu_odr_select, ODR_15625_BITS },
mahphalke 1:48914f9593f1 928 #endif
mahphalke 1:48914f9593f1 929 { ODR_10000_STR, 'H', menu_odr_select, ODR_10000_BITS },
mahphalke 1:48914f9593f1 930 { ODR_5000_STR, 'I', menu_odr_select, ODR_5000_BITS },
mahphalke 1:48914f9593f1 931 { ODR_2500_STR, 'J', menu_odr_select, ODR_2500_BITS },
mahphalke 1:48914f9593f1 932 { ODR_1000_STR, 'K', menu_odr_select, ODR_1000_BITS },
mahphalke 1:48914f9593f1 933 { ODR_500_STR, 'L', menu_odr_select, ODR_500_BITS },
mahphalke 1:48914f9593f1 934 { ODR_400_STR , 'M', menu_odr_select, ODR_400_BITS },
mahphalke 1:48914f9593f1 935 { ODR_200_STR, 'N', menu_odr_select, ODR_200_BITS },
mahphalke 1:48914f9593f1 936 { ODR_100_STR, 'O', menu_odr_select, ODR_100_BITS },
mahphalke 1:48914f9593f1 937 { ODR_60_STR, 'P', menu_odr_select, ODR_60_BITS },
mahphalke 1:48914f9593f1 938 { ODR_50_STR, 'Q', menu_odr_select, ODR_50_BITS },
mahphalke 1:48914f9593f1 939 { ODR_20_STR, 'R', menu_odr_select, ODR_20_BITS },
mahphalke 1:48914f9593f1 940 { ODR_16_67_STR, 'S', menu_odr_select, ODR_16_67_BITS },
mahphalke 1:48914f9593f1 941 { ODR_10_STR, 'T', menu_odr_select, ODR_10_BITS },
mahphalke 1:48914f9593f1 942 { ODR_5_STR, 'U', menu_odr_select, ODR_5_BITS },
mahphalke 1:48914f9593f1 943 #endif
mahphalke 1:48914f9593f1 944 };
mahphalke 1:48914f9593f1 945
mahphalke 1:48914f9593f1 946 console_menu sinc3_data_rate_select_menu = {
mahphalke 1:48914f9593f1 947 .title = "ODR Selection Menu",
mahphalke 1:48914f9593f1 948 .items = sinc3_data_rate_select_items,
mahphalke 1:48914f9593f1 949 .itemCount = ARRAY_SIZE(sinc3_data_rate_select_items),
mahphalke 1:48914f9593f1 950 .headerItem = NULL,
mahphalke 1:48914f9593f1 951 .footerItem = NULL,
mahphalke 1:48914f9593f1 952 .enableEscapeKey = true
mahphalke 1:48914f9593f1 953 };
mahphalke 1:48914f9593f1 954
mahphalke 1:48914f9593f1 955
mahphalke 1:48914f9593f1 956 /*
mahphalke 1:48914f9593f1 957 * Definition of the polarity select menu items and menu itself
mahphalke 1:48914f9593f1 958 */
mahphalke 1:48914f9593f1 959 console_menu_item polarity_select_items[] = {
mahphalke 1:48914f9593f1 960 { "Unipolar", 'U', menu_polarity_select, UNIPOLAR },
mahphalke 1:48914f9593f1 961 { "Bipolar", 'B', menu_polarity_select, BIPOLAR },
mahphalke 1:48914f9593f1 962 };
mahphalke 1:48914f9593f1 963
mahphalke 1:48914f9593f1 964 console_menu polarity_select_menu = {
mahphalke 1:48914f9593f1 965 .title = "Polarity Selection Menu",
mahphalke 1:48914f9593f1 966 .items = polarity_select_items,
mahphalke 1:48914f9593f1 967 .itemCount = ARRAY_SIZE(polarity_select_items),
mahphalke 1:48914f9593f1 968 .headerItem = NULL,
mahphalke 1:48914f9593f1 969 .footerItem = NULL,
mahphalke 1:48914f9593f1 970 .enableEscapeKey = true
mahphalke 1:48914f9593f1 971 };
mahphalke 1:48914f9593f1 972
mahphalke 1:48914f9593f1 973
mahphalke 1:48914f9593f1 974 /*
mahphalke 1:48914f9593f1 975 * Definition of the refernce source selection menu items and menu itself
mahphalke 1:48914f9593f1 976 */
mahphalke 1:48914f9593f1 977 console_menu_item reference_select_items[] = {
mahphalke 1:48914f9593f1 978 { "External", 'A', menu_reference_source_select, EXTERNAL },
mahphalke 1:48914f9593f1 979 { "Internal", 'B', menu_reference_source_select, INTERNAL },
mahphalke 1:48914f9593f1 980 { "AVDD-AVSS", 'C', menu_reference_source_select, AVDD_AVSS },
mahphalke 1:48914f9593f1 981 };
mahphalke 1:48914f9593f1 982
mahphalke 1:48914f9593f1 983 console_menu reference_select_menu = {
mahphalke 1:48914f9593f1 984 .title = "Reference Selection Menu",
mahphalke 1:48914f9593f1 985 .items = reference_select_items,
mahphalke 1:48914f9593f1 986 .itemCount = ARRAY_SIZE(reference_select_items),
mahphalke 1:48914f9593f1 987 .headerItem = NULL,
mahphalke 1:48914f9593f1 988 .footerItem = NULL,
mahphalke 1:48914f9593f1 989 .enableEscapeKey = true
mahphalke 1:48914f9593f1 990 };
mahphalke 1:48914f9593f1 991
mahphalke 1:48914f9593f1 992
mahphalke 1:48914f9593f1 993 /*
mahphalke 1:48914f9593f1 994 * Definition of the reference buffer enable/disable menu items and menu itself
mahphalke 1:48914f9593f1 995 */
mahphalke 1:48914f9593f1 996 console_menu_item ref_buffer_enable_disable_items[] = {
mahphalke 1:48914f9593f1 997 { "Enable", 'E', menu_ref_buffer_enable_disable, SELECT_ENABLE },
mahphalke 1:48914f9593f1 998 { "Disable", 'D', menu_ref_buffer_enable_disable, SELECT_DISBLE },
mahphalke 1:48914f9593f1 999 };
mahphalke 1:48914f9593f1 1000
mahphalke 1:48914f9593f1 1001 console_menu ref_buffer_enable_disable_menu = {
mahphalke 1:48914f9593f1 1002 .title = "Reference Buffer Enable/Disable Menu",
mahphalke 1:48914f9593f1 1003 .items = ref_buffer_enable_disable_items,
mahphalke 1:48914f9593f1 1004 .itemCount = ARRAY_SIZE(ref_buffer_enable_disable_items),
mahphalke 1:48914f9593f1 1005 .headerItem = NULL,
mahphalke 1:48914f9593f1 1006 .footerItem = NULL,
mahphalke 1:48914f9593f1 1007 .enableEscapeKey = true
mahphalke 1:48914f9593f1 1008 };
mahphalke 1:48914f9593f1 1009
mahphalke 1:48914f9593f1 1010
mahphalke 1:48914f9593f1 1011 /*
mahphalke 1:48914f9593f1 1012 * Definition of the reference buffer enable/disable menu items and menu itself
mahphalke 1:48914f9593f1 1013 */
mahphalke 1:48914f9593f1 1014 console_menu_item input_buffer_enable_disable_items[] = {
mahphalke 1:48914f9593f1 1015 { "Enable", 'E', menu_input_buffer_enable_disable, SELECT_ENABLE },
mahphalke 1:48914f9593f1 1016 { "Disable", 'D', menu_input_buffer_enable_disable, SELECT_DISBLE },
mahphalke 1:48914f9593f1 1017 };
mahphalke 1:48914f9593f1 1018
mahphalke 1:48914f9593f1 1019 console_menu input_buffer_enable_disable_menu = {
mahphalke 1:48914f9593f1 1020 .title = "Input Buffer Enable/Disable Menu",
mahphalke 1:48914f9593f1 1021 .items = input_buffer_enable_disable_items,
mahphalke 1:48914f9593f1 1022 .itemCount = ARRAY_SIZE(input_buffer_enable_disable_items),
mahphalke 1:48914f9593f1 1023 .headerItem = NULL,
mahphalke 1:48914f9593f1 1024 .footerItem = NULL,
mahphalke 1:48914f9593f1 1025 .enableEscapeKey = true
mahphalke 1:48914f9593f1 1026 };
mahphalke 1:48914f9593f1 1027
mahphalke 1:48914f9593f1 1028
mahphalke 1:48914f9593f1 1029 /*
mahphalke 1:48914f9593f1 1030 * Definition of the Main Menu Items and menu itself
mahphalke 1:48914f9593f1 1031 */
mahphalke 1:48914f9593f1 1032 console_menu_item main_menu_items[] = {
mahphalke 1:48914f9593f1 1033 { "Read Device ID", 'A', menu_read_id },
mahphalke 1:48914f9593f1 1034 { "" },
mahphalke 1:48914f9593f1 1035 { "Read Status Register", 'B', menu_read_status },
mahphalke 1:48914f9593f1 1036 { "" },
mahphalke 1:48914f9593f1 1037 { "Sample Channels", 'C', menu_sample_channels },
mahphalke 1:48914f9593f1 1038 { "" },
mahphalke 1:48914f9593f1 1039 { "Enable/Disable Channels", 'D', menu_chn_enable_disable_display },
mahphalke 1:48914f9593f1 1040 { "" },
mahphalke 1:48914f9593f1 1041 { "Connect Analog Inputs to Channel", 'E', menu_input_chn_connect_display },
mahphalke 1:48914f9593f1 1042 { "" },
mahphalke 1:48914f9593f1 1043 { "Configure and Assign Setup", 'F', menu_config_and_assign_setup },
mahphalke 1:48914f9593f1 1044 { "" },
mahphalke 1:48914f9593f1 1045 { "Display setup", 'G', menu_display_setup },
mahphalke 1:48914f9593f1 1046 { "" },
mahphalke 1:48914f9593f1 1047 { "Read Temperature", 'H', menu_read_temperature },
mahphalke 1:48914f9593f1 1048 { "" },
mahphalke 1:48914f9593f1 1049 { "Calibrate ADC (Internal)", 'I', menu_calibrate_adc },
mahphalke 1:48914f9593f1 1050 { "" },
mahphalke 3:6c7324997606 1051 #if defined(DEV_AD4111)
mahphalke 3:6c7324997606 1052 { "Open Wire Detection", 'J', menu_open_wire_detection },
mahphalke 3:6c7324997606 1053 { "" },
mahphalke 3:6c7324997606 1054 #endif
mahphalke 3:6c7324997606 1055 { "Read/Write Device Registers", 'K', menu_read_write_device_regs },
mahphalke 1:48914f9593f1 1056 };
mahphalke 1:48914f9593f1 1057
mahphalke 1:48914f9593f1 1058 console_menu ad717x_main_menu = {
mahphalke 1:48914f9593f1 1059 .title = "Main Menu",
mahphalke 1:48914f9593f1 1060 .items = main_menu_items,
mahphalke 1:48914f9593f1 1061 .itemCount = ARRAY_SIZE(main_menu_items),
mahphalke 1:48914f9593f1 1062 .headerItem = display_main_menu_header,
mahphalke 1:48914f9593f1 1063 .footerItem = NULL,
mahphalke 1:48914f9593f1 1064 .enableEscapeKey = false
mahphalke 1:48914f9593f1 1065 };
mahphalke 1:48914f9593f1 1066
mahphalke 1:48914f9593f1 1067 /******************************************************************************/
mahphalke 1:48914f9593f1 1068 /************************ Public Declarations *********************************/
mahphalke 1:48914f9593f1 1069 /******************************************************************************/
mahphalke 1:48914f9593f1 1070
mahphalke 1:48914f9593f1 1071 #endif /* AD717X_MENU_DEFINES_H_ */