1 /**
2   ******************************************************************************
3   * @file    stm32_mem.h
4   * @author  MCD Application Team
5   * @brief   standard memory operation
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __STM32_MEM_H__
21 #define __STM32_MEM_H__
22 
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27 /* Includes ------------------------------------------------------------------*/
28 #include <stdint.h>
29 #include "utilities_conf.h"
30 
31 /* Exported types ------------------------------------------------------------*/
32 /* Exported constants --------------------------------------------------------*/
33 /* Exported macro ------------------------------------------------------------*/
34 /* ---- Memory mapping macros ----------------------------------------------- */
35 #define UTIL_MEM_PLACE_IN_SECTION( __x__ ) UTIL_PLACE_IN_SECTION( __x__ )
36 #define UTIL_MEM_ALIGN ALIGN
37 
38 /* Exported functions ------------------------------------------------------- */
39 /**
40 * @brief  This API copies one buffer to another
41 * @param  dst: output buffer to be filled
42 * @param  src: input buffer
43 * @param  size: size of 8b data
44 * @retval None
45 */
46 void UTIL_MEM_cpy_8( void *dst, const void *src, uint16_t size );
47 
48 /**
49 * @brief  This API copies one buffer to another in reverse
50 * @param  dst: output buffer to be filled
51 * @param  src: input buffer
52 * @param  size: size of 8b data
53 * @retval None
54 */
55 void UTIL_MEM_cpyr_8( void *dst, const void *src, uint16_t size );
56 
57 /**
58 * @brief  This API fills a buffer with value
59 * @param  dst: output buffer to be filled
60 * @param  value: value
61 * @param  size: size of 8b data
62 * @retval None
63 */
64 void UTIL_MEM_set_8( void *dst, uint8_t value, uint16_t size );
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* __STM32_MEM_H__ */
71