Browse Source

Add a typedef for MENU_ITEM(function,…) functions

pull/1/head
Scott Lahteine 7 years ago
parent
commit
a8b8d4e85e
  1. 2
      Marlin/src/lcd/ultralcd.cpp
  2. 1
      Marlin/src/lcd/ultralcd.h

2
Marlin/src/lcd/ultralcd.cpp

@ -212,7 +212,7 @@ uint16_t max_display_update_time = 0;
void _menu_action_back(); void _menu_action_back();
void menu_action_submenu(screenFunc_t data); void menu_action_submenu(screenFunc_t data);
void menu_action_gcode(const char* pgcode); void menu_action_gcode(const char* pgcode);
void menu_action_function(screenFunc_t data); void menu_action_function(menuAction_t data);
#define DECLARE_MENU_EDIT_TYPE(_type, _name) \ #define DECLARE_MENU_EDIT_TYPE(_type, _name) \
bool _menu_edit_ ## _name(); \ bool _menu_edit_ ## _name(); \

1
Marlin/src/lcd/ultralcd.h

@ -84,6 +84,7 @@
// Function pointer to menu functions. // Function pointer to menu functions.
typedef void (*screenFunc_t)(); typedef void (*screenFunc_t)();
typedef void (*menuAction_t)();
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0); void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);

Loading…
Cancel
Save