1 /*****************************************************************************
2 * @file osal.c
3 * @author MCD Application Team
4 * @brief Implements the interface defined in "osal.h" needed by the stack.
5 * Actually, only memset, memcpy and memcmp wrappers are implemented.
6 *****************************************************************************
7 * @attention
8 *
9 * <h2><center>© Copyright (c) 2019 STMicroelectronics.
10 * All rights reserved.</center></h2>
11 *
12 * This software component is licensed by ST under Ultimate Liberty license
13 * SLA0044, the "License"; You may not use this file except in compliance with
14 * the License. You may obtain a copy of the License at:
15 * www.st.com/SLA0044
16 *
17 ******************************************************************************
18 */
19
20 #include <string.h>
21 #include "osal.h"
22
23
24 /**
25 * Osal_MemCpy
26 *
27 */
28
Osal_MemCpy(void * dest,const void * src,unsigned int size)29 void* Osal_MemCpy( void *dest, const void *src, unsigned int size )
30 {
31 return memcpy( dest, src, size );
32 }
33
34 /**
35 * Osal_MemSet
36 *
37 */
38
Osal_MemSet(void * ptr,int value,unsigned int size)39 void* Osal_MemSet( void *ptr, int value, unsigned int size )
40 {
41 return memset( ptr, value, size );
42 }
43
44 /**
45 * Osal_MemCmp
46 *
47 */
Osal_MemCmp(const void * s1,const void * s2,unsigned int size)48 int Osal_MemCmp( const void *s1, const void *s2, unsigned int size )
49 {
50 return memcmp( s1, s2, size );
51 }
52