Example program for EVAL-AD5770R

Dependencies:   adi_console_menu platform_drivers

Committer:
Kjansen
Date:
Tue Aug 03 17:34:58 2021 +0100
Revision:
5:f3d7cf95cd8f
Parent:
1:63c505e13da4
No-OS Adoption Changes:

* Updated the .lib files for adoption of no-OS repository as-is.
* Replaced platform_drivers.h with required header files.
* Updated the copyright year.
* Indentation fixes.

Mbed OS update changes:
1) Added the mbed_app.json file with custom parameters.
2) Updated the mbed-os version to 6.8.0

Updated the readme file.

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 *
Kjansen 5:f3d7cf95cd8f 7 Copyright (c) 2020-2021 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
Kjansen 5:f3d7cf95cd8f 17 #include "error.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 }