Program files for Example program for EVAL-AD7768-1
Dependencies: platform_drivers
ad77681_user_config.c
00001 /***************************************************************************** 00002 * @file ad77681_user_config.h 00003 * 00004 * @brief User configuration settings for AD77681 on start-up 00005 * 00006 * @details 00007 ****************************************************************************** 00008 Copyright (c) 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 /******************************************************************************/ 00016 /***************************** Include Files **********************************/ 00017 /******************************************************************************/ 00018 #include <stdint.h> 00019 00020 #include "app_config.h" 00021 #include "app_config_mbed.h" 00022 #include "ad77681_user_config.h" 00023 00024 /******************************************************************************/ 00025 /********************** Macros and Constants Definition ***********************/ 00026 /******************************************************************************/ 00027 00028 // Initialize the ad77681 device structure 00029 struct ad77681_init_param sad77681_init = { 00030 // Define SPI init parameters structure 00031 .spi_eng_dev_init = 00032 { 00033 .max_speed_hz = 22500000, // Max SPI Speed 00034 .chip_select = SPI_SS, // Chip Select 00035 .mode = SPI_MODE_3, // CPOL = 1, CPHA = 1 00036 .extra = &spi_init_extra_params // SPI extra configurations 00037 }, 00038 .power_mode = AD77681_FAST, 00039 .mclk_div = AD77681_MCLK_DIV_8, 00040 .conv_mode = AD77681_CONV_CONTINUOUS, 00041 .diag_mux_sel = AD77681_TEMP_SENSOR, 00042 .conv_diag_sel = false, 00043 .conv_len = AD77681_CONV_24BIT, 00044 .crc_sel = AD77681_NO_CRC, 00045 .status_bit = 0, 00046 .VCM_out = AD77681_VCM_0_9V, 00047 .AINn = AD77681_AINn_DISABLED, 00048 .AINp = AD77681_AINp_DISABLED, 00049 .REFn = AD77681_BUFn_ENABLED, 00050 .REFp = AD77681_BUFp_ENABLED, 00051 .filter = AD77681_SINC5, 00052 .decimate = AD77681_SINC5_FIR_DECx32, 00053 .sinc3_osr = 0, 00054 .vref = AD77681_VOLTAGE_REF, 00055 .mclk = AD77681_MCLK, 00056 .sample_rate = AD77681_DEFAULT_SAMPLING_FREQ, 00057 .data_frame_byte = AD77681_DECIMATION_RATE 00058 };
Generated on Tue Jul 12 2022 19:15:23 by 1.7.2