Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/src/config_keybrd.h

28 lines
1.1 KiB
C
Raw Normal View History

#ifndef CONFIG_KEYBRD_H
#define CONFIG_KEYBRD_H
#include <inttypes.h>
/* size of read_pins_t depends on the maximum number of pins scanned by RowScanner.
By default, read_pins_t is set to the largest type.
2016-07-14 23:28:16 +00:00
If your 8-bit AVR (Teensy 2) is running low on memory, using a smaller type saves SRAM.
Using smaller types on a 32-bit uC (Teensy LC) would accomplish nothing.
*/
2016-07-14 23:28:16 +00:00
/* Use a read_pins_t size that covers all read pins of all RowScanner objects i.e.
2016-07-15 05:15:38 +00:00
For Scanner_uC, Scanner_uC::readPinCount
For Scanner_ShiftRegs74HC165, Scanner_ShiftRegs74HC165::readPinCount
For Scanner_IOE, cover the last 1 bit in Scanner_IOE::strobePin
*/
typedef uint8_t read_pins_t;
//typedef uint16_t read_pins_t;
//typedef uint32_t read_pins_t;
2016-07-15 05:15:38 +00:00
/* SAMPLE_COUNT_MACRO is used in Debouncer_Samples.h
SAMPLE_COUNT_MACRO = 4 is very reliable for a keyboard.
Split keyboards with a long connecting wire or in environment with
2016-07-15 05:15:38 +00:00
strong electromagnetic interference (EMI) may need a larger SAMPLE_COUNT_MACRO for reliability.
*/
2016-07-15 05:15:38 +00:00
#define SAMPLE_COUNT_MACRO 4 //number of consecutive equal bits needed to change a debounced bit
#endif