8.5.3 pgm_read_byte_far Macro

Read a byte from the program space with a far address.

Include

<avr/pgmspace.h>

Prototype

unsigned char pgm_read_byte_far(unsigned long int);

Remarks

Read a byte from the program space with a 32-bit (far) address. These functions use the elpm instruction, and so can access any address in program memory

Example

#include <avr/pgmspace.h>
const unsigned char PROGMEM romObj = 0x55;
int main(void)
{
  unsigned char val;
  val = pgm_read_byte_far(&romObj);
}