Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Program Space String Utilities


Defines

#define PSTR(s)   ({static char __c[] PROGMEM = (s); __c;})
#define PGM_P   const prog_char *
#define PGM_VOID_P   const prog_void *

Detailed Description

#include <avr/io.h> 
#include <avr/pgmspace.h> 

The functions in this module provide interfaces for a program to access data stored in program space (flash memory) of the device. In order to use these functions, the target device must support either the LPM or ELPM instructions.

Note:
These function are an attempt to provide some compatibility with header files that come with IAR C, to make porting applications between different compilers easier. This is not 100% compatibility though (GCC does not have full support for multiple address spaces yet).
Note:
If you are working with strings which are completely based in ram, use the standard string functions described in avr_string.

Define Documentation

#define PGM_P   const prog_char *
 

Used to declare a variable that is a pointer to a string in program space.

#define PGM_VOID_P   const prog_void *
 

Used to declare a generic pointer to an object in program space.

#define PSTR      ({static char __c[] PROGMEM = (s); __c;})
 

Used to declare a static pointer to a string in program space.


Generated on Thu Jan 30 22:30:58 2003 for EduNet by doxygen1.2.18