Specifications
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
__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.
See #pragma segment, page 224.
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 *.