keybrd library is an open source library for creating custom-keyboard firmware.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef CONFIG_KEYBRD_H
  2. #define CONFIG_KEYBRD_H
  3. #include <inttypes.h>
  4. /* This config_keybrd.h file is included by several keybrd library files.
  5. If you change any values in this file, copy the entire library into your sketch folder,
  6. and use double quotes to include the files in your sketch.
  7. That way libary updates don't overwrite your changes.
  8. The maximum number of pins scanned by RowScanner depends on size of read_pins_t.
  9. By default, read_pins_t is set to uint32_t.
  10. If your 8-bit AVR (Teensy 2) is running low on memory, using a smaller type saves SRAM.
  11. Using smaller types on a 32-bit uC (Teensy LC) would accomplish nothing.
  12. read_pins_t is used in:
  13. Row bit patterns
  14. ScannerInterface::scan()
  15. Scanner_ShiftRegsRead::scan()
  16. Scanner_ShiftRegsReadStrobed::scan()
  17. Scanner_uC::scan()
  18. DebouncerInterface::debounce()
  19. Debouncer_Samples::debounce()
  20. Use a read_pins_t size that covers all read pins of all Scanner objects i.e.
  21. For Scanner_uC: read_pins_t bits >= Scanner_uC::readPinCount
  22. For Scanner_ShiftRegsRead: read_pins_t bits >= Scanner_ShiftRegsRead::byte_count * 8
  23. (For Scanner_IOE: I/O expanders are assumed to have 8 bits per port or less)
  24. */
  25. //typedef uint8_t read_pins_t;
  26. //typedef uint16_t read_pins_t;
  27. typedef uint32_t read_pins_t;
  28. /* SAMPLE_COUNT is used in Debouncer_Samples.h
  29. SAMPLE_COUNT = 4 is very reliable for a keyboard.
  30. Split keyboards with a long connecting wire or in environment with
  31. strong electromagnetic interference (EMI) may need a larger SAMPLE_COUNT for reliability.
  32. */
  33. const uint8_t SAMPLE_COUNT = 4; //number of consecutive equal bits needed to change a debounced bit
  34. #endif