]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/MessageQCopyApp.c
Merge remote-tracking branch 'vincent/3.00.00.11_eng' into tmp
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / samples / hlos / MessageQCopy / MessageQCopyApp.c
1 /*
2  *  @file   MessageQCopyApp.c
3  *
4  *  @brief      Sample application for MessageQCopy module
5  *
6  *
7  *  @ver        02.00.00.53_alpha2
8  *
9  *  ============================================================================
10  *
11  *  Copyright (c) 2008-2009, Texas Instruments Incorporated
12  *
13  *  Redistribution and use in source and binary forms, with or without
14  *  modification, are permitted provided that the following conditions
15  *  are met:
16  *
17  *  *  Redistributions of source code must retain the above copyright
18  *     notice, this list of conditions and the following disclaimer.
19  *
20  *  *  Redistributions in binary form must reproduce the above copyright
21  *     notice, this list of conditions and the following disclaimer in the
22  *     documentation and/or other materials provided with the distribution.
23  *
24  *  *  Neither the name of Texas Instruments Incorporated nor the names of
25  *     its contributors may be used to endorse or promote products derived
26  *     from this software without specific prior written permission.
27  *
28  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
32  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *  Contact information for paper mail:
40  *  Texas Instruments
41  *  Post Office Box 655303
42  *  Dallas, Texas 75265
43  *  Contact information:
44  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
45  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
46  *  ============================================================================
47  *
48  */
51 /* Standard headers */
52 #include <ti/syslink/Std.h>
54 /* OSAL & Utils headers */
55 #include <ti/syslink/utils/Trace.h>
56 #include <ti/syslink/utils/OsalPrint.h>
57 #include <ti/syslink/utils/Memory.h>
58 #include <ti/syslink/utils/String.h>
60 /* Module level headers */
61 #include <ti/ipc/MessageQCopy.h>
62 #include <_MessageQCopy.h>
64 #include "MessageQCopyApp.h"
66 #if defined (__cplusplus)
67 extern "C" {
68 #endif /* defined (__cplusplus) */
70 /** ============================================================================
72  *  Globals
73  *  ============================================================================
74  */
77 /** ============================================================================
78  *  Functions
79  *  ============================================================================
80  */
82 /*!
83  *  @brief  Function to execute the startup for MessageQCopyApp sample application
84  *
85  *  @sa     MessageQCopyApp_shutdown
86  */
87 Int
88 MessageQCopyApp_startup (Void)
89 {
90     Int32                status  = 0;
92     Osal_printf ("Entered MessageQCopyApp_startup\n");
94     status = MessageQCopy_setup (NULL);
96     Osal_printf ("Leaving MessageQCopyApp_startup. Status [0x%x]\n", status);
98     return (status);
99 }
102 /*!
103  *  @brief  Function to execute the MessageQCopyApp sample application
104  *
105  */
106 Int
107 MessageQCopyApp_execute (testNo)
109     Int status = MessageQCopy_S_SUCCESS;
111     Osal_printf ("Entered MessageQCopyApp_execute\n");
113     status = MessageQCopy_runtest (testNo);
115     Osal_printf ("Leaving MessageQCopyApp_execute. Status [0x%x]\n", status);
117     return(status);
121 /*!
122  *  @brief  Function to execute the shutdown for MessageQCopyApp sample application
123  *
124  *  @sa     MessageQCopyApp_startup
125  */
126 Int
127 MessageQCopyApp_shutdown (Void)
129     Int status = MessageQCopy_S_SUCCESS;
131     Osal_printf ("Entered MessageQCopyApp_shutdown\n");
133     status = MessageQCopy_destroy();
135     Osal_printf ("Leaving MessageQCopyApp_shutdown. Status [0x%x]\n", status);
137     return(status);