Browse Source

add static string definition macro

Julius Pfrommer 6 years ago
parent
commit
6bfedfa95d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      include/ua_types.h

+ 3 - 0
include/ua_types.h

@@ -174,6 +174,9 @@ UA_STRING(char *chars) {
 
 #define UA_STRING_ALLOC(CHARS) UA_String_fromChars(CHARS)
 
+/* Define strings at compile time (in ROM) */
+#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
+
 /**
  * .. _datetime:
  *