IIO firmware for the AD4110

Dependencies:   tempsensors sdp_k1_sdram

Committer:
Janani Sunil
Date:
Wed Jul 27 17:04:15 2022 +0530
Revision:
0:6ca37a8f8ba9
Initial implementation for AD4110 IIO Firmware

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Janani Sunil 0:6ca37a8f8ba9 1 /***************************************************************************//*
Janani Sunil 0:6ca37a8f8ba9 2 * @file ad4110_field_power_supply_mode.c
Janani Sunil 0:6ca37a8f8ba9 3 * @brief Demo mode configurations source for AD4110 field power supply mode
Janani Sunil 0:6ca37a8f8ba9 4 ******************************************************************************
Janani Sunil 0:6ca37a8f8ba9 5 * Copyright (c) 2022 Analog Devices, Inc.
Janani Sunil 0:6ca37a8f8ba9 6 * All rights reserved.
Janani Sunil 0:6ca37a8f8ba9 7 *
Janani Sunil 0:6ca37a8f8ba9 8 * This software is proprietary to Analog Devices, Inc. and its licensors.
Janani Sunil 0:6ca37a8f8ba9 9 * By using this software you agree to the terms of the associated
Janani Sunil 0:6ca37a8f8ba9 10 * Analog Devices Software License Agreement.
Janani Sunil 0:6ca37a8f8ba9 11 ******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 12
Janani Sunil 0:6ca37a8f8ba9 13 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 14 /***************************** Include Files **********************************/
Janani Sunil 0:6ca37a8f8ba9 15 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 16
Janani Sunil 0:6ca37a8f8ba9 17 #include "ad4110.h"
Janani Sunil 0:6ca37a8f8ba9 18 #include "app_config.h"
Janani Sunil 0:6ca37a8f8ba9 19
Janani Sunil 0:6ca37a8f8ba9 20 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 21 /********************** Macros and Constants Definition ***********************/
Janani Sunil 0:6ca37a8f8ba9 22 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 23
Janani Sunil 0:6ca37a8f8ba9 24 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 25 /********************** Variables and User Defined Data Types *****************/
Janani Sunil 0:6ca37a8f8ba9 26 /******************************************************************************/
Janani Sunil 0:6ca37a8f8ba9 27
Janani Sunil 0:6ca37a8f8ba9 28 struct ad4110_init_param ad4110_field_power_supply_mode_init_params = {
Janani Sunil 0:6ca37a8f8ba9 29 .spi_init = {
Janani Sunil 0:6ca37a8f8ba9 30 .max_speed_hz = 10000000,
Janani Sunil 0:6ca37a8f8ba9 31 .chip_select = SPI_CSB,
Janani Sunil 0:6ca37a8f8ba9 32 .mode = NO_OS_SPI_MODE_3,
Janani Sunil 0:6ca37a8f8ba9 33 .extra = &spi_extra_init_params,
Janani Sunil 0:6ca37a8f8ba9 34 .platform_ops = &spi_platform_ops
Janani Sunil 0:6ca37a8f8ba9 35 },
Janani Sunil 0:6ca37a8f8ba9 36 .volt_ref = AD4110_EXT_REF,
Janani Sunil 0:6ca37a8f8ba9 37 .data_stat = AD4110_DISABLE,
Janani Sunil 0:6ca37a8f8ba9 38 .data_length = AD4110_DATA_WL24,
Janani Sunil 0:6ca37a8f8ba9 39 .afe_crc_en = AD4110_AFE_CRC_DISABLE,
Janani Sunil 0:6ca37a8f8ba9 40 .adc_crc_en = AD4110_ADC_CRC_DISABLE,
Janani Sunil 0:6ca37a8f8ba9 41 .op_mode = AD4110_FLD_POWER_MODE,
Janani Sunil 0:6ca37a8f8ba9 42 .gain = GAIN_CH,
Janani Sunil 0:6ca37a8f8ba9 43 .sync = AD4110_SYNC_EN,
Janani Sunil 0:6ca37a8f8ba9 44 .afe_clk = AD4110_AFE_ADC_CLOCKED,
Janani Sunil 0:6ca37a8f8ba9 45 .adc_clk = AD4110_ADC_INT_CLK_CLKIO,
Janani Sunil 0:6ca37a8f8ba9 46 .addr = 0,
Janani Sunil 0:6ca37a8f8ba9 47 .bipolar = true,
Janani Sunil 0:6ca37a8f8ba9 48 .analog_input_buff = ENABLE_FULL_BUFFER,
Janani Sunil 0:6ca37a8f8ba9 49 .odr = AD4110_ODR_SEL,
Janani Sunil 0:6ca37a8f8ba9 50 .order = sinc5_sinc1
Janani Sunil 0:6ca37a8f8ba9 51 } ;