Compiler special attribute macros


Defines

#define ATTR_ALIGNED(n)
 Align variable or structure field.
#define ATTR_EWRAM
 Store memory in EWRAM.
#define ATTR_FASTFUNC
 Store function in IWRAM.

Define Documentation

#define ATTR_ALIGNED (  ) 

Align variable or structure field.

ATTR_ALIGNED specifies a minimum alignment for the variable or structure field, measured in bytes. For example, the declaration:

int ATTR_ALIGNED(16) Energy;
causes the compiler to allocate the variable Energy on a 16-byte boundary.

Parameters:
[in] n Alignment measured in bytes.

#define ATTR_EWRAM

Store memory in EWRAM.

The ATTR_EWRAM macro can be used to store variables in External Work RAM.

u32 ATTR_EWRAM Buffer[64];

#define ATTR_FASTFUNC

Store function in IWRAM.

The ATTR_FASTFUNC macro can be used to store a function in Internal Work RAM.

void ATTR_FASTFUNC SomeFunction(void);

void ATTR_FASTFUNC SomeFunction(void)
{
    // fancy code here
}


Generated on Sat Aug 12 13:54:08 2006 for HEL 2 Library by  doxygen 1.4.7