Pratyush Mallick / Mbed OS nano_dac
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 
00005   @brief: main module for nanodac application interface
00006 
00007   @details: main module for nanodac application interface
00008 
00009  -----------------------------------------------------------------------------
00010  Copyright (c) 2020 Analog Devices, Inc.
00011  All rights reserved.
00012 
00013  This software is proprietary to Analog Devices, Inc. and its licensors.
00014  By using this software you agree to the terms of the associated
00015  Analog Devices Software License Agreement.
00016 ******************************************************************************/
00017 
00018 /******************************************************************************/
00019 /***************************** Include Files **********************************/
00020 /******************************************************************************/
00021 
00022 #include <stdio.h>
00023 #include "nanodac_console_app.h"
00024 
00025 /******************************************************************************/
00026 /************************ Functions Definitions *******************************/
00027 /******************************************************************************/
00028 
00029 /* @brief  Main function
00030  *
00031  * @param  None
00032  *
00033  * @return SUCCESS(0), FAILURE (Negative)
00034  */
00035 int main()
00036 {
00037     int32_t setupResult;
00038 
00039     /* Initialize the nanodac application */
00040     if ((setupResult = nanodac_app_initialize()) < 0) {
00041         printf("Error setting up nanodac (%ld)\r\n\r\n", setupResult);
00042     }
00043 
00044     /* Infinite loop */
00045     while (1) {
00046         // display the console menu for the nanodac application
00047         adi_do_console_menu(&nanodac_main_menu);
00048     }
00049 
00050     // this line should not be reached
00051     return - 1;
00052 }