[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_1_eng / packages / ti / board / diag / framework / src / main.c
1 /**
2 * \file rtc_app_main.c
3 *
4 * \brief Example application main source file, which configures the RTC IP
5 * and executes the RTC timer use case.
6 */
8 /**
9 * \copyright Copyright (C) 2013 Texas Instruments Incorporated -
10 * http://www.ti.com/
11 */
13 /*
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 *
18 * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 *
21 * Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the
24 * distribution.
25 *
26 * Neither the name of Texas Instruments Incorporated nor the names of
27 * its contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 */
44 /* ========================================================================== */
45 /* Include Files */
46 /* ========================================================================== */
47 #include <stdio.h>
48 #include <ti/fs/fatfs/FATFS.h>
50 #include "framework.h"
51 #include "board.h"
53 #if defined(SOC_AM335x) || defined(SOC_AM437x)
54 FATFS_Handle fatfsHandle = NULL;
55 #endif
57 int main()
58 {
59 Board_initCfg boardCfg;
60 #if defined(SOC_AM335x) || defined(SOC_AM437x)
61 boardCfg = BOARD_INIT_MODULE_CLOCK |
62 BOARD_INIT_PINMUX_CONFIG |
63 BOARD_INIT_UART_STDIO;
64 #else
65 boardCfg = BOARD_INIT_UART_STDIO;
66 #endif
67 Board_init(boardCfg);
69 FATFS_init();
71 #if defined(SOC_AM335x) || defined(SOC_AM437x)
72 FATFS_open(0U, 0U, &fatfsHandle);
73 #else
74 FATFS_open(0U, 0U, NULL);
75 #endif
77 while(1)
78 {
79 DIAG_main();
80 }
82 return 0;
83 }