debounce.h 450 B

123456789101112131415161718192021222324
  1. #ifndef __DEBOUNCE_H__
  2. #define __DEBOUNCE_H__
  3. #include "drv_types.h"
  4. #include <linux/kernel.h>
  5. #include <linux/timer.h>
  6. typedef void (*DEBOUNCE_FUNCTION)(void *param);
  7. typedef struct __DEBOUNCE
  8. {
  9. struct timer_list tm;
  10. DEBOUNCE_FUNCTION notice;
  11. void *param;
  12. } DEBOUNCE;
  13. void debounce_init(DEBOUNCE *db, DEBOUNCE_FUNCTION notice);
  14. void debounce_exit(DEBOUNCE *db);
  15. void debounce_notice(DEBOUNCE *db, void *param, UINT32 dDelay_ms);
  16. #endif