Skip to content

Commit 68fbece

Browse files
authored
Merge pull request #833 from tokiedokie/SDRAM-include-guard
Libraries: Add include guard for SDRAM
2 parents 29b84df + b0975f7 commit 68fbece

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

libraries/Portenta_SDRAM/src/SDRAM.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef __SDRAM_H
2+
#define __SDRAM_H
3+
14
#include "ea_malloc.h"
25

36
#ifdef __cplusplus
@@ -35,4 +38,5 @@ class SDRAMClass {
3538

3639
extern SDRAMClass SDRAM;
3740

38-
#endif
41+
#endif
42+
#endif // __SDRAM_H

libraries/Portenta_SDRAM/src/ram_internal.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef __RAM_INTERNAL_H
2+
#define __RAM_INTERNAL_H
3+
14
bool sdram_init(void);
25

36
#define MPU_REGION_SDRAM1 (MPU_REGION_NUMBER4)
@@ -56,3 +59,5 @@ bool sdram_init(void);
5659
| (size) << MPU_RASR_SIZE_Pos \
5760
| MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos \
5861
)
62+
63+
#endif // __RAM_INTERNAL_H

0 commit comments

Comments
 (0)