Skip to content

Commit

Permalink
Merge pull request #833 from tokiedokie/SDRAM-include-guard
Browse files Browse the repository at this point in the history
Libraries: Add include guard for SDRAM
  • Loading branch information
facchinm committed Jan 26, 2024
2 parents 29b84df + b0975f7 commit 68fbece
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/Portenta_SDRAM/src/SDRAM.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef __SDRAM_H
#define __SDRAM_H

#include "ea_malloc.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -35,4 +38,5 @@ class SDRAMClass {

extern SDRAMClass SDRAM;

#endif
#endif
#endif // __SDRAM_H
5 changes: 5 additions & 0 deletions libraries/Portenta_SDRAM/src/ram_internal.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef __RAM_INTERNAL_H
#define __RAM_INTERNAL_H

bool sdram_init(void);

#define MPU_REGION_SDRAM1 (MPU_REGION_NUMBER4)
Expand Down Expand Up @@ -56,3 +59,5 @@ bool sdram_init(void);
| (size) << MPU_RASR_SIZE_Pos \
| MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos \
)

#endif // __RAM_INTERNAL_H

0 comments on commit 68fbece

Please sign in to comment.