blob: c7cfdeb7f2771474d5d155f2b01a90f61b2c96f6 [file] [log] [blame]
Sridhar Parasurambf391322015-01-23 09:29:07 -08001/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
5met:
6 * Redistributions of source code must retain the above copyright
7 notice, this list of conditions and the following disclaimer.
8 * Redistributions in binary form must reproduce the above
9 copyright notice, this list of conditions and the following
10 disclaimer in the documentation and/or other materials provided
11 with the distribution.
12 * Neither the name of The Linux Foundation nor the names of its
13 contributors may be used to endorse or promote products derived
14 from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#ifndef GLINK_RPM_H
30#define GLINK_RPM_H
31
32/**
33 * @file glink_rpm.h
34 *
35 * Public API for the GLink-RPM
36 */
37
38/** \defgroup glink GLink
39 * \ingroup SMD
40 *
41 * GLink reliable, in-order, datagram-based interprocessor communication
42 * over a set of supported transport (Shared Memory, UART, BAM, HSIC)
43 *
44 * All ports preserve message boundaries across the interprocessor channel; one
45 * write into the port exactly matches one read from the port.
46 */
47/*@{*/
48
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54#include "glink_os_utils.h"
55
56/*===========================================================================
57 INCLUDE FILES
58===========================================================================*/
59
60/*================= RESTRICTED API ==========================*/
61/** Note that these API are only supported for RPM client. No other
62 * client may use these as a generic API as the underlying implementation
63 * works only for RPM ports */
64
65
66/**
67 * This API allows the RPM client to poll the transport for any new data
68 * that might have come in. It would *usually* be used when incoming interrupts
69 * are disabled.
70 *
71 * @param[in] handle GLink handle associated with the logical channel
72 *
73 * @return Standard GLink error codes
74 *
75 * @sideeffects None
76 */
77glink_err_type glink_rpm_rx_poll
78(
79 glink_handle_type handle
80);
81
82/**
83 * This API allows the RPM client to mask/unmask rx interrupts
84 *
85 * @param[in] handle GLink handle associated with the logical channel
86 *
87 * @param[in] mask Whether to mask or un-mask the incoming interrupt
88 *
89 * @param[in] platform_struct Any platform specific into that transport may
90 require
91 *
92 * @return Standard GLink error codes
93 *
94 * @sideeffects None
95 */
96glink_err_type glink_rpm_mask_rx_interrupt
97(
98 glink_handle_type handle,
99 boolean mask,
100 void *platform_struct
101);
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif //GLINK_RPM_H
108