Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: adi_console_menu platform_drivers
app/main.c@4:9fa40df9bf93, 2021-08-03 (annotated)
- Committer:
- Kjansen
- Date:
- Tue Aug 03 12:18:40 2021 +0100
- Revision:
- 4:9fa40df9bf93
- Parent:
- 1:e84d8d51cd51
No-OS Adoption Changes:
* Updated the .lib files for adoption of no-OS repository as-is.
* Replaced platform_drivers.h with required header files.
* Updated the copyright year.
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?
| User | Revision | Line number | New 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 | } |