Example program for EVAL-AD568x and EVAL-AD569x.
Dependencies: adi_console_menu platform_drivers
EVAL-AD568x-AD569x
This nanoDAC+ Mbed support software can be used as a starting point for developing your own firmware that targets Analog Devices nanoDAC+ products in your own environment. The software is configurable for your exact product within the nanoDAC+ family. See the user-guide for full instructions.
app/main.c@8:f38c1afe205b, 2020-08-03 (annotated)
- Committer:
- mahphalke
- Date:
- Mon Aug 03 10:39:17 2020 +0000
- Revision:
- 8:f38c1afe205b
- Parent:
- 5:78877c8a97c8
Corrected arduino pin mapping
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mahphalke | 5:78877c8a97c8 | 1 | /*! |
mahphalke | 5:78877c8a97c8 | 2 | ***************************************************************************** |
mahphalke | 5:78877c8a97c8 | 3 | @file: main.c |
mahphalke | 5:78877c8a97c8 | 4 | |
mahphalke | 5:78877c8a97c8 | 5 | @brief: main module for nanodac application interface |
mahphalke | 5:78877c8a97c8 | 6 | |
mahphalke | 5:78877c8a97c8 | 7 | @details: main module for nanodac application interface |
mahphalke | 5:78877c8a97c8 | 8 | |
mahphalke | 5:78877c8a97c8 | 9 | ----------------------------------------------------------------------------- |
mahphalke | 5:78877c8a97c8 | 10 | Copyright (c) 2020 Analog Devices, Inc. |
mahphalke | 5:78877c8a97c8 | 11 | All rights reserved. |
mahphalke | 5:78877c8a97c8 | 12 | |
mahphalke | 5:78877c8a97c8 | 13 | This software is proprietary to Analog Devices, Inc. and its licensors. |
mahphalke | 5:78877c8a97c8 | 14 | By using this software you agree to the terms of the associated |
mahphalke | 5:78877c8a97c8 | 15 | Analog Devices Software License Agreement. |
mahphalke | 5:78877c8a97c8 | 16 | ******************************************************************************/ |
mahphalke | 5:78877c8a97c8 | 17 | |
mahphalke | 5:78877c8a97c8 | 18 | /******************************************************************************/ |
mahphalke | 5:78877c8a97c8 | 19 | /***************************** Include Files **********************************/ |
mahphalke | 5:78877c8a97c8 | 20 | /******************************************************************************/ |
mahphalke | 5:78877c8a97c8 | 21 | |
mahphalke | 5:78877c8a97c8 | 22 | #include <stdio.h> |
mahphalke | 5:78877c8a97c8 | 23 | #include "nanodac_console_app.h" |
mahphalke | 5:78877c8a97c8 | 24 | |
mahphalke | 5:78877c8a97c8 | 25 | /******************************************************************************/ |
mahphalke | 5:78877c8a97c8 | 26 | /************************ Functions Definitions *******************************/ |
mahphalke | 5:78877c8a97c8 | 27 | /******************************************************************************/ |
mahphalke | 5:78877c8a97c8 | 28 | |
mahphalke | 5:78877c8a97c8 | 29 | /* @brief Main function |
mahphalke | 5:78877c8a97c8 | 30 | * |
mahphalke | 5:78877c8a97c8 | 31 | * @param None |
mahphalke | 5:78877c8a97c8 | 32 | * |
mahphalke | 5:78877c8a97c8 | 33 | * @return SUCCESS(0), FAILURE (Negative) |
mahphalke | 5:78877c8a97c8 | 34 | */ |
mahphalke | 5:78877c8a97c8 | 35 | int main() |
mahphalke | 5:78877c8a97c8 | 36 | { |
mahphalke | 5:78877c8a97c8 | 37 | int32_t setupResult; |
mahphalke | 5:78877c8a97c8 | 38 | |
mahphalke | 5:78877c8a97c8 | 39 | /* Initialize the nanodac application */ |
mahphalke | 5:78877c8a97c8 | 40 | if ((setupResult = nanodac_app_initialize()) < 0) { |
mahphalke | 5:78877c8a97c8 | 41 | printf("Error setting up nanodac (%ld)\r\n\r\n", setupResult); |
mahphalke | 5:78877c8a97c8 | 42 | } |
mahphalke | 5:78877c8a97c8 | 43 | |
mahphalke | 5:78877c8a97c8 | 44 | /* Infinite loop */ |
mahphalke | 5:78877c8a97c8 | 45 | while (1) { |
mahphalke | 5:78877c8a97c8 | 46 | // display the console menu for the nanodac application |
mahphalke | 5:78877c8a97c8 | 47 | adi_do_console_menu(&nanodac_main_menu); |
mahphalke | 5:78877c8a97c8 | 48 | } |
mahphalke | 5:78877c8a97c8 | 49 | |
mahphalke | 5:78877c8a97c8 | 50 | // this line should not be reached |
mahphalke | 5:78877c8a97c8 | 51 | return - 1; |
mahphalke | 5:78877c8a97c8 | 52 | } |