Example program for EVAL-AD4130
Dependencies: tempsensors sdp_k1_sdram
ad4130_loadcell_config.c
00001 /*************************************************************************//** 00002 * @file ad4130_loadcell_config.c 00003 * @brief Loadcell user configurations file for AD4130 device 00004 ****************************************************************************** 00005 * Copyright (c) 2022 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *****************************************************************************/ 00012 00013 /******************************************************************************/ 00014 /***************************** Include Files **********************************/ 00015 /******************************************************************************/ 00016 00017 #include "app_config.h" 00018 00019 /******************************************************************************/ 00020 /********************** Macros and Constants Definition ***********************/ 00021 /******************************************************************************/ 00022 00023 /******************************************************************************/ 00024 /********************** Variables and User Defined Data Types *****************/ 00025 /******************************************************************************/ 00026 00027 /* AD4130 device initialization parameters */ 00028 struct ad413x_init_param ad4130_loadcell_config_params = { 00029 .spi_init = &spi_init_params, 00030 00031 /* Setup (Preset) Configurations */ 00032 .preset = { 00033 // Setup 0 00034 { 00035 .ref_buf = { 00036 .ref_buf_p_en = true, 00037 .ref_buf_m_en = true, 00038 }, 00039 .ref_sel = AD413X_REFIN1, 00040 .gain = AD413X_GAIN_128, 00041 .filter = AD4130_FILTER_TYPE, 00042 .s_time = AD413X_32_MCLK 00043 }, 00044 }, 00045 00046 /* Chnnel Configurations */ 00047 .ch = { 00048 // Chn0 00049 { 00050 .preset = AD413X_PRESET_0, 00051 .enable = 1, 00052 .ain_p = AD413X_AIN5, 00053 .ain_m = AD413X_AIN6, 00054 .pdsw_en = true, 00055 }, 00056 }, 00057 00058 .chip_id = AD4130_8, 00059 .mclk = AD413X_INT_76_8_KHZ_OUT_OFF, 00060 .bipolar = true, 00061 .int_ref = AD413X_INTREF_DISABLED, 00062 .standby_ctrl = { 00063 .standby_pdsw_en = true, 00064 }, 00065 .data_stat = 0, 00066 .spi_crc_en = 0 00067 };
Generated on Wed Jul 20 2022 12:42:25 by 1.7.2