Atmel CAVR-4 ユーザーズマニュアル
CAVR-4
Part 2. Compiler reference
Intrinsic functions
241
signed int _ _reverse( signed int);
unsigned long _ _reverse(unsigned long);
signed long _ _reverse( signed long);
void _ _far * _ _reverse(void _ _far *); /* Only on -v4 */
/* and -v6 */
void _ _huge * _ _reverse(void _ _huge *); /* Only on -v4 */
/* and -v6 */
void _ _farflash * _ _reverse(void _ _farflash *);
/* Only on -v2 through -v6 with > 64k flash memory */
void _ _hugeflash * _ _reverse(void _ _hugeflash *);
/* Only on -v2 through -v6 with > 64k flash memory */
_ _save_interrupt
unsigned char _ _save_interrupt(void);
This intrinsic function will save the state of the interrupt flag in the byte returned. This
value can then be used for restoring the state of the interrupt flag with the
value can then be used for restoring the state of the interrupt flag with the
_ _restore_interrupt
intrinsic function.
Example
unsigned char oldState;
oldState = _ _save_interrupt();
_ _disable_interrupt();
/* Critical section goes here */
_ _restore_interrupt(oldState);
_ _segment_begin
void * __segment_begin(segment);
Returns the address of the first byte of the named
segment
. The named
segment
must
be a string literal that has been declared earlier with the
#pragma
segment
directive.
If the segment was declared with a memory attribute
memattr
, the type of the
_ _segment_begin
function is pointer to
memattr
void
. Otherwise, the type is a
default pointer to
void
.
Example
#pragma segment="MYSEG" _ _huge
...
segment_start_address = _ _segment_begin("MYSEG");
Here, the type of the
_ _segment_begin
intrinsic function is
void _ _huge *
.