Analog Devices / Mbed OS EVAL-AD5592R

Dependencies:   adi_console_menu platform_drivers

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.c Source File

main.c

Go to the documentation of this file.
00001 /*!
00002  *****************************************************************************
00003   @file:  main.c
00004   @brief: main module for AD5592R application interface
00005   @details: main module for AD5592R application interface
00006 
00007  -----------------------------------------------------------------------------
00008  Copyright (c) 2020 Analog Devices, Inc.
00009  All rights reserved.
00010 
00011  This software is proprietary to Analog Devices, Inc. and its licensors.
00012  By using this software you agree to the terms of the associated
00013  Analog Devices Software License Agreement.
00014 *****************************************************************************/
00015 
00016 /******************************************************************************/
00017 /***************************** Include Files **********************************/
00018 /******************************************************************************/
00019 #include <stdio.h>
00020 #include "ad5592r_console_app.h"
00021 
00022 /******************************************************************************/
00023 /***************************** Function Definitions **********************************/
00024 /******************************************************************************/
00025 
00026 /* @brief  Main function
00027  *
00028  * @param  None
00029  *
00030  * @return SUCCESS(0), FAILURE (Negative)
00031  */
00032 int main()
00033 {
00034     int32_t status;
00035 
00036     if((status = ad5592r_app_initalization()) < 0) {
00037         printf(EOL "Error setting up device (%d)" EOL, status);
00038         adi_press_any_key_to_continue();
00039     }
00040 
00041     /* Infinite loop */
00042     while (1) {
00043         // display the console menu for the AD7124 application
00044         adi_do_console_menu(&ad5592r_main_menu);
00045     }
00046 
00047     // this line should not be reached
00048     return - 1;
00049 }