Pratyush Mallick
/
nano_dac
this is testing
app/main.c@0:e8a1ba50c46b, 2021-01-14 (annotated)
- Committer:
- pmallick
- Date:
- Thu Jan 14 19:12:57 2021 +0530
- Revision:
- 0:e8a1ba50c46b
this is testing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pmallick | 0:e8a1ba50c46b | 1 | /*! |
pmallick | 0:e8a1ba50c46b | 2 | ***************************************************************************** |
pmallick | 0:e8a1ba50c46b | 3 | @file: main.c |
pmallick | 0:e8a1ba50c46b | 4 | |
pmallick | 0:e8a1ba50c46b | 5 | @brief: main module for nanodac application interface |
pmallick | 0:e8a1ba50c46b | 6 | |
pmallick | 0:e8a1ba50c46b | 7 | @details: main module for nanodac application interface |
pmallick | 0:e8a1ba50c46b | 8 | |
pmallick | 0:e8a1ba50c46b | 9 | ----------------------------------------------------------------------------- |
pmallick | 0:e8a1ba50c46b | 10 | Copyright (c) 2020 Analog Devices, Inc. |
pmallick | 0:e8a1ba50c46b | 11 | All rights reserved. |
pmallick | 0:e8a1ba50c46b | 12 | |
pmallick | 0:e8a1ba50c46b | 13 | This software is proprietary to Analog Devices, Inc. and its licensors. |
pmallick | 0:e8a1ba50c46b | 14 | By using this software you agree to the terms of the associated |
pmallick | 0:e8a1ba50c46b | 15 | Analog Devices Software License Agreement. |
pmallick | 0:e8a1ba50c46b | 16 | ******************************************************************************/ |
pmallick | 0:e8a1ba50c46b | 17 | |
pmallick | 0:e8a1ba50c46b | 18 | /******************************************************************************/ |
pmallick | 0:e8a1ba50c46b | 19 | /***************************** Include Files **********************************/ |
pmallick | 0:e8a1ba50c46b | 20 | /******************************************************************************/ |
pmallick | 0:e8a1ba50c46b | 21 | |
pmallick | 0:e8a1ba50c46b | 22 | #include <stdio.h> |
pmallick | 0:e8a1ba50c46b | 23 | #include "nanodac_console_app.h" |
pmallick | 0:e8a1ba50c46b | 24 | |
pmallick | 0:e8a1ba50c46b | 25 | /******************************************************************************/ |
pmallick | 0:e8a1ba50c46b | 26 | /************************ Functions Definitions *******************************/ |
pmallick | 0:e8a1ba50c46b | 27 | /******************************************************************************/ |
pmallick | 0:e8a1ba50c46b | 28 | |
pmallick | 0:e8a1ba50c46b | 29 | /* @brief Main function |
pmallick | 0:e8a1ba50c46b | 30 | * |
pmallick | 0:e8a1ba50c46b | 31 | * @param None |
pmallick | 0:e8a1ba50c46b | 32 | * |
pmallick | 0:e8a1ba50c46b | 33 | * @return SUCCESS(0), FAILURE (Negative) |
pmallick | 0:e8a1ba50c46b | 34 | */ |
pmallick | 0:e8a1ba50c46b | 35 | int main() |
pmallick | 0:e8a1ba50c46b | 36 | { |
pmallick | 0:e8a1ba50c46b | 37 | int32_t setupResult; |
pmallick | 0:e8a1ba50c46b | 38 | |
pmallick | 0:e8a1ba50c46b | 39 | /* Initialize the nanodac application */ |
pmallick | 0:e8a1ba50c46b | 40 | if ((setupResult = nanodac_app_initialize()) < 0) { |
pmallick | 0:e8a1ba50c46b | 41 | printf("Error setting up nanodac (%ld)\r\n\r\n", setupResult); |
pmallick | 0:e8a1ba50c46b | 42 | } |
pmallick | 0:e8a1ba50c46b | 43 | |
pmallick | 0:e8a1ba50c46b | 44 | /* Infinite loop */ |
pmallick | 0:e8a1ba50c46b | 45 | while (1) { |
pmallick | 0:e8a1ba50c46b | 46 | // display the console menu for the nanodac application |
pmallick | 0:e8a1ba50c46b | 47 | adi_do_console_menu(&nanodac_main_menu); |
pmallick | 0:e8a1ba50c46b | 48 | } |
pmallick | 0:e8a1ba50c46b | 49 | |
pmallick | 0:e8a1ba50c46b | 50 | // this line should not be reached |
pmallick | 0:e8a1ba50c46b | 51 | return - 1; |
pmallick | 0:e8a1ba50c46b | 52 | } |