1 /* USER CODE BEGIN Header */
2 /**
3   ******************************************************************************
4   * @file    osal.h
5   * @author  GPM WBL Application Team
6   * @brief   This header file defines the OS abstraction layer. OSAL defines the
7   *          set of functions which needs to be ported to target operating
8   *          system and target platform.
9   ******************************************************************************
10   * @attention
11   *
12   * Copyright (c) 2024 STMicroelectronics.
13   * All rights reserved.
14   *
15   * This software is licensed under terms that can be found in the LICENSE file
16   * in the root directory of this software component.
17   * If no LICENSE file comes with this software, it is provided AS-IS.
18   *
19   ******************************************************************************
20   */
21 /* USER CODE END Header */
22 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __OSAL_H__
25 #define __OSAL_H__
26 
27 /******************************************************************************
28  * Includes
29  *****************************************************************************/
30 #include <stdint.h>
31 
32 /******************************************************************************
33  * Macros
34  *****************************************************************************/
35 
36 /******************************************************************************
37  * Function Prototypes
38  *****************************************************************************/
39 
40 /**
41  * @brief This function copies size number of bytes from a
42  * memory location pointed by src to a destination
43  * memory location pointed by dest. The locations must not overlap.
44  *
45  * @param[out] dest Destination address
46  * @param[in] src  Source address
47  * @param[in] size Number of bytes to copy
48  */
49 
50 extern void Osal_MemCpy(void *dest, const void *src, unsigned int size);
51 
52 /**
53  * @brief This function copies a given number of bytes, multiple of 4, from a
54  * memory location pointed by src to a destination memory location pointed by
55  * dest, by using only 32-bit accesses. The locations must not overlap.
56  *
57  * @param[out] dest Destination address. It must be 32-bit aligned.
58  * @param[in]  src  Source address. It must be 32-bit aligned.
59  * @param[in]  size Number of bytes to copy. It must be a multiple of 4.
60  */
61 extern void Osal_MemCpy4(uint32_t *dest, const uint32_t *src, unsigned int size);
62 
63 #endif /* __OSAL_H__ */
64