SysLink API Reference
2.21.03.11
Main Page
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ti
syslink
utils
MemoryOS.h
Go to the documentation of this file.
1
11
/*
12
* ============================================================================
13
*
14
* Copyright (c) 2008-2012, Texas Instruments Incorporated
15
*
16
* Redistribution and use in source and binary forms, with or without
17
* modification, are permitted provided that the following conditions
18
* are met:
19
*
20
* * Redistributions of source code must retain the above copyright
21
* notice, this list of conditions and the following disclaimer.
22
*
23
* * Redistributions in binary form must reproduce the above copyright
24
* notice, this list of conditions and the following disclaimer in the
25
* documentation and/or other materials provided with the distribution.
26
*
27
* * Neither the name of Texas Instruments Incorporated nor the names of
28
* its contributors may be used to endorse or promote products derived
29
* from this software without specific prior written permission.
30
*
31
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
33
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
35
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
36
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
37
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
41
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
* Contact information for paper mail:
43
* Texas Instruments
44
* Post Office Box 655303
45
* Dallas, Texas 75265
46
* Contact information:
47
* http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
48
* DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
49
* ============================================================================
50
*
51
*/
52
53
54
55
#ifndef MEMORYOS_H_0x97D2
56
#define MEMORYOS_H_0x97D2
57
58
#include <
ti/syslink/utils/MemoryDefs.h
>
59
/* OSAL and utils */
60
#include <ti/syslink/utils/_MemoryOS.h>
61
62
#if defined (__cplusplus)
63
extern
"C"
{
64
#endif
65
66
67
/* =============================================================================
68
* Macros and types
69
* See MemoryDefs.h
70
* =============================================================================
71
*/
72
/* =============================================================================
73
* APIs
74
* =============================================================================
75
*/
76
/* Initialize the memory os module. */
77
Int32
MemoryOS_setup
(
void
);
78
79
/* Finalize the memory os module. */
80
Int32
MemoryOS_destroy
(
void
);
81
82
/* Allocates the specified number of bytes of type specified through flags. */
83
Ptr
MemoryOS_alloc
(
UInt32
size,
UInt32
align,
UInt32
flags);
84
85
/* Allocates the specified number of bytes and memory is set to zero. */
86
Ptr
MemoryOS_calloc
(
UInt32
size,
UInt32
align,
UInt32
flags);
87
88
/* Frees local memory */
89
Void
MemoryOS_free
(
Ptr
ptr,
UInt32
size,
UInt32
flags);
90
91
/* Copies the data between memory areas. Returns the number of bytes copied. */
92
Ptr
MemoryOS_copy
(
Ptr
dst,
Ptr
src,
UInt32
len);
93
94
/* Set the specified values to the allocated memory area */
95
Ptr
MemoryOS_set
(
Ptr
buf,
Int
value,
UInt32
len);
96
97
/* Translate API */
98
Ptr
MemoryOS_translate
(
Ptr
srcAddr, Memory_XltFlags flags);
99
100
/* TBD: Add APIs for Memory_move, Scatter-Gather & translateAddr. */
101
102
103
#if defined (__cplusplus)
104
}
105
#endif
/* defined (__cplusplus) */
106
107
#endif
/* ifndef MEMORYOS_H_0x97D2 */
Copyright 2014, Texas Instruments Incorporated