-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstm32u575i_eval_sram.h
130 lines (105 loc) · 3.31 KB
/
stm32u575i_eval_sram.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/**
******************************************************************************
* @file stm32u575i_eval_sram.h
* @author MCD Application Team
* @brief This file contains the common defines and functions prototypes for
* the stm32u575i_eval_sram.c driver.
******************************************************************************
* @attention
*
* Copyright (c) 2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup BSP
* @{
*/
/** @addtogroup STM32U575I_EVAL
* @{
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32U575I_EVAL_SRAM_H
#define STM32U575I_EVAL_SRAM_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32u575i_eval_conf.h"
#include "stm32u575i_eval_errno.h"
/** @addtogroup STM32U575I_EVAL_SRAM
* @{
*/
/* Exported types ------------------------------------------------------------*/
/** @defgroup STM32U575I_EVAL_SRAM_Exported_Types SRAM Exported Types
* @{
*/
#if (USE_HAL_SRAM_REGISTER_CALLBACKS > 0)
typedef struct
{
pSRAM_CallbackTypeDef pMspInitCb;
pSRAM_CallbackTypeDef pMspDeInitCb;
} BSP_SRAM_Cb_t;
#endif /* (USE_HAL_SRAM_REGISTER_CALLBACKS > 0) */
/**
* @}
*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup STM32U575I_EVAL_SRAM_Exported_Constants SRAM Exported Constants
* @{
*/
#define SRAM_INSTANCES_NBR 1U
#define SRAM_DEVICE_ADDR 0x60000000U
#define SRAM_DEVICE_SIZE 0x200000U /* SRAM device size : 1024 words of 16-bits */
/* DMA definitions for SRAM DMA transfer */
#define SRAM_DMAx_CLK_ENABLE __HAL_RCC_GPDMA1_CLK_ENABLE
#define SRAM_DMAx_CLK_DISABLE __HAL_RCC_GPDMA1_CLK_DISABLE
#define SRAM_DMAx_CHANNEL GPDMA1_Channel0
#define SRAM_DMAx_IRQ GPDMA1_Channel0_IRQn
#define SRAM_DMAx_IRQ_HANDLER GPDMA1_Channel0_IRQHandler
/**
* @}
*/
/* Exported variables --------------------------------------------------------*/
/** @addtogroup STM32U575I_EVAL_SRAM_Exported_Variables
* @{
*/
extern SRAM_HandleTypeDef hsram[SRAM_INSTANCES_NBR];
/**
* @}
*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup STM32U575I_EVAL_SRAM_Exported_Functions
* @{
*/
int32_t BSP_SRAM_Init(uint32_t Instance);
int32_t BSP_SRAM_DeInit(uint32_t Instance);
#if (USE_HAL_SRAM_REGISTER_CALLBACKS > 0)
int32_t BSP_SRAM_RegisterDefaultMspCallbacks(uint32_t Instance);
int32_t BSP_SRAM_RegisterMspCallbacks(uint32_t Instance, BSP_SRAM_Cb_t *CallBacks);
#endif /* (USE_HAL_SRAM_REGISTER_CALLBACKS > 0) */
void BSP_SRAM_IRQHandler(uint32_t Instance);
void BSP_SRAM_ErrorCallback(uint32_t Instance);
/* These functions can be modified in case the current settings
need to be changed for specific application needs */
HAL_StatusTypeDef MX_SRAM_BANK1_Init(SRAM_HandleTypeDef *hSram);
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* STM32U575I_EVAL_SRAM_H */
/**
* @}
*/
/**
* @}
*/