X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Faction_macro.h;h=ee5c7c4266db059946540e7d0789e82d1f000e57;hb=be8ea3c0940aabb55281863743c7e7d31424c573;hp=3833c7c8aecb2dce9cb682c886057544a5241e65;hpb=8c80deb775ac151001dc1592a2e94e8677b49964;p=max%2Ftmk_keyboard.git diff --git a/common/action_macro.h b/common/action_macro.h index 3833c7c8..ee5c7c42 100644 --- a/common/action_macro.h +++ b/common/action_macro.h @@ -20,11 +20,19 @@ along with this program. If not, see . #include +#define MACRO_NONE 0 +#define MACRO(...) ({ static prog_macro_t _m[] PROGMEM = { __VA_ARGS__ }; _m; }) + + 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); +#else +#define action_macro_play(macro) +#endif