28.2.17 __builtin_dmaoffset
Description
Obtains the offset of a symbol within DMA memory.
For example:
unsigned int result;
char buffer[256] __attribute__((space(dma)));
result = __builtin_dmaoffset(&buffer);
Might generate:
mov #dmaoffset(buffer), w0
Prototype
unsigned int __builtin_dmaoffset(const void *p);
Argument
*p
– pointer to DMA address value
Return Value
Returns the offset to a variable located in DMA memory.
Assembler Operator/ Machine Instruction
dmaoffset
Error Messages
An error message will be displayed if the parameter is not the address of a global symbol.