summaryrefslogtreecommitdiffstats
path: root/keyboards/touchpad
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-09-13 11:24:05 +0800
committerlokher <lokher@gmail.com>2022-09-13 11:24:05 +0800
commit9581289745736ce068a1040f44cec37a2ca8830d (patch)
tree24f644715a5fd6cc4d804d9604fb094307808b1b /keyboards/touchpad
parentfe13cedf8c09fa34d5cec4e4c624738095176625 (diff)
Remove non-Keychron keyboards
Diffstat (limited to 'keyboards/touchpad')
-rw-r--r--keyboards/touchpad/config.h55
-rw-r--r--keyboards/touchpad/info.json23
-rw-r--r--keyboards/touchpad/keymaps/default/keymap.c30
-rw-r--r--keyboards/touchpad/matrix.c291
-rw-r--r--keyboards/touchpad/readme.md15
-rw-r--r--keyboards/touchpad/rules.mk21
-rw-r--r--keyboards/touchpad/touchpad.c1
-rw-r--r--keyboards/touchpad/touchpad.h19
8 files changed, 0 insertions, 455 deletions
diff --git a/keyboards/touchpad/config.h b/keyboards/touchpad/config.h
deleted file mode 100644
index 2499fca4e1..0000000000
--- a/keyboards/touchpad/config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Copyright 2018 Jack Humbert <jack.humb@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-#include "config_common.h"
-
-/* key matrix size */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 6
-
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 5
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
diff --git a/keyboards/touchpad/info.json b/keyboards/touchpad/info.json
deleted file mode 100644
index c20d14ce7e..0000000000
--- a/keyboards/touchpad/info.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "keyboard_name": "TouchPad",
- "manufacturer": "JacoBurge",
- "url": "",
- "maintainer": "qmk",
- "usb": {
- "vid": "0x16D0",
- "pid": "0x0DB8",
- "device_version": "0.0.1"
- },
- "layouts": {
- "LAYOUT_ortho_6x6": {
- "layout": [
- {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
- {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1},
- {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2},
- {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3},
- {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4},
- {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5}
- ]
- }
- }
-}
diff --git a/keyboards/touchpad/keymaps/default/keymap.c b/keyboards/touchpad/keymaps/default/keymap.c
deleted file mode 100644
index 7fcaa70c5d..0000000000
--- a/keyboards/touchpad/keymaps/default/keymap.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [0] = LAYOUT_ortho_6x6(
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
- KC_A, KC_B, KC_C, KC_D, KC_E, KC_F
- )
-
-};
diff --git a/keyboards/touchpad/matrix.c b/keyboards/touchpad/matrix.c
deleted file mode 100644
index 3af4c5c3c7..0000000000
--- a/keyboards/touchpad/matrix.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
-MIT License
-Copyright (c) 2018, JacoBurge
-Adapted for QMK by Jack Humbert in 2018
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-#include "matrix.h"
-#include "i2c_master.h"
-#include "quantum.h"
-
-#define VIBRATE_LENGTH 50 //Defines number of interrupts motor will vibrate for, must be bigger than 8 for correct operation
-volatile uint8_t vibrate = 0; //Trigger vibration in interrupt
-
-static matrix_row_t matrix[MATRIX_ROWS];
-
-const uint8_t SENr[6] = {1, 2, 3, 5, 6, 7};//Maps capacitive pads to pins
-const uint8_t SENc[6] = {0, 4, 8, 9, 10, 11};
-
-volatile uint8_t LEDs[6][6] = {{0}};//Stores current LED values
-
-//Read data from the cap touch IC
-uint8_t readDataFromTS(uint8_t reg) {
- uint8_t rx[1] = { 0 };
- if (i2c_readReg(0x1C << 1, reg, rx, 1, 100) == 0) {
- return rx[0];
- }
- return 0;
-}
-
-//Write data to cap touch IC
-uint8_t writeDataToTS(uint8_t reg, uint8_t data) {
- uint8_t tx[2] = { reg, data };
- if (i2c_transmit(0x1C << 1, tx, 2, 100) == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-
-uint8_t checkTSPres(void) {
- return (readDataFromTS(0x00) == 0x3E);
-}
-
-uint8_t capSetup(void) {
-
- uint8_t temp_return = checkTSPres();
-
- if (temp_return == 1) {
- // Perform measurements every 16ms
- writeDataToTS(0x08, 1);
-
- // Increase detection integrator value
- writeDataToTS(0x0B, 1);
-
- // Oversample to gain two bits for columns
- writeDataToTS(0x28, 0x42);
- writeDataToTS(0x29, 0x00);
- writeDataToTS(0x2A, 0x00);
- writeDataToTS(0x2B, 0x00);
- writeDataToTS(0x2C, 0x42);
- writeDataToTS(0x2D, 0x00);
- writeDataToTS(0x2E, 0x00);
- writeDataToTS(0x2F, 0x00);
- writeDataToTS(0x30, 0x42);
- writeDataToTS(0x31, 0x42);
- writeDataToTS(0x32, 0x42);
- writeDataToTS(0x33, 0x42);
-
- // Recalibration if touch detected for more than 8 seconds n*0.16s
- writeDataToTS(0x0C, 50);
-
- // Enable keys and set key groups
- writeDataToTS(0x1C, 0x00 | 0x04);
- writeDataToTS(0x1D, 0x00 | 0x08);
- writeDataToTS(0x1E, 0x00 | 0x08);
- writeDataToTS(0x1F, 0x00 | 0x08);
- writeDataToTS(0x20, 0x00 | 0x04);
- writeDataToTS(0x21, 0x00 | 0x08);
- writeDataToTS(0x22, 0x00 | 0x08);
- writeDataToTS(0x23, 0x00 | 0x08);
- writeDataToTS(0x24, 0x00 | 0x04);
- writeDataToTS(0x25, 0x00 | 0x04);
- writeDataToTS(0x26, 0x00 | 0x04);
- writeDataToTS(0x27, 0x00 | 0x04);
-
- }
- return temp_return;
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {}
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-void matrix_init(void) {
-
- i2c_init();
-
- //Motor enable
- setPinOutput(E6);
- //Motor PWM
- setPinOutput(D7);
-
- //Power LED
- setPinOutput(B7);
- writePinHigh(B7);
-
- //LEDs Columns
- setPinOutput(F7);
- setPinOutput(F6);
- setPinOutput(F5);
- setPinOutput(F4);
- setPinOutput(F1);
- setPinOutput(F0);
-
- //LEDs Rows
- setPinOutput(D6);
- setPinOutput(B4);
- setPinOutput(B5);
- setPinOutput(B6);
- setPinOutput(C6);
- setPinOutput(C7);
-
- //Capacitive Interrupt
- setPinInput(D2);
-
- capSetup();
- writeDataToTS(0x06, 0x12); //Calibrate capacitive touch IC
-
- memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
-
- matrix_init_quantum();
-}
-
-
-uint16_t touchDetectionRoutine(void) {
- uint16_t data;
- uint8_t temp1, temp2;
-
- temp1 = readDataFromTS(0x04);
- temp2 = readDataFromTS(0x03);
- data = temp1;
- data = (data << 8) | temp2;
- return data;
-
-}
-
-//Process raw capacitive data, map pins to rows and columns
-void decodeArray(uint16_t dataIn, uint8_t *column, uint8_t *row) {
- uint8_t i1 = 20, i2 = 20;
- for (uint8_t i = 0; i < 12; i++) {
- if ((dataIn & 0b1) == 1) {
- if (i1 == 20) {
- i1 = i;
- } else if (i2 == 20) {
- i2 = i;
- }
- }
- dataIn = dataIn >> 1;
- }
-
- for (uint8_t j = 0; j < 6; j++) {
- if (SENr[j] == i1 || SENr[j] == i2) {
- *row = j;
- }
- if (SENc[j] == i1 || SENc[j] == i2) {
- *column = j;
- }
- }
-}
-
-void touchClearCurrentDetections(void) {
- readDataFromTS(0x05);
- readDataFromTS(0x02);
- readDataFromTS(0x03);
- readDataFromTS(0x04);
-}
-
-//Check interrupt pin
-uint8_t isTouchChangeDetected(void) {
- return !readPin(D2);
-}
-
-uint8_t matrix_scan(void) {
- if (isTouchChangeDetected()) {
- uint16_t dataIn = touchDetectionRoutine();
- if ((dataIn & 0b111100010001) > 0 && (dataIn & 0b000011101110) > 0) {
- uint8_t column = 10, row = 10;
- decodeArray(dataIn, &column, &row);
- if (column != 10 && row != 10) {
- vibrate = VIBRATE_LENGTH; //Trigger vibration
- matrix[row] = _BV(column);
- } else {
- memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
- }
- } else {
- memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
- }
- touchClearCurrentDetections();
- }
-
- for (uint8_t c = 0; c < 6; c++) {
- for (uint8_t r = 0; r < 6; r++) {
- switch (r) {
- case 0: writePin(D6, matrix_is_on(r, c)); break;
- case 1: writePin(B4, matrix_is_on(r, c)); break;
- case 2: writePin(B5, matrix_is_on(r, c)); break;
- case 3: writePin(B6, matrix_is_on(r, c)); break;
- case 4: writePin(C6, matrix_is_on(r, c)); break;
- case 5: writePin(C7, matrix_is_on(r, c)); break;
- }
-
- switch (c) {
- case 0: writePin(F5, !matrix_is_on(r, c)); break;
- case 1: writePin(F4, !matrix_is_on(r, c)); break;
- case 2: writePin(F1, !matrix_is_on(r, c)); break;
- case 3: writePin(F0, !matrix_is_on(r, c)); break;
- case 4: writePin(F6, !matrix_is_on(r, c)); break;
- case 5: writePin(F7, !matrix_is_on(r, c)); break;
- }
- }
- }
-
- if (vibrate == VIBRATE_LENGTH) {
- writePinHigh(E6);
- writePinHigh(D7);
- vibrate--;
- } else if (vibrate > 0) {
- vibrate--;
- } else if (vibrate == 0) {
- writePinLow(D7);
- writePinLow(E6);
- }
-
- matrix_scan_quantum();
-
- return 1;
-
-}
-
-bool matrix_is_on(uint8_t row, uint8_t col) {
- return (matrix[row] & (1<<col));
-}
-
-matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
- printf("\nr/c 01234567\n");
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- printf("%X0: ", row);
- matrix_row_t data = matrix_get_row(row);
- for (int col = 0; col < MATRIX_COLS; col++) {
- if (data & (1<<col))
- printf("1");
- else
- printf("0");
- }
- printf("\n");
- }
-}
diff --git a/keyboards/touchpad/readme.md b/keyboards/touchpad/readme.md
deleted file mode 100644
index f80bfa87b6..0000000000
--- a/keyboards/touchpad/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Touchpad
-
-![TouchPad](https://static1.squarespace.com/static/561b7180e4b05a82a1747f0b/59d8985903596eb5953e1803/5a43f205e4966b67c55878a2/1521104083905/IMG_2183.jpg?format=2500w)
-
-A small capacitive 6x6 touchpad for launching programs. [More info](https://jacoburge.co.uk/touch-pad/)
-
-Keyboard Maintainer: QMK Community
-Hardware Supported: TouchPad PCB
-Hardware Availability: [JaboBurge's Shop](https://jacoburge.co.uk/shop)
-
-Make example for this keyboard (after setting up your build environment):
-
- make touchpad:default
-
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk
deleted file mode 100644
index 45ffab29f4..0000000000
--- a/keyboards/touchpad/rules.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = caterina
-
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-CUSTOM_MATRIX = yes
-
-SRC += matrix.c i2c_master.c
diff --git a/keyboards/touchpad/touchpad.c b/keyboards/touchpad/touchpad.c
deleted file mode 100644
index fe96d56b68..0000000000
--- a/keyboards/touchpad/touchpad.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "touchpad.h"
diff --git a/keyboards/touchpad/touchpad.h b/keyboards/touchpad/touchpad.h
deleted file mode 100644
index 97b59a033c..0000000000
--- a/keyboards/touchpad/touchpad.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma once
-#include "quantum.h"
-
-#define LAYOUT_ortho_6x6( \
- K00, K01, K02, K03, K04, K05, \
- K10, K11, K12, K13, K14, K15, \
- K20, K21, K22, K23, K24, K25, \
- K30, K31, K32, K33, K34, K35, \
- K40, K41, K42, K43, K44, K45, \
- K50, K51, K52, K53, K54, K55 \
-) \
-{ \
- { K00, K01, K02, K03, K04, K05 }, \
- { K10, K11, K12, K13, K14, K15 }, \
- { K20, K21, K22, K23, K24, K25 }, \
- { K30, K31, K32, K33, K34, K35 }, \
- { K40, K41, K42, K43, K44, K45 }, \
- { K50, K51, K52, K53, K54, K55 } \
-}