This is an forked repository of EVAL-AD568x-AD569x for pushing the latest updates

Dependencies:   adi_console_menu platform_drivers

Committer:
pmallick
Date:
Thu Jul 15 15:28:39 2021 +0530
Revision:
9:26258dd48cec
Parent:
5:78877c8a97c8
No-OS Adoption Changes:

* Updated the .lib files for adoption of no-OS repository as-is.
* Replaced 'platform_drivers.h' with required header files.
* Added designated initializers for nanodac_init_params as the latest
spi_init_param, i2c_init_param, gpio_init_param in no-OS repository include a new field member
platform_ops.
* Added gpio_extra.h as the user might want to pass pinmode to the extra parameter
* The gpio_power_up_configuration() now returns the gpio power up status after setting up the GPIOs,
this ensures that any GPIO Power Up failure doesn't go up unchecked during initialization. Also removed
the gpio_direction_output() function, as this is already being done in the ad5686_init() function.
* Added a do-while for error handling in the nanodac_app_initialize() function.
* Updated the copyright year of the nanodac_console_app.c file

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 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 }