ginput_lld_toggle_board.h 977 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * This file is subject to the terms of the GFX License. If a copy of
  3. * the license was not distributed with this file, you can obtain one at:
  4. *
  5. * http://ugfx.io/license.html
  6. */
  7. #ifndef _GDISP_LLD_TOGGLE_BOARD_H
  8. #define _GDISP_LLD_TOGGLE_BOARD_H
  9. #define GINPUT_TOGGLE_NUM_PORTS 3 // The total number of toggle inputs
  10. #define GINPUT_TOGGLE_CONFIG_ENTRIES 2 // The total number of GToggleConfig entries
  11. #define GINPUT_TOGGLE_SW1 0 // Switch 1
  12. #define GINPUT_TOGGLE_SW2 1 // Switch 2
  13. #define GINPUT_TOGGLE_WK_UP 2 // Wake UP
  14. #define GINPUT_TOGGLE_DECLARE_STRUCTURE() \
  15. const GToggleConfig GInputToggleConfigTable[GINPUT_TOGGLE_CONFIG_ENTRIES] = { \
  16. {KEY0_PORT, /* Switch 1 - Switch 2 */ \
  17. (1<<KEY0) | (1<<KEY1), \
  18. (1<<KEY0) | (1<<KEY1), \
  19. PAL_MODE_INPUT}, \
  20. {WAKE_UP_PORT, /* Switch 3 */ \
  21. (1<<WAKE_UP), \
  22. (1<<WAKE_UP), \
  23. PAL_MODE_INPUT}, \
  24. }
  25. #endif /* _GDISP_LLD_TOGGLE_BOARD_H */