Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: platform_drivers AD7124_no_OS adi_console_menu tempsensors_prv
app/ad7124_user_config.c
- Committer:
- mahphalke
- Date:
- 2021-03-24
- Revision:
- 8:3d7b5897b028
- Parent:
- 0:08ba94bc5a30
File content as of revision 8:3d7b5897b028:
/*************************************************************************//**
* @file ad7124_user_config.c
* @brief User configuration file for AD7124 device
******************************************************************************
* Copyright (c) 2021 Analog Devices, Inc.
*
* All rights reserved.
*
* This software is proprietary to Analog Devices, Inc. and its licensors.
* By using this software you agree to the terms of the associated
* Analog Devices Software License Agreement.
*****************************************************************************/
/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdint.h>
#include "app_config.h"
#include "ad7124_user_config.h"
#include "spi_extra.h"
#include "gpio_extra.h"
/******************************************************************************/
/********************** Macros and Constants Definition ***********************/
/******************************************************************************/
/******************************************************************************/
/********************** Variables and User Defined Data Types *****************/
/******************************************************************************/
/* Define SPI extra init parameters structure */
mbed_spi_init_param spi_init_extra_params = {
.spi_clk_pin = SPI_SCK,
.spi_miso_pin = SPI_MISO,
.spi_mosi_pin = SPI_MOSI
};
/* Define the AD7124 device init structure */
struct ad7124_init_param ad7124_init_params = {
{
.max_speed_hz = 10000000, // Max SPI Speed
.chip_select = SPI_SS, // Chip Select
.mode = SPI_MODE_3, // CPOL = 1, CPHA = 1
.extra = &spi_init_extra_params // SPI extra configurations
},
ad7124_regs,
.spi_rdy_poll_cnt = 10000
};