Example Program for EVAL-AD7606

Dependencies:   platform_drivers

Committer:
Kjansen
Date:
Tue Aug 03 11:54:49 2021 +0100
Revision:
7:054dbd5e1f45
Parent:
1:819ac9aa5667
Modified the ADC data capture module to remove dependancy on type of ADC and it's specific operations

Who changed what in which revision?

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