Example program for EVAL-AD5770R

Dependencies:   adi_console_menu platform_drivers

Committer:
mahphalke
Date:
Wed Feb 24 12:18:35 2021 +0000
Revision:
4:ddef2e8cb4f7
Parent:
1:63c505e13da4
Child:
5:f3d7cf95cd8f
Changed Mbed-OS revision to 5.15.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbradley 1:63c505e13da4 1 /*!
mbradley 1:63c505e13da4 2 *****************************************************************************
mbradley 1:63c505e13da4 3 * @file: main.c
mbradley 1:63c505e13da4 4 * @brief:
mbradley 1:63c505e13da4 5 *-----------------------------------------------------------------------------
mbradley 1:63c505e13da4 6 *
mbradley 1:63c505e13da4 7 Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved.
mbradley 1:63c505e13da4 8
mbradley 1:63c505e13da4 9 This software is proprietary to Analog Devices, Inc. and its licensors.
mbradley 1:63c505e13da4 10 By using this software you agree to the terms of the associated
mbradley 1:63c505e13da4 11 Analog Devices Software License Agreement.
mbradley 1:63c505e13da4 12 ******************************************************************************/
mbradley 1:63c505e13da4 13
mbradley 1:63c505e13da4 14 #include <stdio.h>
mbradley 1:63c505e13da4 15 #include <ctype.h>
mbradley 1:63c505e13da4 16
mbradley 1:63c505e13da4 17 #include "platform_drivers.h"
mbradley 1:63c505e13da4 18
mbradley 1:63c505e13da4 19 #include "adi_console_menu.h"
mbradley 1:63c505e13da4 20 #include "ad5770r_console_app.h"
mbradley 1:63c505e13da4 21
mbradley 1:63c505e13da4 22 //Variables declaration
mbradley 1:63c505e13da4 23
mbradley 1:63c505e13da4 24
mbradley 1:63c505e13da4 25 // Function Definitions
mbradley 1:63c505e13da4 26
mbradley 1:63c505e13da4 27 int main (void)
mbradley 1:63c505e13da4 28 {
mbradley 1:63c505e13da4 29 int32_t setupResult;
mbradley 1:63c505e13da4 30
mbradley 1:63c505e13da4 31 /* Initialize the AD7124 application before the main loop */
mbradley 1:63c505e13da4 32 if ((setupResult = ad5770r_app_initialize()) < 0) {
mbradley 1:63c505e13da4 33 printf("Error setting up AD5770R (%d)" EOL EOL, setupResult);
mbradley 1:63c505e13da4 34 }
mbradley 1:63c505e13da4 35
mbradley 1:63c505e13da4 36 while(true) {
mbradley 1:63c505e13da4 37 adi_do_console_menu(&ad5770r_main_menu);
mbradley 1:63c505e13da4 38 }
mbradley 1:63c505e13da4 39
mbradley 1:63c505e13da4 40 // this line should never be reached
mbradley 1:63c505e13da4 41 return (FAILURE);
mbradley 1:63c505e13da4 42 }