action_t action_for_key(uint8_t layer, key_t key);
/* macro */
-const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
/* user defined special function */
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
#ifndef NO_ACTION_MACRO
#define MACRO_READ() (macro = pgm_read_byte(macro_p++))
-void action_macro_play(const prog_macro_t *macro_p)
+void action_macro_play(const macro_t *macro_p)
{
macro_t macro = END;
uint8_t interval = 0;
#define MACRO_NONE 0
-#define MACRO(...) ({ static prog_macro_t _m[] PROGMEM = { __VA_ARGS__ }; _m; })
+#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
typedef uint8_t macro_t;
-typedef macro_t prog_macro_t PROGMEM;
#ifndef NO_ACTION_MACRO
-void action_macro_play(const prog_macro_t *macro);
+void action_macro_play(const macro_t *macro_p);
#else
#define action_macro_play(macro)
#endif
/* Macro */
__attribute__ ((weak))
-const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
return MACRO_NONE;
}
;---------------------------------------------------------------------------\r
; Direct ROM string output\r
;\r
-;Prototype: void xputs (const prog_char *str // rom string to be output\r
+;Prototype: void xputs (const char *str_p // rom string to be output\r
; );\r
\r
.func xputs\r
; Formatted string output (16/32bit version)\r
;\r
;Prototype:\r
-; void xprintf (const prog_char *format, ...);\r
-; void xsprintf(char*, const prog_char *format, ...);\r
-; void xfprintf(void(*func)(char), const prog_char *format, ...);\r
+; void __xprintf (const char *format_p, ...);\r
+; void __xsprintf(char*, const char *format_p, ...);\r
+; void __xfprintf(void(*func)(char), const char *format_p, ...);\r
;\r
\r
#if USE_XPRINTF\r
\r
\r
/*-----------------------------------------------------------------------------*/\r
-void xputs(const prog_char *string);\r
+void xputs(const char *string_p);\r
\r
/* The string placed in the ROM is forwarded to xputc() directly.\r
*/\r
#define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__)\r
#define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__)\r
\r
-void __xprintf(const prog_char *format, ...); /* Send formatted string to the registered device */\r
-void __xsprintf(char*, const prog_char *format, ...); /* Put formatted string to the memory */\r
-void __xfprintf(void(*func)(uint8_t), const prog_char *format, ...); /* Send formatted string to the specified device */\r
+void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */\r
+void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */\r
+void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */\r
\r
/* Format string is placed in the ROM. The format flags is similar to printf().\r
\r
DUMMY,
};
-const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
keyevent_t event = record->event;
//uint8_t tap_count = record->tap_count;
/*
* Macro definition
*/
-const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
keyevent_t event = record->event;
tap_t tap = record->tap;