Keyboard.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * @file Keyboard.h
  3. * @brief Header file of keyboard defination.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. *
  10. *
  11. @ endverbatim
  12. *
  13. * @author HiView SoC Software Team
  14. * @version 1.0.0
  15. * @date 2023-05-30
  16. */
  17. #ifndef __KEYBOARD_H__
  18. #define __KEYBOARD_H__
  19. #define MENU_KEY_WITH_ADC0 0
  20. #define MENU_KEY_WITH_ADC1 1
  21. #define PWM_POL_LOW 0
  22. #define PWM_POL_HIGH 1
  23. #define POWER_KEY_MODE_NONE 0
  24. #define POWER_KEY_MODE_NORMAL 1
  25. #define POWER_KEY_MODE_MULTI 2
  26. #define POWER_KEY_MODE_ADC 4
  27. #define ADCKEYVALUEINDEX 0
  28. #define ADCDATAINDEX 1
  29. #define ADCDATAOFFSETINDEX 2
  30. #define ADCDATAMAPMAX 3
  31. typedef enum _AdcKeyVal
  32. {
  33. E_ADC0_KEY_VAL_0 = 0,
  34. E_ADC0_KEY_VAL_1,
  35. E_ADC0_KEY_VAL_2,
  36. E_ADC0_KEY_VAL_3,
  37. E_ADC0_KEY_VAL_4,
  38. E_ADC0_KEY_VAL_5,
  39. E_ADC1_KEY_VAL_0 = 6,
  40. E_ADC1_KEY_VAL_1,
  41. E_ADC1_KEY_VAL_2,
  42. E_ADC1_KEY_VAL_3,
  43. E_ADC1_KEY_VAL_4,
  44. E_ADC1_KEY_VAL_5,
  45. E_COMBO_KEY_VAL_0 = 12,
  46. E_COMBO_KEY_VAL_1,
  47. E_COMBO_KEY_VAL_2,
  48. E_COMBO_KEY_VAL_3,
  49. E_COMBO_KEY_VAL_4,
  50. E_COMBO_KEY_VAL_5,
  51. E_COMBO_KEY_VAL_6,
  52. E_COMBO_KEY_VAL_7,
  53. E_POWER_KEY_VAL_0 = 20,
  54. E_ADC_KEY_VAL_MAX
  55. } AdcKeyVal;
  56. typedef struct _AdcComboKeyMap
  57. {
  58. AdcKeyVal enAdc0KeyVal;
  59. AdcKeyVal enAdc1KeyVal;
  60. AdcKeyVal enComboKeyVal;
  61. }AdcComboKeyMap;
  62. #endif