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