added example master
authorLucas Camargo <lucas@camargo.eng.br>
Wed, 25 Sep 2019 18:37:31 +0000 (15:37 -0300)
committerLucas Camargo <lucas@camargo.eng.br>
Wed, 25 Sep 2019 18:37:58 +0000 (15:37 -0300)
example/str_en.c [new file with mode: 0644]
example/str_en.h [new file with mode: 0644]
example/strings_en.txt [new file with mode: 0644]

diff --git a/example/str_en.c b/example/str_en.c
new file mode 100644 (file)
index 0000000..b48657d
--- /dev/null
@@ -0,0 +1,9 @@
+#include "./str_en.h"
+
+const char str_en_blob[] PROGMEM = 
+"\x49\x20\x9d\x20\x4e\x59\x21\x00\x01\x02\xad\x0f\xff\x00"
+;
+
+const unsigned short str_en_offsets[] PROGMEM = {
+    0, 8};
+
diff --git a/example/str_en.h b/example/str_en.h
new file mode 100644 (file)
index 0000000..da14a6a
--- /dev/null
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <avr/pgmspace.h>
+
+// 'str_en.h': generated by str2progmem from 'strings_en.txt' at 2019-09-25 15:37:04.421020
+static const int STR_EN_COUNT = 2;
+static const int STR_EN_BLOB_SZ = 14;
+extern const unsigned short str_en_offsets[];
+extern const char str_en_blob[];
+
+#define STR_EN_GET_OFFSET(I) pgm_read_word(&(str_en_offsets[(I)]))
+#define STR_EN_GET(I) ( ((const char*) &str_en_blob) + STR_EN_GET_OFFSET(I) )
+#define PGMSTR(x) (__FlashStringHelper*)(x)
\ No newline at end of file
diff --git a/example/strings_en.txt b/example/strings_en.txt
new file mode 100644 (file)
index 0000000..4b2f99f
--- /dev/null
@@ -0,0 +1,5 @@
+# strings_en.txt -- demo string list
+__IDENTIFIER str_en
+Welcome to the Menu
+I ¬9D NY!
+¬01¬02¬ad¬0f¬ff