Specifications
CAVR-4
210
Descriptions of extended keywords
AVR® IAR C/C++ Compiler
Reference Guide
__intrinsic
The __intrinsic keyword is reserved for compiler internal use only.
__io
Controls the storage of data objects in I/O memory space, alternatively data memory
space.
The
__io memory attribute implies that objects are __no_init and volatile, and allows
objects to be accessed by use of the special I/O instructions in the AVR microcontroller.
Your application may access the AVR I/O system by using the memory-mapped internal
special function registers (SFRs). To access the AVR I/O system efficiently, the
__io
memory attribute should be included in the code.
__monitor
Supports atomic execution of a function.
The __
monitor keyword causes interrupts to be disabled during execution of the
function. This allows atomic operations to be performed, such as operations on
semaphores that control access to resources by multiple processes. A function declared
with the
__monitor keyword is equivalent to any other function in all other respects.
This keyword can be specified using the #pragma object_attribute directive.
Avoid using the
__monitor keyword on large functions, since the interrupt will
otherwise be turned off for too long.
For additional information, see the intrinsic functions __disable_interrupt, page 238,
and __enable_interrupt, page 238.
Read more about monitor functions in Monitor functions, page 30.
__near
Controls the storage of data objects in data memory space.
The
__near memory attribute overrides the default data storage of variables given by
the selected memory model.
Address range Max object size Pointer size Memory space
0-0x3F 4 bytes (32 bits) Pointers not allowed I/O
0x60-0xFF 4 bytes (32 bits) Pointers not allowed Data
Table 64: I/O address ranges
Address range Max object size Pointer size Memory space
0-0xFFFF (64 Kbytes) 65535 bytes 16 bits Data
Table 65: Near address ranges