[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Function specific volatile
From: |
Anton Erasmus |
Subject: |
Re: [avr-gcc-list] Function specific volatile |
Date: |
Sat, 26 Apr 2003 22:06:27 +0200 |
On 03/04/26 at 01:08 Mark Williams (MWP) wrote:
>Hi all...
>
>Is there a way to force a global non-volatile var to be considered
>volatile in a specific function (int handler)?
>
>This would be handy for variables that are only read in int handlers.
>
>Thanks,
>Mark.
>
Just do a cast.
int foo;
void Intfunc(void)
{
int i;
i=(volatile int)foo;
}
Regards
Anton Erasmus