28.2.20 __builtin_dmapage

Description

Obtains the page number of a symbol within DMA memory.

For example:

 uint16_t result;
 char buffer[256] __attribute__((space(dma)));

 result = __builtin_dmapage(&buffer);

Might generate:

 mov #dmapage(buffer), w0

Prototype

mov #dmapage(buffer), w0 __builtin_dmapage(const void *p);

Argument

p – literal address of a object located in DMA memory

Return Value

Returns the page number of a variable located in DMA memory.

Assembler Operator

dmapage

Error Messages

An error message will be displayed if the parameter is not the address of a global symbol.