Prusa3d Marlin fork
asm.h
1
#pragma once
2
#include <stdint.h>
3
#include "macros.h"
4
5
#ifdef __AVR_ATmega2560__
6
7
// return the current PC (on AVRs with 22bit PC)
8
FORCE_INLINE __uint24 GETPC(
void
)
9
{
10
__uint24 ret;
11
asm
(
12
"rcall .\n"
13
"pop %A0\n"
14
"pop %B0\n"
15
"pop %C0\n"
16
:
"=&r"
(ret)
17
);
18
return
ret;
19
}
20
21
#endif
Generated by
1.9.1