Re: push r1, pop r0
"Sergey A. Borshch" <[email protected]> Wed, 8 Nov 2017 11:21:44 +0200
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <[email protected]> |
On 08.11.2017 11:03, David Brown wrote:
> (Also, if you are writing C rather
> than C++, your function declaration is not correct.) The sensible way
> to write this is:
>
> static inline uint16_t GetStackPointer(void)
> {
> return (SPH << 8) | SPL;
> }
It's not correct declaration too. Function name clearly states that it is
returning pointer, so it should return... pointer:
static inline void * GetStackPointer(void)
{
return (void *)((SPH << 8) | SPL);
}
--
Regards,
Sergey A. Borshch mailto: [email protected]
SB ELDI ltd. Riga, Latvia