]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/ipc/tests/Mx.h
tests: gatempapp: update sr0 addresses to align with kernel dts
[ipc/ipcdev.git] / packages / ti / ipc / tests / Mx.h
1 /*
2  * Copyright (c) 2012-2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /** ============================================================================
34  *  @file       Mx.h
35  *
36  *  @brief      Example of a host-side module which uses MmRpc to
37  *              invoke functions on a remote processor.
38  *
39  *  ============================================================================
40  */
42 #ifndef Mx__include
43 #define Mx__include
45 #include <stddef.h>
46 #include <stdint.h>
48 #if defined(__cplusplus)
49 extern "C" {
50 #endif
52 /*!
53  *  @brief      Operation is successful
54  */
55 #define Mx_S_SUCCESS (0)
57 /*!
58  *  @brief      Operation failed
59  */
60 #define Mx_E_FAIL (-1)
62 /*!
63  *  @brief      Compute structure
64  */
65 typedef struct {
66     uint32_t    coef;
67     int         key;
68     int         size;
69     uint32_t *  inBuf;
70     uint32_t *  outBuf;
71 } Mx_Compute;
73 /*!
74  *  @brief      Initialize the module, must be called first
75  */
76 int Mx_initialize(UInt16 procId);
78 /*!
79  *  @brief      Finalize the module, must be called last
80  */
81 void Mx_finalize(void);
83 /*!
84  *  @brief      Sample function which multiplies argument by three
85  */
86 int32_t Mx_triple(uint32_t a);
88 /*!
89  *  @brief      Sample function which addes two arguments
90  */
91 int32_t Mx_add(int32_t a, int32_t b);
93 #if defined(IPC_BUILDOS_QNX)
94 /*!
95  *  @brief      Sample function which has pointer parameter to
96  *              a structure with two embedded pointers.
97  *              QnX version.
98  */
99 int32_t Mx_compute_QnX(Mx_Compute *compute);
101 #else /* Linux */
103 /*!
104  *  @brief      Sample function which has pointer parameter (DMA_BUF) to
105  *              a structure with two embedded pointers.
106  *              Linux version.
107  */
108 int32_t Mx_compute_Linux(Mx_Compute *compute, int fd, int fdIn, int fdOut);
110 #endif
112 #if defined(__cplusplus)
114 #endif
115 #endif /* Mx__include */