28.2.11 __builtin_dataflashoffset
Description
Returns the offset of the dataflash object whose address is given as a parameter. The
argument p
must be the address of an object in
dataflash space; otherwise an error message is produced and the compilation fails. See
the space
attribute in 9.10 Variable Attributes.
Prototype
uint16_t __builtin_dataflashoffset(const void *p);
Argument
p
= object address.
Return Value
Returns the offset of the dataflash object whose address is given as a parameter.
Assembler Operator
tbloffset
Error Messages
The following error message is produced when this function is used incorrectly:
"Argument to __builtin_dataflashoffset()
is not the address of an object
in dataflash space."
The argument must be an explicit object address. For example, if
obj
is object in dataflash space, the
following syntax is valid:
uint16_t offset = __builtin_dataflashoffset(&obj);