keybrd library is an open source library for creating custom-keyboard firmware.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

Debouncer_Samples.h 645B

12345678910111213141516171819202122
  1. #ifndef DEBOUNCER_SAMPLES_H
  2. #define DEBOUNCER_SAMPLES_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <config_keybrd.h>
  6. #include <DebouncerInterface.h>
  7. /* Debouncer_Samples
  8. Configuration: SAMPLE_COUNT is defined in config_keybrd.h
  9. */
  10. class Debouncer_Samples : public DebouncerInterface
  11. {
  12. private:
  13. read_pins_t samples[SAMPLE_COUNT]; //bits, one bit per key, most recent readings
  14. uint8_t samplesIndex; //samples[] current write index
  15. public:
  16. Debouncer_Samples(): samplesIndex(0) {}
  17. virtual read_pins_t debounce(const read_pins_t rawSignal, read_pins_t& debounced);
  18. };
  19. #endif