#ifndef _DEBOUNCE_H__ #define _DEBOUNCE_H__ #include "stdint.h" #include "stdbool.h" typedef struct debouncer { uint16_t cnt; uint16_t out; } debouncer_s; bool debounce(debouncer_s *obj, bool in, uint16_t up_time, uint16_t down_time); #endif //_DEBOUNCE_H__