1 /* 2 * Copyright (C) 2008 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef bbs_MEMORY_EM_H 18 #define bbs_MEMORY_EM_H 19 20 /** 21 * This files contains memory related functions. 22 */ 23 24 /* ---- includes ----------------------------------------------------------- */ 25 26 #include "b_BasicEm/Basic.h" 27 28 /* ---- related objects --------------------------------------------------- */ 29 30 /* ---- typedefs ----------------------------------------------------------- */ 31 32 /* ---- constants ---------------------------------------------------------- */ 33 34 /* ---- external functions ------------------------------------------------- */ 35 36 /** copies memory for src to dst (no overlap allowed); returns dstA 37 * src & dst data must be 16 bit aligned 38 */ 39 /* void* bbs_memcpy( void* dstA, const void* srcA, uint32 sizeA ); */ 40 41 /** copies memory for src to dst (no overlap allowed), size is given in 16-bit words 42 * src & dst data must be 16 bit aligned 43 * returns dstA 44 */ 45 void* bbs_memcpy16( void* dstA, const void* srcA, uint32 sizeA ); 46 47 /** copies memory for src to dst (no overlap allowed), size is given in 32-bit words 48 * src & dst data must be 32 bit aligned 49 * returns dstA 50 */ 51 void* bbs_memcpy32( void* dstA, const void* srcA, uint32 sizeA ); 52 53 /** fills memory with a value, size is given in 16-bit words 54 * dst data must be 16 bit aligned 55 * returns dstA 56 */ 57 void* bbs_memset16( void* dstA, uint16 valA, uint32 sizeA ); 58 59 /** fills memory with a value, size is given in 32-bit words 60 * dst data must be 32 bit aligned 61 * returns dstA 62 */ 63 void* bbs_memset32( void* dstA, uint32 valA, uint32 sizeA ); 64 65 #endif /* bbs_MEMORY_EM_H */ 66 67