New lang, arduino 1.8.5 - language.h - section names, messages.h - extern "C" added

This commit is contained in:
Robert Pelnar 2018-10-18 14:41:32 +02:00
parent 48c775f8bf
commit 868c79e835
2 changed files with 11 additions and 3 deletions

View File

@ -25,13 +25,13 @@
/** @def PROGMEM_I2
* @brief section progmem0 will be used for localized translated strings */
#define PROGMEM_I2 __attribute__((section(".progmem0")))
#define PROGMEM_I2 __attribute__((section(".loc_sec")))
/** @def PROGMEM_I1
* @brief section progmem1 will be used for localized strings in english */
#define PROGMEM_I1 __attribute__((section(".progmem1")))
#define PROGMEM_I1 __attribute__((section(".loc_pri")))
/** @def PROGMEM_N1
* @brief section progmem2 will be used for not localized strings in english */
#define PROGMEM_N1 __attribute__((section(".progmem2")))
#define PROGMEM_N1 __attribute__((section(".noloc")))
#if (LANG_MODE == 0) //primary language only
#define _I(s) (__extension__({static const char __c[] PROGMEM_I1 = s; &__c[0];}))

View File

@ -3,6 +3,10 @@
// Common serial messages
#define MSG_MARLIN "Marlin"
#if defined(__cplusplus)
extern "C" {
#endif //defined(__cplusplus)
// LCD Menu Messages
//internationalized messages
extern const char MSG_AUTO_HOME[];
@ -119,3 +123,7 @@ extern const char MSG_Z_MIN[];
extern const char MSG_ZPROBE_OUT[];
extern const char MSG_ZPROBE_ZOFFSET[];
extern const char MSG_TMC_OVERTEMP[];
#if defined(__cplusplus)
}
#endif //defined(__cplusplus)