1 /**
2 * @file _MessageQCopy.h
3 *
4 * @brief Defines MessageQCopy module.
5 *
6 *
7 * @ver 02.00.00.46_alpha1
8 *
9 * ============================================================================
10 *
11 * Copyright (c) 2011-2012, 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 #ifndef MESSAGEQCOPY_H_0xded2
52 #define MESSAGEQCOPY_H_0xded2
54 /* Standard headers */
55 #include <_MultiProc.h>
57 #if defined (__cplusplus)
58 extern "C" {
59 #endif
62 /*!
63 * @def MessageQCopy_MODULEID
64 * @brief Unique module ID.
65 */
66 #define MessageQCopy_MODULEID (0xded2)
68 /*! Version setting */
69 #define MessageQCopy_HEADERVERSION (UInt) 0x2000
71 /*!
72 * @brief Structure defining config parameters for the MessageQCopy module.
73 */
74 typedef struct MessageQCopy_Config_tag {
75 UInt32 intId;
76 /*!< Mailbox interrupt ID */
77 } MessageQCopy_Config;
79 /* =============================================================================
80 * APIs
81 * =============================================================================
82 */
83 /*!
84 * @brief Function to get the default configuration for the MessageQCopy
85 * module.
86 *
87 * This function can be called by the application to get their
88 * configuration parameter to MessageQCopy_setup filled in by the
89 * MessageQCopy module with the default parameters. If the user
90 * does not wish to make any change in the default parameters, this
91 * API is not required to be called.
92 *
93 * @param cfg Pointer to the MessageQCopy module configuration
94 * structure in which the default config is to be returned.
95 *
96 * @sa MessageQCopy_setup
97 */
98 Void MessageQCopy_getConfig (MessageQCopy_Config * cfg);
100 /*!
101 * @brief Function to setup the MessageQCopy module.
102 *
103 * This function sets up the MessageQCopy module. This function
104 * must be called before any other instance-level APIs can be
105 * invoked. Module-level configuration needs to be provided to this
106 * function. If the user wishes to change some specific config
107 * parameters, then MessageQCopy_getConfig can be called to get the
108 * configuration filled with the default values. After this, only
109 * the required configuration values can be changed. If the user
110 * does not wish to make any change in the default parameters, the
111 * application can simply call MessageQCopy with NULL parameters.
112 * The default parameters would get automatically used.
113 *
114 * @param cfg Optional MessageQCopy module configuration. If provided as
115 * NULL, default configuration is used.
116 *
117 * @sa MessageQCopy_destroy
118 * GateSpinlock_create
119 * Memory_alloc
120 */
121 Int MessageQCopy_setup (const MessageQCopy_Config * cfg);
123 /* Function to destroy the MessageQCopy module. */
124 Int MessageQCopy_destroy (void);
126 /* Calls the SetupProxy to setup the MessageQ transports. */
127 Int
128 MessageQCopy_attach (UInt16 remoteProcId, Ptr sharedAddr, UInt16 startId);
130 /* Calls the SetupProxy to detach the MessageQ transports. */
131 Int
132 MessageQCopy_detach (UInt16 remoteProcId);
134 /* Function to run the MessageQCopy test. */
135 Int MessageQCopy_runtest (UInt32 testNo);
137 #if defined (__cplusplus)
138 }
139 #endif /* defined (__cplusplus) */
142 #endif /* MESSAGEQCOPY_H_0xded2 */