File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,33 @@ typedef const __FlashStringHelper* flash_string_t;
116
116
IMPORT_FSTR_DATA (name, file) \
117
117
extern "C" const FSTR::String name;
118
118
119
+ /* *
120
+ * @brief Get a pointer to the actual FlashString
121
+ * @param fstr The FlashString& reference
122
+ * @deprecated Not required, taking address of a references is fine so just use &
123
+ */
124
+ #define FSTR_PTR (fstr ) &fstr
125
+
126
+ /* * @brief declare a table of FlashStrings
127
+ * @param name name of the table
128
+ * @deprecated Use a Vector or Map
129
+ * @note Declares a simple table. Example:
130
+ *
131
+ * DEFINE_FSTR(fstr1, "Test string #1");
132
+ * DEFINE_FSTR(fstr2, "Test string #2");
133
+ *
134
+ * FSTR_TABLE(table) = {
135
+ * &fstr1,
136
+ * &fstr2,
137
+ * };
138
+ *
139
+ * Table entries may be accessed directly as they are word-aligned. Examples:
140
+ * debugf("fstr1 = '%s'", String(*table[0]).c_str());
141
+ * debugf("fstr2.length() = %u", table[1]->length());
142
+ *
143
+ */
144
+ #define FSTR_TABLE (name ) const FlashString* const name[] PROGMEM
145
+
119
146
namespace FSTR
120
147
{
121
148
using WString = ::String;
You can’t perform that action at this time.
0 commit comments