Go to the documentation of this file.
21 #ifndef __STM32F4xx_HAL_SDRAM_H
22 #define __STM32F4xx_HAL_SDRAM_H
28 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
29 defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
32 #include "stm32f4xx_ll_fmc.h"
64 #if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
65 typedef struct __SDRAM_HandleTypeDef
80 #if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
81 void (* MspInitCallback) (
struct __SDRAM_HandleTypeDef * hsdram);
82 void (* MspDeInitCallback) (
struct __SDRAM_HandleTypeDef * hsdram);
83 void (* RefreshErrorCallback) (
struct __SDRAM_HandleTypeDef * hsdram);
89 #if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
95 HAL_SDRAM_MSP_INIT_CB_ID = 0x00U,
96 HAL_SDRAM_MSP_DEINIT_CB_ID = 0x01U,
97 HAL_SDRAM_REFRESH_ERR_CB_ID = 0x02U,
98 HAL_SDRAM_DMA_XFER_CPLT_CB_ID = 0x03U,
99 HAL_SDRAM_DMA_XFER_ERR_CB_ID = 0x04U
100 }HAL_SDRAM_CallbackIDTypeDef;
122 #if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
123 #define __HAL_SDRAM_RESET_HANDLE_STATE(__HANDLE__) do { \
124 (__HANDLE__)->State = HAL_SDRAM_STATE_RESET; \
125 (__HANDLE__)->MspInitCallback = NULL; \
126 (__HANDLE__)->MspDeInitCallback = NULL; \
129 #define __HAL_SDRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SDRAM_STATE_RESET)
172 #if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
void HAL_SDRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
FMC SDRAM Configuration Structure definition
FMC SDRAM Timing parameters structure definition.
napi_value Init(napi_env env, napi_value exports)
HAL_StatusTypeDef
HAL Status structures definition
static FMC_SDRAM_TimingTypeDef Timing
void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram)
DMA handle Structure definition.
HAL_SDRAM_StateTypeDef HAL_SDRAM_GetState(SDRAM_HandleTypeDef *hsdram)
void HAL_SDRAM_RefreshErrorCallback(SDRAM_HandleTypeDef *hsdram)
HAL_StatusTypeDef HAL_SDRAM_Write_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram)
HAL_LockTypeDef
HAL Lock structures definition
HAL_StatusTypeDef HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing)
void HAL_SDRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
HAL_StatusTypeDef HAL_SDRAM_Read_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
@ HAL_SDRAM_STATE_WRITE_PROTECTED
HAL_StatusTypeDef HAL_SDRAM_Write_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize)
HAL_StatusTypeDef HAL_SDRAM_Write_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Enable(SDRAM_HandleTypeDef *hsdram)
HAL_StatusTypeDef HAL_SDRAM_Read_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
#define FMC_SDRAM_TypeDef
HAL_StatusTypeDef HAL_SDRAM_DeInit(SDRAM_HandleTypeDef *hsdram)
HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Disable(SDRAM_HandleTypeDef *hsdram)
HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
static FMC_SDRAM_CommandTypeDef Command
uint32_t HAL_SDRAM_GetModeStatus(SDRAM_HandleTypeDef *hsdram)
@ HAL_SDRAM_STATE_PRECHARGED
HAL_StatusTypeDef HAL_SDRAM_SetAutoRefreshNumber(SDRAM_HandleTypeDef *hsdram, uint32_t AutoRefreshNumber)
HAL_StatusTypeDef HAL_SDRAM_Write_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize)
HAL_StatusTypeDef HAL_SDRAM_Read_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize)
SDRAM command parameters structure definition.
HAL_SDRAM_StateTypeDef
HAL SDRAM State structure definition
HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate)
SDRAM handle Structure definition.
void HAL_SDRAM_IRQHandler(SDRAM_HandleTypeDef *hsdram)
HAL_StatusTypeDef HAL_SDRAM_Read_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize)