Example program for AD717x and AD411x family of products.

Dependencies:   adi_console_menu platform_drivers

Committer:
Kjansen
Date:
Tue Aug 03 12:23:16 2021 +0100
Revision:
8:2e0e9b520392
Parent:
1:48914f9593f1
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.

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
mahphalke 1:48914f9593f1 1 /*!
mahphalke 1:48914f9593f1 2 *****************************************************************************
mahphalke 1:48914f9593f1 3 @file: main.c
mahphalke 1:48914f9593f1 4
mahphalke 1:48914f9593f1 5 @brief: main module for AD717x/AD411x application interface
mahphalke 1:48914f9593f1 6
mahphalke 1:48914f9593f1 7 @details: This module initialize the device and display the console menus
mahphalke 1:48914f9593f1 8
mahphalke 1:48914f9593f1 9 -----------------------------------------------------------------------------
mahphalke 1:48914f9593f1 10 Copyright (c) 2020 Analog Devices, Inc.
mahphalke 1:48914f9593f1 11 All rights reserved.
mahphalke 1:48914f9593f1 12
mahphalke 1:48914f9593f1 13 This software is proprietary to Analog Devices, Inc. and its licensors.
mahphalke 1:48914f9593f1 14 By using this software you agree to the terms of the associated
mahphalke 1:48914f9593f1 15 Analog Devices Software License Agreement.
mahphalke 1:48914f9593f1 16 ******************************************************************************/
mahphalke 1:48914f9593f1 17
mahphalke 1:48914f9593f1 18 /******************************************************************************/
mahphalke 1:48914f9593f1 19 /***************************** Include Files **********************************/
mahphalke 1:48914f9593f1 20 /******************************************************************************/
mahphalke 1:48914f9593f1 21
mahphalke 1:48914f9593f1 22 #include <stdio.h>
mahphalke 1:48914f9593f1 23 #include "ad717x_console_app.h"
mahphalke 1:48914f9593f1 24
mahphalke 1:48914f9593f1 25 /******************************************************************************/
mahphalke 1:48914f9593f1 26 /************************ Functions Definitions *******************************/
mahphalke 1:48914f9593f1 27 /******************************************************************************/
mahphalke 1:48914f9593f1 28
mahphalke 1:48914f9593f1 29 /* @brief Main function
mahphalke 1:48914f9593f1 30 * @param None
mahphalke 1:48914f9593f1 31 * @return SUCCESS(0), FAILURE (Negative)
mahphalke 1:48914f9593f1 32 */
mahphalke 1:48914f9593f1 33 int main()
mahphalke 1:48914f9593f1 34 {
mahphalke 1:48914f9593f1 35 int32_t setupResult;
mahphalke 1:48914f9593f1 36
mahphalke 1:48914f9593f1 37 /* Initialize the AD717x/AD411x application */
mahphalke 1:48914f9593f1 38 if ((setupResult = ad717x_app_initialize()) < 0) {
mahphalke 1:48914f9593f1 39 printf("Error setting up AD717x (%ld)\r\n\r\n", setupResult);
mahphalke 1:48914f9593f1 40 }
mahphalke 1:48914f9593f1 41
mahphalke 1:48914f9593f1 42 /* Infinite loop */
mahphalke 1:48914f9593f1 43 while (1) {
mahphalke 1:48914f9593f1 44 // display the console menu for the AD717x/AD411x application
mahphalke 1:48914f9593f1 45 adi_do_console_menu(&ad717x_main_menu);
mahphalke 1:48914f9593f1 46 }
mahphalke 1:48914f9593f1 47
mahphalke 1:48914f9593f1 48 // this line should not be reached
mahphalke 1:48914f9593f1 49 return - 1;
mahphalke 1:48914f9593f1 50 }