[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-chat] how is PGM_P supposed to be used?
From: |
Britton Kerin |
Subject: |
[avr-chat] how is PGM_P supposed to be used? |
Date: |
Tue, 7 Jan 2014 16:29:53 -0900 |
This works for me:
printf_P (PSTR("hello\n"));
But this doesn't (prints garbage):
PGM_P hello_string = "hello\n";
printf_P (hello_string);
Nor does this (complains about invalid initializer at printf_P line):
PGM_P hello_string = "hello\n";
printf_P (PSTR (hello_string));
How is PGM_P supposed to be used?
Is it perhaps defined incorrectly? Doxygen says its:
#define PGM_P const char *
Which doesn't mention PROGMEM at all?
Thanks,
Britton
- [avr-chat] how is PGM_P supposed to be used?,
Britton Kerin <=