Initial Commit

Dependencies:   platform_drivers AD5592R adi_console_menu

Committer:
EndaKilgarriff
Date:
Mon Jun 22 22:27:26 2020 +0000
Revision:
3:ae77c589c81a
Parent:
1:e84d8d51cd51
Add License file

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EndaKilgarriff 1:e84d8d51cd51 1 /*!
EndaKilgarriff 1:e84d8d51cd51 2 *****************************************************************************
EndaKilgarriff 1:e84d8d51cd51 3 @file: main.c
EndaKilgarriff 1:e84d8d51cd51 4 @brief: main module for AD5592R application interface
EndaKilgarriff 1:e84d8d51cd51 5 @details: main module for AD5592R application interface
EndaKilgarriff 1:e84d8d51cd51 6
EndaKilgarriff 1:e84d8d51cd51 7 -----------------------------------------------------------------------------
EndaKilgarriff 1:e84d8d51cd51 8 Copyright (c) 2020 Analog Devices, Inc.
EndaKilgarriff 1:e84d8d51cd51 9 All rights reserved.
EndaKilgarriff 1:e84d8d51cd51 10
EndaKilgarriff 1:e84d8d51cd51 11 This software is proprietary to Analog Devices, Inc. and its licensors.
EndaKilgarriff 1:e84d8d51cd51 12 By using this software you agree to the terms of the associated
EndaKilgarriff 1:e84d8d51cd51 13 Analog Devices Software License Agreement.
EndaKilgarriff 1:e84d8d51cd51 14 *****************************************************************************/
EndaKilgarriff 1:e84d8d51cd51 15
EndaKilgarriff 1:e84d8d51cd51 16 /******************************************************************************/
EndaKilgarriff 1:e84d8d51cd51 17 /***************************** Include Files **********************************/
EndaKilgarriff 1:e84d8d51cd51 18 /******************************************************************************/
EndaKilgarriff 1:e84d8d51cd51 19 #include <stdio.h>
EndaKilgarriff 1:e84d8d51cd51 20 #include "ad5592r_console_app.h"
EndaKilgarriff 1:e84d8d51cd51 21
EndaKilgarriff 1:e84d8d51cd51 22 /******************************************************************************/
EndaKilgarriff 1:e84d8d51cd51 23 /***************************** Function Definitions **********************************/
EndaKilgarriff 1:e84d8d51cd51 24 /******************************************************************************/
EndaKilgarriff 1:e84d8d51cd51 25
EndaKilgarriff 1:e84d8d51cd51 26 /* @brief Main function
EndaKilgarriff 1:e84d8d51cd51 27 *
EndaKilgarriff 1:e84d8d51cd51 28 * @param None
EndaKilgarriff 1:e84d8d51cd51 29 *
EndaKilgarriff 1:e84d8d51cd51 30 * @return SUCCESS(0), FAILURE (Negative)
EndaKilgarriff 1:e84d8d51cd51 31 */
EndaKilgarriff 1:e84d8d51cd51 32 int main()
EndaKilgarriff 1:e84d8d51cd51 33 {
EndaKilgarriff 1:e84d8d51cd51 34 int32_t status;
EndaKilgarriff 1:e84d8d51cd51 35
EndaKilgarriff 1:e84d8d51cd51 36 if((status = ad5592r_app_initalization()) < 0) {
EndaKilgarriff 1:e84d8d51cd51 37 printf(EOL "Error setting up device (%d)" EOL, status);
EndaKilgarriff 1:e84d8d51cd51 38 adi_press_any_key_to_continue();
EndaKilgarriff 1:e84d8d51cd51 39 }
EndaKilgarriff 1:e84d8d51cd51 40
EndaKilgarriff 1:e84d8d51cd51 41 /* Infinite loop */
EndaKilgarriff 1:e84d8d51cd51 42 while (1) {
EndaKilgarriff 1:e84d8d51cd51 43 // display the console menu for the AD7124 application
EndaKilgarriff 1:e84d8d51cd51 44 adi_do_console_menu(&ad5592r_main_menu);
EndaKilgarriff 1:e84d8d51cd51 45 }
EndaKilgarriff 1:e84d8d51cd51 46
EndaKilgarriff 1:e84d8d51cd51 47 // this line should not be reached
EndaKilgarriff 1:e84d8d51cd51 48 return - 1;
EndaKilgarriff 1:e84d8d51cd51 49 }