Skip to content

Commit 751cec6

Browse files
authored
Merge pull request arduino#140 from hathach/fix-samd51-ram-macro
Fix samd51 ram macro
2 parents 51461f9 + 2568b78 commit 751cec6

File tree

1 file changed

+8
-2
lines changed
  • cores/arduino/avr

1 file changed

+8
-2
lines changed

cores/arduino/avr/io.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
#ifndef _IO_H_
2626
#define _IO_H_
2727

28-
#define RAMSTART (HMCRAMC0_ADDR)
29-
#define RAMSIZE (HMCRAMC0_SIZE)
28+
#ifdef __SAMD51__
29+
#define RAMSTART (HSRAM_ADDR)
30+
#define RAMSIZE (HSRAM_SIZE)
31+
#else
32+
#define RAMSTART (HMCRAMC0_ADDR)
33+
#define RAMSIZE (HMCRAMC0_SIZE)
34+
#endif
35+
3036
#define RAMEND (RAMSTART + RAMSIZE - 1)
3137

3238
#endif

0 commit comments

Comments
 (0)