source: rtems/cpukit/include/rtems/rtems/dpmem.h @ 72a4a42

Last change on this file since 72a4a42 was 72a4a42, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 8, 2018 at 9:19:39 AM

rtems: Move internal structures to dpmemdata.h

Update #3598.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicDPMEM
5 *
6 * @brief Classic Dual Ported Memory Manager API
7 */
8
9/* COPYRIGHT (c) 1989-2008.
10 * On-Line Applications Research Corporation (OAR).
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef _RTEMS_RTEMS_DPMEM_H
18#define _RTEMS_RTEMS_DPMEM_H
19
20#include <rtems/rtems/types.h>
21#include <rtems/rtems/status.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 *  @defgroup ClassicDPMEM Dual Ported Memory
29 *
30 *  @ingroup ClassicRTEMS
31 *
32 *  This encapsulates functionality related to the
33 *  Classic API Dual Ported Memory Manager.
34 */
35/**@{*/
36
37/**
38 * @brief Creates a port into a dual-ported memory area.
39 *
40 * This routine implements the rtems_port_create directive. The port
41 * will have the name @a name. The port maps onto an area of dual ported
42 * memory of length bytes which has internal_start and external_start
43 * as the internal and external starting addresses, respectively.
44 * It returns the id of the created port in ID.
45 *
46 * @param[in] name is the user defined port name
47 * @param[in] internal_start is the internal start address of port
48 * @param[in] external_start is the external start address of port
49 * @param[in] length is the physical length in bytes
50 * @param[out] id is the address of port id to set
51 *
52 * @retval This method returns RTEMS_SUCCESSFUL if there was not an
53 *         error. Otherwise, a status code is returned indicating the
54 *         source of the error. If successful, the id will
55 *         be filled in with the port id.
56 */
57rtems_status_code rtems_port_create(
58  rtems_name    name,
59  void         *internal_start,
60  void         *external_start,
61  uint32_t      length,
62  rtems_id     *id
63);
64
65/**
66 * @brief RTEMS Port Name to Id
67 *
68 * This routine implements the rtems_port_ident directive. This directive
69 * returns the port ID associated with name. If more than one port is
70 * named name, then the port to which the ID belongs is arbitrary.
71 *
72 * @param[in] name is the user defined port name
73 * @param[out] id is the pointer to port id
74 *
75 * @retval RTEMS_SUCCESSFUL if successful or error code if unsuccessful
76 */
77rtems_status_code rtems_port_ident(
78  rtems_name    name,
79  rtems_id     *id
80);
81
82/**
83 * @brief RTEMS Delete Port
84 *
85 * This routine implements the rtems_port_delete directive. It deletes
86 * the port associated with ID.
87 *
88 * @param[in] id is the dual-ported memory area id
89 *
90 * @retval This method returns RTEMS_SUCCESSFUL if there was not an
91 *         error. Otherwise, a status code is returned indicating the
92 *         source of the error.
93 */
94rtems_status_code rtems_port_delete(
95  rtems_id   id
96);
97
98/**
99 * @brief RTEMS Port External to Internal
100 *
101 * This routine implements the rtems_port_external_to_internal directive.
102 * It returns the internal port address which maps to the provided
103 * external port address for the specified port ID. If the given external
104 * address is an invalid dual-ported address, then the internal address is
105 * set to the given external address.
106 *
107 * @param[in] id is the id of dp memory object
108 * @param[in] external is the external address
109 * @param[out] internal is the pointer of internal address to set
110 *
111 * @retval RTEMS_SUCCESSFUL
112 */
113rtems_status_code rtems_port_external_to_internal(
114  rtems_id     id,
115  void        *external,
116  void       **internal
117);
118
119/**
120 * @brief RTEMS Port Internal to External
121 *
122 * This routine implements the Port_internal_to_external directive.
123 * It returns the external port address which maps to the provided
124 * internal port address for the specified port ID. If the given
125 * internal address is an invalid dual-ported address, then the
126 * external address is set to the given internal address.
127 *
128 * @param[in] id is the id of dual-ported memory object
129 * @param[in] internal is the internal address to set
130 * @param[in] external is the pointer to external address
131 *
132 * @retval RTEMS_SUCCESSFUL and the external will be filled in
133 * with the external addresses
134 */
135rtems_status_code rtems_port_internal_to_external(
136  rtems_id     id,
137  void        *internal,
138  void       **external
139);
140
141/**@}*/
142
143#ifdef __cplusplus
144}
145#endif
146
147#endif
148/* end of include file */
Note: See TracBrowser for help on using the repository browser.