My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

screen_data.h 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*****************
  2. * screen_data.h *
  3. *****************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  7. * *
  8. * This program is free software: you can redistribute it and/or modify *
  9. * it under the terms of the GNU General Public License as published by *
  10. * the Free Software Foundation, either version 3 of the License, or *
  11. * (at your option) any later version. *
  12. * *
  13. * This program is distributed in the hope that it will be useful, *
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU General Public License for more details. *
  17. * *
  18. * To view a copy of the GNU General Public License, go to the following *
  19. * location: <https://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #pragma once
  22. #include "ftdi_eve_lib/ftdi_eve_lib.h"
  23. // To save RAM, store state information related to a particular screen
  24. // in a union. The values should be initialized in the onEntry method.
  25. /**
  26. * The DECL_DATA_IF_INCLUDED macro:
  27. *
  28. * union screen_data_t {
  29. * DECL_DATA_IF_INCLUDED(FTDI_EXAMPLE_SCREEN)
  30. * }
  31. *
  32. * Is a shorthand for:
  33. *
  34. * union screen_data_t {
  35. * #ifdef FTDI_EXAMPLE_SCREEN
  36. * struct ExampleScreenData ExampleScreen;
  37. * #endif
  38. * }
  39. *
  40. */
  41. #define __DECL_DATA_IF_INCLUDED(CLASS) struct CLASS ## Data CLASS ;
  42. #define _DECL_DATA_IF_INCLUDED(CLASS) __DECL_DATA_IF_INCLUDED(CLASS)
  43. #define DECL_DATA_IF_INCLUDED(HEADER) TERN_(HEADER, _DECL_DATA_IF_INCLUDED(HEADER ## _CLASS))
  44. union screen_data_t {
  45. DECL_DATA_IF_INCLUDED(FTDI_INTERFACE_SETTINGS_SCREEN)
  46. DECL_DATA_IF_INCLUDED(FTDI_LOCK_SCREEN)
  47. DECL_DATA_IF_INCLUDED(FTDI_SPINNER_DIALOG_BOX)
  48. DECL_DATA_IF_INCLUDED(FTDI_CONFIRM_START_PRINT_DIALOG_BOX)
  49. DECL_DATA_IF_INCLUDED(FTDI_CHANGE_FILAMENT_SCREEN)
  50. DECL_DATA_IF_INCLUDED(FTDI_FILES_SCREEN)
  51. DECL_DATA_IF_INCLUDED(FTDI_MOVE_AXIS_SCREEN)
  52. DECL_DATA_IF_INCLUDED(FTDI_BED_MESH_VIEW_SCREEN)
  53. DECL_DATA_IF_INCLUDED(FTDI_BED_MESH_EDIT_SCREEN)
  54. DECL_DATA_IF_INCLUDED(FTDI_STRESS_TEST_SCREEN)
  55. DECL_DATA_IF_INCLUDED(FTDI_NUDGE_NOZZLE_SCREEN)
  56. DECL_DATA_IF_INCLUDED(FTDI_Z_OFFSET_SCREEN)
  57. DECL_DATA_IF_INCLUDED(FTDI_BASE_NUMERIC_ADJ_SCREEN)
  58. DECL_DATA_IF_INCLUDED(FTDI_ALERT_DIALOG_BOX)
  59. DECL_DATA_IF_INCLUDED(COCOA_PREHEAT_SCREEN)
  60. DECL_DATA_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN)
  61. };
  62. extern screen_data_t screen_data;