aboutsummaryrefslogtreecommitdiff
path: root/stm-sdram.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm-sdram.c')
-rw-r--r--stm-sdram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stm-sdram.c b/stm-sdram.c
index 0ec8065..52bab98 100644
--- a/stm-sdram.c
+++ b/stm-sdram.c
@@ -51,7 +51,7 @@ HAL_StatusTypeDef sdram_init(void)
static int initialized = 0;
if (initialized) {
- return;
+ return HAL_OK;
}
initialized = 1;
@@ -184,6 +184,8 @@ HAL_StatusTypeDef _sdram_init_params(SDRAM_HandleTypeDef *sdram1, SDRAM_HandleTy
HAL_StatusTypeDef ok; // status
FMC_SDRAM_CommandTypeDef cmd; // command
+#define HAL_Delay(n) for (int i = 0; i < 1000 * n; ++i)
+
/*
* enable clocking
*/