Atmel CAVR-4 Manuale Utente
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.
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
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
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.
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