8.9.3 builtin_avr_flash_segment Built-in Function
Return the flash segment of a full address.
Prototype
char __builtin_avr_flash_segment(const __memx void * mp)
Remarks
This built-in function returns the number of the flash segment (the 64 kB chunk) of the
argument, which is assumed to be a 24-bit __memx
byte address. If the
address does not point to flash memory, the built-in function returns -1.
Example
const __memx int myObject = 22;
int main(void) {
char segment;
segment = __builtin_avr_flash_segment(&myObject);
}