This commit is contained in:
nasimovy 2025-03-25 17:27:06 +00:00
parent 92b3b208c4
commit 5a72eeae61
4 changed files with 39 additions and 41 deletions

View File

@ -157,7 +157,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MLX90614_ADDR_DEF 0x5A
#define CGRADSENS_ADDR 0x66
#define LTR390UV_ADDR 0x53
#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 //same adress as TCA8418
#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 // same adress as TCA8418
// -----------------------------------------------------------------------------
// ACCELEROMETER

View File

@ -107,7 +107,8 @@ enum {
#define _TCA8418_ROWS 4
#define _TCA8418_NUM_KEYS 12
uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7, 9, 7, 9, 2, 2, 2}; // Num chars per key, Modulus for rotating through characters
uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7,
9, 7, 9, 2, 2, 2}; // Num chars per key, Modulus for rotating through characters
unsigned char TCA8418TapMap[_TCA8418_NUM_KEYS][13] = {
{'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\', '/', '(', ')'}, // 1
@ -142,7 +143,6 @@ unsigned char TCA8418LongPressMap[_TCA8418_NUM_KEYS] = {
#define _TCA8418_LONG_PRESS_THRESHOLD 2000
#define _TCA8418_MULTI_TAP_THRESHOLD 750
TCA8418Keyboard::TCA8418Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr)
{
state = Init;
@ -338,7 +338,6 @@ void TCA8418Keyboard::pressed(uint8_t key)
// Store the current key as the last key
last_key = next_key;
last_tap = now;
}
void TCA8418Keyboard::released()
@ -560,4 +559,3 @@ void TCA8418Keyboard::writeRegister(uint8_t reg, uint8_t value)
writeCallback(m_addr, data[0], &(data[1]), 1);
}
}