|
Modules | |
| Progmem Implementation for 8-bit AVR | |
Defines | |
| #define | __progmem __attribute__((__progmem__)) |
| Attribute for indicating that a data object is stored in program memory. | |
| #define | __progmem_arg |
| Attribute for indicating that a pointer argument points into program memory rather than data memory. | |
| #define | DECLARE_PROGMEM(type, name) const type name __progmem |
| Declare a variable stored in program memory. | |
| #define | DEFINE_PROGMEM(type, name) const type name __progmem |
| Define a variable stored in program memory. | |
Functions | |
| static uint8_t | progmem_read8 (const uint8_t __progmem *p) |
| Read a byte stored at address p in program memory. | |
| static uint16_t | progmem_read16 (const uint16_t __progmem *p) |
| Read a 16-bit word stored at address p in program memory. | |
| static uint32_t | progmem_read32 (const uint32_t __progmem *p) |
| Read a 32-bit word stored at address p in program memory. | |
On devices with a Harvard architecture, the program memory (typically flash) and data memory are in separate address spaces. In order to allow optimization of constant data storage, these devices often allow accessing data stored in program space through special instructions.
This module provides mechanisms for defining data stored in program space, and for accessing this data. On Von Neumann architecture devices, these attributes and functions have no effect.
| #define __progmem __attribute__((__progmem__)) |
| #define __progmem_arg |
Attribute for indicating that a pointer argument points into program memory rather than data memory.
This is used on pointers that refer to objects stored in program memory. On Von Neumann architectures, this attribute has no effect.
Definition at line 135 of file progmem.h.
Referenced by gfx_copy_progmem_pixels_to_screen(), gfx_draw_char_progmem(), gfx_draw_progmem_string(), gfx_get_progmem_string_bounding_box(), and gfx_put_bitmap().
| #define DECLARE_PROGMEM | ( | type, | |||
| name | ) | const type name __progmem |
| #define DEFINE_PROGMEM | ( | type, | |||
| name | ) | const type name __progmem |
Define a variable stored in program memory.
This macro will ensure that the correct pragmas, attributes, extended keywords, etc. are inserted in the correct place, depending on the compiler. The macro invocation may be followed by '=', followed by the initializer, if necessary.
Read a byte stored at address p in program memory.
Definition at line 139 of file progmem.h.
Referenced by gfx_copy_progmem_pixels_to_screen(), gfx_draw_char_progmem(), gfx_draw_progmem_string(), and gfx_get_progmem_string_bounding_box().
1.6.3