ginput_lld_toggle_board.h 1.0 KB

123456789101112131415161718192021222324252627
  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 4 // The total number of toggle inputs
  10. #define GINPUT_TOGGLE_CONFIG_ENTRIES 1 // 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_SW3 2 // Switch 3
  14. #define GINPUT_TOGGLE_SW4 3 // Switch 4
  15. #define GINPUT_TOGGLE_DECLARE_STRUCTURE() \
  16. const GToggleConfig GInputToggleConfigTable[GINPUT_TOGGLE_CONFIG_ENTRIES] = { \
  17. {GPIOE, /* Switch 1 - Switch 4 */ \
  18. (1<<GPIOE_BUTTON1) | (1<<GPIOE_BUTTON2) | (1<<GPIOE_BUTTON3) | (1<<GPIOE_BUTTON4), \
  19. (1<<GPIOE_BUTTON1) | (1<<GPIOE_BUTTON2) | (1<<GPIOE_BUTTON3) | (1<<GPIOE_BUTTON4), \
  20. PAL_MODE_INPUT}, \
  21. }
  22. #endif /* _GDISP_LLD_TOGGLE_BOARD_H */