Example program for EVAL-AD4130

Dependencies:   tempsensors sdp_k1_sdram

Committer:
Mahesh Phalke
Date:
Wed Jul 20 18:12:00 2022 +0530
Revision:
2:7b2b268ea49c
Initial firmware commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Mahesh Phalke 2:7b2b268ea49c 1 /***************************************************************************//**
Mahesh Phalke 2:7b2b268ea49c 2 * @file main.c
Mahesh Phalke 2:7b2b268ea49c 3 * @brief Main module for AD4130 IIO application
Mahesh Phalke 2:7b2b268ea49c 4 * @details This module invokes the AD4130 IIO interfaces
Mahesh Phalke 2:7b2b268ea49c 5 * through forever loop.
Mahesh Phalke 2:7b2b268ea49c 6 ********************************************************************************
Mahesh Phalke 2:7b2b268ea49c 7 * Copyright (c) 2020, 2022 Analog Devices, Inc.
Mahesh Phalke 2:7b2b268ea49c 8 *
Mahesh Phalke 2:7b2b268ea49c 9 * All rights reserved.
Mahesh Phalke 2:7b2b268ea49c 10 *
Mahesh Phalke 2:7b2b268ea49c 11 * This software is proprietary to Analog Devices, Inc. and its licensors.
Mahesh Phalke 2:7b2b268ea49c 12 * By using this software you agree to the terms of the associated
Mahesh Phalke 2:7b2b268ea49c 13 * Analog Devices Software License Agreement.
Mahesh Phalke 2:7b2b268ea49c 14 *******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 15
Mahesh Phalke 2:7b2b268ea49c 16 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 17 /***************************** Include Files **********************************/
Mahesh Phalke 2:7b2b268ea49c 18 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 19 #include <stdio.h>
Mahesh Phalke 2:7b2b268ea49c 20 #include <stdint.h>
Mahesh Phalke 2:7b2b268ea49c 21
Mahesh Phalke 2:7b2b268ea49c 22 #include "ad4130_iio.h"
Mahesh Phalke 2:7b2b268ea49c 23
Mahesh Phalke 2:7b2b268ea49c 24 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 25 /********************** Macros and Constants Definitions **********************/
Mahesh Phalke 2:7b2b268ea49c 26 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 27
Mahesh Phalke 2:7b2b268ea49c 28 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 29 /************************ Functions Definitions *******************************/
Mahesh Phalke 2:7b2b268ea49c 30 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 31
Mahesh Phalke 2:7b2b268ea49c 32 /**
Mahesh Phalke 2:7b2b268ea49c 33 * @brief Main entry point to application
Mahesh Phalke 2:7b2b268ea49c 34 * @return none
Mahesh Phalke 2:7b2b268ea49c 35 */
Mahesh Phalke 2:7b2b268ea49c 36 int main(void)
Mahesh Phalke 2:7b2b268ea49c 37 {
Mahesh Phalke 2:7b2b268ea49c 38 /* Initialize the AD4130 IIO interface */
Mahesh Phalke 2:7b2b268ea49c 39 if (ad4130_iio_initialize()) {
Mahesh Phalke 2:7b2b268ea49c 40 printf("IIO initialization failure!!\r\n");
Mahesh Phalke 2:7b2b268ea49c 41 }
Mahesh Phalke 2:7b2b268ea49c 42
Mahesh Phalke 2:7b2b268ea49c 43 while (1) {
Mahesh Phalke 2:7b2b268ea49c 44 /* Monitor the IIO client events */
Mahesh Phalke 2:7b2b268ea49c 45 ad4130_iio_event_handler();
Mahesh Phalke 2:7b2b268ea49c 46 }
Mahesh Phalke 2:7b2b268ea49c 47 }