Example program for EVAL-AD5770R
Dependencies: adi_console_menu platform_drivers
ad5770r_reset_config.c
00001 /*! 00002 ***************************************************************************** 00003 @file: ad5770r_reset_config.c 00004 @brief: AD5770R initialization configuration 00005 @details: 00006 ----------------------------------------------------------------------------- 00007 * 00008 Copyright (c) 2020-2021 Analog Devices, Inc. All Rights Reserved. 00009 00010 This software is proprietary to Analog Devices, Inc. and its licensors. 00011 By using this software you agree to the terms of the associated 00012 Analog Devices Software License Agreement. 00013 ******************************************************************************/ 00014 00015 // #includes 00016 #include <stdint.h> 00017 #include <stdbool.h> 00018 #include <stddef.h> 00019 00020 #include "spi.h" 00021 #include "ad5770r.h" 00022 00023 // #defines 00024 00025 // type defintions 00026 00027 // constants 00028 const struct ad5770r_dev ad5770r_dev_reset = { 00029 /* SPI */ 00030 .spi_desc = NULL, 00031 00032 /* Device SPI Settings */ 00033 .dev_spi_settings = { 00034 .addr_ascension = false, 00035 .single_instruction = false, 00036 .stream_mode_length = 0 00037 }, 00038 00039 /* Device Settings */ 00040 .channel_config = { 00041 .en0 = false, 00042 .en1 = false, 00043 .en2 = false, 00044 .en3 = false, 00045 .en4 = false, 00046 .en5 = false, 00047 .sink0 = true 00048 }, 00049 00050 .output_mode = { 00051 { 00052 .output_scale = 0x00, 00053 .output_range_mode = 0x00 00054 }, 00055 { 00056 .output_scale = 0x00, 00057 .output_range_mode = 0x02 00058 }, 00059 { 00060 .output_scale = 0x00, 00061 .output_range_mode = 0x00 00062 }, 00063 { 00064 .output_scale = 0x00, 00065 .output_range_mode = 0x00 00066 }, 00067 { 00068 .output_scale = 0x00, 00069 .output_range_mode = 0x00 00070 }, 00071 { 00072 .output_scale = 0x00, 00073 .output_range_mode = 0x00 00074 }, 00075 }, 00076 00077 .external_reference = false, 00078 .reference_selector = AD5770R_EXT_REF_2_5_V, 00079 .alarm_config = { 00080 .open_drain_en = false, 00081 .thermal_shutdown_en = false, 00082 .background_crc_en = true, 00083 .temp_warning_msk = false, 00084 .over_temp_msk = false, 00085 .neg_ch0_msk = false, 00086 .iref_fault_msk = false, 00087 .background_crc_msk = true 00088 }, 00089 .output_filter = { 00090 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM, 00091 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM, 00092 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM, 00093 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM, 00094 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM, 00095 AD5770R_OUTPUT_FILTER_RESISTOR_60_OHM 00096 }, 00097 .mon_setup = { 00098 .monitor_function = AD5770R_DISABLE, 00099 .mux_buffer = false, 00100 .ib_ext_en = false, 00101 .monitor_channel = AD5770R_CH0 00102 }, 00103 .mask_hw_ldac = { 00104 .en0 = false, 00105 .en1 = false, 00106 .en2 = false, 00107 .en3 = false, 00108 .en4 = false, 00109 .en5 = false, 00110 }, 00111 .dac_value = {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}, 00112 .page_mask = { 00113 .dac_data_page_mask = 0x0000, 00114 .input_page_mask = 0x0000 00115 }, 00116 .mask_channel_sel = { 00117 .en0 = false, 00118 .en1 = false, 00119 .en2 = false, 00120 .en3 = false, 00121 .en4 = false, 00122 .en5 = false, 00123 }, 00124 .sw_ldac = { 00125 .en0 = false, 00126 .en1 = false, 00127 .en2 = false, 00128 .en3 = false, 00129 .en4 = false, 00130 .en5 = false, 00131 }, 00132 .input_value = {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}, 00133 }; 00134 00135 // static variables
Generated on Wed Jul 13 2022 14:14:19 by 1.7.2