keycontrol_ll.h 1005 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef KEYCONTROL_LL_H
  2. #define KEYCONTROL_LL_H
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. typedef enum
  6. {
  7. eSwCtlMode_4line, // 4 Parallel lines or 3 lines for register control
  8. eSwCtlMode_5line, // 5 Parallel lines for register control
  9. eSwCtlMode_6line, // 6 Parallel lines or 3 lines for register control
  10. eSwCtlMode_default = eSwCtlMode_4line
  11. }
  12. eKeySwitchControlMode_t;
  13. typedef uint32_t tKeySwitchCode_t;
  14. typedef struct
  15. {
  16. bool ( * Init)( eKeySwitchControlMode_t mode );
  17. bool ( * SetKeyCode)( tKeySwitchCode_t code );
  18. bool ( * SetAmpCode)( tKeySwitchCode_t code );
  19. bool ( * SetFiltCode)( tKeySwitchCode_t code );
  20. bool ( * GetKeyCode) ( tKeySwitchCode_t * pcode );
  21. bool ( * GetAmpCode) ( tKeySwitchCode_t * pcode );
  22. bool ( * GetFiltCode) ( tKeySwitchCode_t * pcode );
  23. void ( * DeInit)();
  24. }
  25. sKeySwitchControlLL_t;
  26. extern const sKeySwitchControlLL_t KeyControlLLHandle;
  27. #endif