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: sdp_k1_sdram
app/main.c@2:007533849deb, 2022-07-21 (annotated)
- Committer:
- Mahesh Phalke
- Date:
- Thu Jul 21 16:45:24 2022 +0530
- Revision:
- 2:007533849deb
Initial firmware commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Mahesh Phalke |
2:007533849deb | 1 | /***************************************************************************//** |
| Mahesh Phalke |
2:007533849deb | 2 | * @file main.c |
| Mahesh Phalke |
2:007533849deb | 3 | * @brief Main interface for AD7689 IIO firmware application |
| Mahesh Phalke |
2:007533849deb | 4 | ******************************************************************************** |
| Mahesh Phalke |
2:007533849deb | 5 | * Copyright (c) 2021-22 Analog Devices, Inc. |
| Mahesh Phalke |
2:007533849deb | 6 | * All rights reserved. |
| Mahesh Phalke |
2:007533849deb | 7 | * |
| Mahesh Phalke |
2:007533849deb | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
| Mahesh Phalke |
2:007533849deb | 9 | * By using this software you agree to the terms of the associated |
| Mahesh Phalke |
2:007533849deb | 10 | * Analog Devices Software License Agreement. |
| Mahesh Phalke |
2:007533849deb | 11 | *******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 12 | |
| Mahesh Phalke |
2:007533849deb | 13 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 14 | /***************************** Include Files **********************************/ |
| Mahesh Phalke |
2:007533849deb | 15 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 16 | |
| Mahesh Phalke |
2:007533849deb | 17 | #include <stdio.h> |
| Mahesh Phalke |
2:007533849deb | 18 | #include <stdint.h> |
| Mahesh Phalke |
2:007533849deb | 19 | |
| Mahesh Phalke |
2:007533849deb | 20 | #include "ad7689_iio.h" |
| Mahesh Phalke |
2:007533849deb | 21 | #include "no_os_error.h" |
| Mahesh Phalke |
2:007533849deb | 22 | |
| Mahesh Phalke |
2:007533849deb | 23 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 24 | /********************* Macros and Constants Definition ************************/ |
| Mahesh Phalke |
2:007533849deb | 25 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 26 | |
| Mahesh Phalke |
2:007533849deb | 27 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 28 | /******************** Variables and User Defined Data Types *******************/ |
| Mahesh Phalke |
2:007533849deb | 29 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 30 | |
| Mahesh Phalke |
2:007533849deb | 31 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 32 | /************************** Functions Declarations ****************************/ |
| Mahesh Phalke |
2:007533849deb | 33 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 34 | |
| Mahesh Phalke |
2:007533849deb | 35 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 36 | /************************** Functions Definitions *****************************/ |
| Mahesh Phalke |
2:007533849deb | 37 | /******************************************************************************/ |
| Mahesh Phalke |
2:007533849deb | 38 | |
| Mahesh Phalke |
2:007533849deb | 39 | /* @brief Main function |
| Mahesh Phalke |
2:007533849deb | 40 | * @details This is a main entry function for AD7689 IIO application |
| Mahesh Phalke |
2:007533849deb | 41 | */ |
| Mahesh Phalke |
2:007533849deb | 42 | int main(void) |
| Mahesh Phalke |
2:007533849deb | 43 | { |
| Mahesh Phalke |
2:007533849deb | 44 | /* Initialize the AD7689 IIO interface */ |
| Mahesh Phalke |
2:007533849deb | 45 | if (ad7689_iio_initialize()) { |
| Mahesh Phalke |
2:007533849deb | 46 | printf("IIO initialization failure!!\r\n"); |
| Mahesh Phalke |
2:007533849deb | 47 | } |
| Mahesh Phalke |
2:007533849deb | 48 | |
| Mahesh Phalke |
2:007533849deb | 49 | while (1) { |
| Mahesh Phalke |
2:007533849deb | 50 | /* Monitor the IIO client events */ |
| Mahesh Phalke |
2:007533849deb | 51 | ad7689_iio_event_handler(); |
| Mahesh Phalke |
2:007533849deb | 52 | } |
| Mahesh Phalke |
2:007533849deb | 53 | } |